Vector2Int values in array resetting on prefab when clicking the add button.

Issue #447 resolved
mSkull001 created an issue

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:

  1. Create new GameObject in a scene and attach the ResettingPrefabModifications component.

  2. Set some value on the first element in the list.

  3. Create a prefab of the GameObject.

  4. Select the GameObject in the scene again.

  5. Click + on the list drawer, and change Vector2Int values.

  6. Click + again. Observe all Vector2Int values resetting, except the values from before prefabbing.

Comments (1)

  1. Log in to comment