References In Serializable classes fields pointing to asset instead of instance

Issue #32 resolved
Björn von der Osten created an issue

I have the following example class:

public class test : MonoBehaviour
{

    [SerializeField] private TestSerializable TestSerialize;

    [Serializable]
    public class TestSerializable
    {
        public GameObject GameObject;
    }
}

and the following setup in my scene:

Unity_64bit_-_Untitled_-_qvrtest_-_Android_DX1_2016-12-02_08-58-33.png

when the child prefab is a nested prefab, reverting the child prefab in the project will result in the reference to itself in the instance that can be seen in the screenshot to be reset to point at the child gameobject in the prefab asset instead of the instance in the scene (I renamed the child object in the scene to illustrate that). That only happens in fields whose types are classes that are [Serializable].

Comments (2)

  1. Log in to comment