Esempio n. 1
0
        private void OnEnable()
        {
            if (s_Instance == null)
            {
                s_Instance = this;
            }

            RegisterCallbacks();
            Initialize();
        }
Esempio n. 2
0
        static void CreateInstance()
        {
            if (s_Instance != null)
            {
                return;
            }

            var ikManagers = Resources.FindObjectsOfTypeAll <IKEditorManager>();

            if (ikManagers.Length > 0)
            {
                s_Instance = ikManagers[0];
            }
            else
            {
                s_Instance = ScriptableObject.CreateInstance <IKEditorManager>();
            }
            s_Instance.hideFlags = HideFlags.HideAndDontSave;
        }