nullable vector2 does not want to become a null
Issue #305
wontfix
I use nullable vector2 (Vector2?). When I set it to null, it becomes null, but in next Update it returns the last value. So, I cant set it to null. This behavior works as described only if I watching the value in the inpector. If i close inspector, everything works as it should.
Comments (5)
-
reporter -
I'm unable to reproduce this issue. Doing this in Unity 2017.3.0f3 seems to work as expected:
public class TestBehaviour : MonoBehaviour { [ShowInInspector] public Vector2? MyVector2; }
If you could further detail how you've come to your problem, perhaps we can find a solution?
-
- removed milestone
-
- changed status to open
-
- changed status to wontfix
Since the reporter states that they use default Unity serialization, Vector? is not supported, nor should it be - Unity does not support nullable serialization by default.
- Log in to comment
I use default unity serialization.