jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

TextAsset references lost when Unity imports the TextAsset and FullInspector behavior simultaneously #119

Closed derubel closed 9 years ago

derubel commented 9 years ago

When Unity imports a TextAsset and a prefab containing a FullInspector behavior that references the TextAsset inside of a Serializable class at the same time, the reference to the TextAsset is lost. For example:

public class ContainerBehavior : BaseBehavior
{
    public TextAsset textAsset1;
    public GameObject prefab1;

    public Referencer referencer;
}

[Serializable]
public class Referencer
{
    public TextAsset textAsset2;
    public GameObject prefab2;
}

If this behavior is placed on a prefab and then the TextAsset (in my case an XML file) and prefab are imported at the same time (e.g. someone else gets both new files from version control), textAsset1 will reference the TextAsset but textAsset2 will not. For reference, the same action with normal Unity object references (prefab1 & prefab2) works as expected (both variables keep their references).

jacobdufault commented 9 years ago

Can you send me an email? I'd like to verify that this issue still occurs on the current master, as I'm unable to reproduce it. Repro steps are a little bit tricky here, so I'd like you to verify as well. Thanks!

jacobdufault commented 9 years ago

Thanks, I think this issue is fixed in the latest build (see the email reply so you can verify).

derubel commented 9 years ago

Yeah, 2.6.2 fixed it for me. Thanks much!