ScriptableObject gives me leaked object message when I save scene.

I have a Mono Behavior that has a public property of a type that inherits from ScritableObject. This type is created by an editor script and saved to a .asset file. The asset file is then dragged on the property. This all works fine, the problem is that when I save the scene I get a message telling me there are leaked object detected of the same type as my scriptable object. What is up with that?

Thanks,
Philip

Shouldn’t happen, unless you instantiated (a copy) of the ScriptableObject.

Then it would’ve been unserializable in the scene and would have shown that message.

Can you show the code of the MonoBehaviour that has the public property?

EDIT:

My bad. Just tried it. Did nothing special: just added a ScriptableObject to a public field in the inspector. It does say there’s a leak. Using Unity 5.1.1f1

(RoomData is the name of my ScriptableObject)

1 Like

Should I file a bug?

Go for it.