static void LicenseInitialize() { #if UNITY_2017_2_OR_NEWER EditorApplication.playModeStateChanged += (arg) => #else EditorApplication.playmodeStateChanged += () => #endif { if (EditorApplication.isPlaying) { PencilLineLicense.RefreshLicense(); } }; EditorApplication.update += () => { if (isFirstUpdate) { if (!NativeFunctions.CheckDllCommitHashValid()) { return; } Pencil_4.PencilLineLicense.Initialize(); isFirstUpdate = false; } //Unity Editorがアクティブになったらライセンスの状態を更新する if (!isApplicationActive && UnityEditorInternal.InternalEditorUtility.isApplicationActive) { PencilLineLicense.RefreshLicense(); } isApplicationActive = UnityEditorInternal.InternalEditorUtility.isApplicationActive; }; }