- Home /
Having runtime functionality and editor extension in one script
So I'm currently looking into having a class that will take care of a bunch of "cinematic" functions for me, adjusting the intensity of lights over time, moving objects, spawning and adjusting particle effects etc.
But I have a question, I would like this script to look quite similar to the new Particle System script, in that it has a custom editor lay out, with activatable and de-activatable modules, but also perform functions at run time. From looking into the documentation, this doesn't seem to be covered, if you want to extend the editor, you need to inherit from the EditorWindow class, where as object sneed to inherit from MonoBehaviour, so how can I achieve both of these things at once?
Answer by ungalyant2 · Apr 11, 2013 at 03:06 PM
This was a foolish misunderstanding of how the editor class worked. I know understand that you would create an entirely separate class for custom editor, and have that be the custom editor for the run time class.
Thanks for co$$anonymous$$g back to your question and clearing it up ;)
Your answer
Follow this Question
Related Questions
Custom Inspector: Accessing a reference to another MonoBehaviour? 1 Answer
Ho do I find all scenes with a certain script on an GameObject 2 Answers
Unity5 "MenuItem" not work under build-in menu 0 Answers
Can i extend or customise editor for all MonoBehaviours? 3 Answers
How can I determine if property was set to 'None (Audio Clip)' 1 Answer