コード例 #1
0
        private void AvatarInspector(AvatarManager avatarManager, int i)
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(i.ToString(), GUILayout.Width(20));
            avatarManager.fpAvatars[i] = (Animator)EditorGUILayout.ObjectField(avatarManager.fpAvatars[i], typeof(Animator), false);
#if hNW_UNET || hNW_PHOTON
            avatarManager.tpAvatars[i] = (Animator)EditorGUILayout.ObjectField(avatarManager.tpAvatars[i], typeof(Animator), false);
#endif
            EditorGUILayout.EndHorizontal();
        }
コード例 #2
0
        private void CurrentAvatarInspector(AvatarManager avatarManager)
        {
            int lastAvatarIndex = avatarManager.currentAvatarIndex;

            avatarManager.currentAvatarIndex = EditorGUILayout.IntField("Current Avatar Index", avatarManager.currentAvatarIndex);
            if (Application.isPlaying && avatarManager.currentAvatarIndex != lastAvatarIndex)
            {
                avatarManager.SetAvatar(avatarManager.currentAvatarIndex);
            }
        }
コード例 #3
0
 private void AddAvatar(AvatarManager avatarManager)
 {
     avatarManager.fpAvatars = Extend(avatarManager.fpAvatars, avatarManager.fpAvatars.Length + 1);
 }
コード例 #4
0
        public void OnDisable()
        {
            AvatarManager avatarManager = (AvatarManager)target;

            Cleanup(avatarManager);
        }