{"url":"https://baba-s.hatenablog.com/entry/2022/09/19/143756","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaba-s.hatenablog.com%2Fentry%2F2022%2F09%2F19%2F143756\" title=\"\u3010Unity\u3011UnityException: LoadSerializedFileAndForget is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject &#39;XXXX&#39;. - \u30b3\u30ac\u30cd\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"blog_title":"\u30b3\u30ac\u30cd\u30d6\u30ed\u30b0","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/baba_s/","height":"190","categories":["Unity","Unity - \u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0"],"title":"\u3010Unity\u3011UnityException: LoadSerializedFileAndForget is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'XXXX'.","blog_url":"https://baba-s.hatenablog.com/","provider_url":"https://hatena.blog","type":"rich","version":"1.0","width":"100%","description":"\u6982\u8981 [InitializeOnLoad] internal static class Example { static Example() { Debug.Log( ExampleSetting.instance ); } } InitializeOnLoad \u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067 ScriptableSingleton \u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3089 UnityException: LoadSerializedFileAndForget is not allowed to be called from a ScriptableObject constructor (or instance field init\u2026","published":"2022-09-19 14:37:56","author_name":"baba_s"}