Using SerializedObject in a build

Hi, I have a problem. I need to access a property of the shiruken particle system (ShapeModule.boxX) which is not exposed. For this I use SerializedObject and then I access this property with: FindProperty(“ShapeModule.boxX”).floatValue. To use these methods and classes I need to include UnityEditor as a namespace. The problem is that I need to be able to modify the property at run-time, but when I try to build the project, an error occurs because I can’t use UnityEditor namespace outside unity. How can I get around this. I really need this functionality.

I had to do the relative same with mecanim. I needed to access the internal graph of the state machine, which was only exposed in the UnityEditorInternal namespace.

I made my own serializer for animators, made an animator wrapper, and then worked with that wrapper. The main goal is to serialize all the fields you need at runtime inside a .txt file (I used a JSON parser) and then, read this .txt, deserialize it and build the wrapper class accordingly.

You then need to expose, inside the wrapper class, everything you would potentially need at runtime.

This is not a very specific answer, but I hope it will guide you through implementing some sort of similar system.