c# - How to convert List<T> to an Object -
In unity, I have decided to create a custom editor for my component. I have a list of objects in the component. I have declared it as a list.
The editor targets this way:
myCustomList = serializedObject.FindProperty ("myCustomList");
The problem is that when I use myCustomList
myCustomList .objectReferenceValue = ModifiedCustomList tries to get / set value as a list / lieutenant ; MyCustomObject & gt;
tells me that the list & lt; MyCustomObject> can not be inserted as an object.
I tried setting values through my custom = named goal (as TargetClass). MyCustomList, but (of course) when I press the play button, the objects are reset to reset a new new list.
How do I list an object? Or to use the serialized object to get data types, such as lists?
You'll need to iterate such an object ...
Serialized property my customist = serialized object.fidpropy ("mystimlist"); For (int i = 0; i
Since SerializedProperty is not UnityEngine. Object You Can not Change The Way Unity The compiler can not determine that type.
This topic can be discussed.
Comments
Post a Comment