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!

Try Claire’s approach, with Foreach and such:

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.