Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


This is an old revision of the document!


Getting/Setting Managed References

Getting a managed reference out of a SerializedProperty is very challenging. It's better to just use C# reflection on the original object and force the asset / object to re-save.

See also:

This link has very poor code, but the general approach is correct. It is missing many corner cases, including inheritance and private fields, etc
serializedobject.1614100746.txt.gz · Last modified: 2021/02/23 17:19 by