Пример #1
0
        void DrawBlendShape(Vowel vowel, BlendShapeInfo info)
        {
            EditorGUILayout.BeginHorizontal();

            EditorGUILayout.PrefixLabel(vowel.ToString());
            DrawBlendShapePopup(info);
            DrawFactor(info);

            EditorGUILayout.EndHorizontal();
        }
Пример #2
0
        void DrawBlendShapePopup(BlendShapeInfo info)
        {
            var newIndex = EditorGUILayout.Popup(info.index + 1, GetBlendShapeArray(), GUILayout.MinWidth(200f));

            if (newIndex != info.index + 1)
            {
                Undo.RecordObject(target, "Change Blend Shape");
                info.index = newIndex - 1;
            }
        }
Пример #3
0
        void DrawFactor(BlendShapeInfo info)
        {
            float factor = EditorGUILayout.Slider(info.factor, 0f, 2f);

            if (factor != info.factor)
            {
                Undo.RecordObject(target, "Change Blend Factor");
                info.factor = factor;
            }
        }