- changed status to resolved
Vector2Int values in array resetting on prefab when clicking the add button.
Issue #447
resolved
Issue: Vector2Int values in array resetting on prefab when clicking the add button. Unity version: 2018.2.8f1 Odin version: 2.0.5 Editor Only Mode: Nope. OS: Windows 10.
Code:
public class ResettingPrefabModifications : SerializedMonoBehaviour
{
[NonSerialized, OdinSerialize]
public Vector2Int[] Points = new Vector2Int[1];
}
Steps to reproduce:
-
Create new GameObject in a scene and attach the ResettingPrefabModifications component.
-
Set some value on the first element in the list.
-
Create a prefab of the GameObject.
-
Select the GameObject in the scene again.
-
Click + on the list drawer, and change Vector2Int values.
-
Click + again. Observe all Vector2Int values resetting, except the values from before prefabbing.
Comments (1)
-
- Log in to comment
This has been fixed in the next release of Odin.