Open stepsani opened 2 years ago
Hi there, I was having the same issue with Unity 2022.3.10f1, and fixed it by adding some validations before returning values in UnityWrappers\SplitterState.cs, this are the methods I've modified:
SplitterState.cs Ln25:
public SplitterState(float[] relativeSizes, int[] minSizes, int[] maxSizes)
{
splitter = SplitterStateType.InvokeMember(null,
BindingFlags.DeclaredOnly |
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.CreateInstance, null, null, new object[] { relativeSizes, minSizes, maxSizes });
realSizes = Array.ConvertAll((float[])RealSizesInfo.GetValue(splitter), x => (int)x);
}
SplitterState.cs Ln68:
public int splitSize
{
get
{
var splitSize = SplitterStateType.InvokeMember("splitSize",
BindingFlags.DeclaredOnly |
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.GetField, null, splitter, null);
return splitSize is int intValue ? intValue : 0;
}
}
@steve3003 would be amazing to add it on the next version if you are updating it any time soon.
Hi, I'm trying to export data from the Memory profiler and I run into this issue.
Any help? Thanks!