- Home /
How do you actually use CanEditMultipleObjects
I wrote an editor script for an asset I am developing using the "old way" of directly editing variables and using functions. This prevents me from using multi-object editing support without writing custom code to handle such tasks. I have looked into the CanEditMultipleObjects, SerializedObject, and SerializedProperty classes and frankly, I don't understand them AT ALL. I have searched the forums, answers, YouTube, and the scripting API to no avail. If anyone can explain how to use these classes to achieve multi-object editing the "normal way" I will be highly appreciative.
Thanks!
Answer by MaDDoX · Dec 13, 2014 at 06:36 PM
Try Claire's approach, with Foreach and such: https://www.youtube.com/watch?v=74Ph6y0rR-g
It's pretty tiresome if you ask me, if not for the fact that the "new" approach is reflection-based - and therefore completely vulnerable to refactoring - I'd actually prefer the serialised property way.
Your answer
Follow this Question
Related Questions
Changing Inspector's Serialized Property Label (With Code Sample) 1 Answer
Type casting SerializedProperty.objectReferenceValue doesn't work? 3 Answers
Override Transform Inspector using SerializedObject and SerializedProperty 1 Answer
How to get fields of a custom script through SerializedProperty.FindPropertyRelative? 1 Answer
Serialised Properties 1 Answer