Esempio n. 1
0
        protected void GUIVowel(LipSync sync)
        {
            EditorGUILayout.PropertyField(serializedObject.FindProperty("recognizerLanguage"));
            string[] selectedVowels = null;
            switch (sync.recognizerLanguage)
            {
            case ERecognizerLanguage.Japanese:
                selectedVowels = LipSync.vowelsJP;
                break;

            case ERecognizerLanguage.Chinese:
                selectedVowels = LipSync.vowelsCN;
                break;
            }

            EditorGUILayout.PropertyField(serializedObject.FindProperty("targetBlendShapeObject"));
            EditorGUILayout.LabelField("Vowel Property Names");
            EditorGUILayout.BeginVertical(EditorStyles.textField);
            {
                SerializedProperty propertyNames = serializedObject.FindProperty("propertyNames");
                for (int i = 0; i < selectedVowels.Length; ++i)
                {
                    EditorGUILayout.PropertyField(propertyNames.GetArrayElementAtIndex(i), new GUIContent(selectedVowels[i]));
                }
            }
            EditorGUILayout.EndVertical();
        }
Esempio n. 2
0
        protected void GUIAdvanceOptions(LipSync sync)
        {
            EditorGUILayout.PropertyField(serializedObject.FindProperty("propertyMinValue"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("propertyMaxValue"));
            EditorGUILayout.Space();
            isAdvancedOptionsFoldOut = EditorGUILayout.Foldout(isAdvancedOptionsFoldOut, "Advanced Options");
            if (isAdvancedOptionsFoldOut)
            {
                EditorGUILayout.PropertyField(serializedObject.FindProperty("windowSize"));
                EditorGUILayout.PropertyField(serializedObject.FindProperty("amplitudeThreshold"));
                EditorGUILayout.PropertyField(serializedObject.FindProperty("moveTowardsSpeed"));
            }
            EditorGUILayout.Space();

            if (Application.isPlaying)
            {
                EditorGUILayout.HelpBox("Changes of settings at runtime must be applied manually using the button below.", MessageType.Warning);
                if (GUILayout.Button("Apply runtime changes"))
                {
                    sync.InitializeRecognizer();
                }
            }
        }