Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


serializedobject

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
serializedobject [2021/02/22 23:23]
uninomiconadmin created
serializedobject [2021/04/29 19:11]
uninomiconadmin
Line 1: Line 1:
 ====== SerializedObject ====== ====== SerializedObject ======
  
-Recommended reading:  +===== Getting/Setting Managed References ===== 
-  * [[http://enemyhideout.com/2016/03/unity-tip-advanced-serializedproperties/]]+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:  
 +  * [[https://forum.unity.com/threads/setting-a-serializedproperty-to-a-struct.521752/]] 
 +  * [[https://answers.unity.com/questions/1347203/a-smarter-way-to-get-the-type-of-serializedpropert.html]] ((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.txt · Last modified: 2021/10/10 17:59 by artehacker