Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question ScriptableObject intermittently doesn't Awake() or OnEnable() in editor

Discussion in 'Editor & General Support' started by MrLucid72, May 19, 2022.

  1. MrLucid72


    Jan 12, 2016
    Unless I actually click on the ScriptableObject, Awake() is never triggered.

    I tried all kinds of things, like serializing it in `Preloaded Assets`.

    The only workaround was to serialize it in my first scene, but that's not-so-classy.

    Any ideas?
  2. spiney199


    Feb 11, 2021
    Awake/OnEnable/OnDisable for scriptable objects are only called during Domain reloads whilst in the editor. Are you expecting them to be called at other times?