Unity-Technologies / guid-based-reference

A component for giving Game Objects a GUID and a class to create references to objects in any Scene by GUID
Other
625 stars 71 forks source link

GuidReference binary serialization #15

Open Xroft666 opened 5 years ago

Xroft666 commented 5 years ago

I would suggest getting that GuidReference class to be completly compatible with binary serialization. At the moment, when trying to save a reference, one would get errors like these

SerializationException: Type 'UnityEditor.SceneAsset' in Assembly 'UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.

Marking that to non serialized obviously would render its drawer not as cool as it is :) Same goes even for the "gameObject" property, it somehow wants to serialize even that.