ScriptableObject ExecuteInEditMode issue

Hello everyone. I’m busy building a CustomInspector for the artists in my office so they can create items without having to know code. This whole thing has been way easier in theory than it has been in practice.

My current problem is that I want to use ScriptableObject instead of MonoBehaviour but the code I’ve written requires some stuff to use [ExecuteInEditMode], when I change the script from MonoBehaviour to ScriptableObject [ExecuteInEditMode] stops working.

Does anyone know if it’s possible to use [ExecuteInEditMode] in a ScriptableObject? If it is I’d greatly appreciate a pointer or two.

Uhm a scriptableobject has almost no callbacks at all. It only has Awake, OnEnable, OnDisable and OnDestroy. What exact behaviour do you expect from ExecuteInEditMode ? Have you read the documentation? It only applies to MonoBehaviours since ScriptableObjects do not have any callbacks besides the 4 i’ve mentioned already. Those callbacks are actually called in the editor as well.

Finally note that ExecuteInEditMode is not meant to implement editor functionality. It’s only meant to provide the runtime functionality to be active at edit time. For example a particle system that should update during edit mode. However it should not be used to implement actual editor features. You haven’t said a word about what you’re actually doing so we can’t help you further with your issue. However the way you phrased your question it sounds like you’re generally on the wrong track.