Because the struct is boxed, the changes are not reflected when using a Button Attribute.
[Serializable]
public struct MyStruct
{
public int Value;
[Button]
public void Fuga()
{
// Can not get latest value.
Debug.Log(Value);
//Can not set new value.
Value=0;
}
}
Because the struct is boxed, the changes are not reflected when using a Button Attribute.