コード例 #1
0
ファイル: AvatarMakerWindow.cs プロジェクト: Klanly/Jennicam
        private void OnEnable()
        {
            if (!AvatarMakerInitializer.IsPlatformSupported())
            {
                Debug.LogError("Avatar plugin supports only Windows platform and works in the Editor mode.");
                return;
            }

            if (!AvatarMakerInitializer.IsInitialized)
            {
                AvatarMakerInitializer.StartInitialization();
            }

            avatarProvider = AvatarMakerInitializer.AvatarProvider;

            UpdateAvatarList();
        }
コード例 #2
0
        private void OnEnable()
        {
            if (!AvatarMakerInitializer.IsPlatformSupported())
            {
                Debug.LogError("Avatar plugin supports only Windows platform and works in the Editor mode.");
                return;
            }

            if (!AvatarMakerInitializer.IsInitialized)
            {
                AvatarMakerInitializer.StartInitialization();
            }

#if UNITY_2018_1_OR_NEWER
            EditorApplication.hierarchyChanged += OnHierarchyChanged;
#else
            EditorApplication.hierarchyWindowChanged += OnHierarchyChanged;
#endif
            OnHierarchyChanged();
        }