public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            if (m_utility == null)
            {
                m_utility = new HandPoseDataEditorUtility(property, "handPose.");
            }

            if (m_prop_presets == null)
            {
                m_prop_presets = property.FindPropertyRelative("presets");
            }

            var presets = m_prop_presets.objectReferenceValue as HandPosePresetsAsset;

            if (presets == null)
            {
                presets = HandPosePresetsAsset.GetDefaultGetPresetsAsset();
                m_prop_presets.objectReferenceValue = presets;
            }

            var singleFieldRect = new Rect(position.x, position.y, position.width, EditorGUIUtility.singleLineHeight);

            EditorGUI.PropertyField(singleFieldRect, m_prop_presets);
            position.y      += EditorGUIUtility.singleLineHeight;
            position.height -= EditorGUIUtility.singleLineHeight;

            m_utility.DrawFingerControls(position, presets);
        }
Beispiel #2
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            if (m_utility == null)
            {
                m_utility = new HandPoseDataEditorUtility(property, "handPose.");
            }

            m_utility.DrawFingerControls(position);

//            var singleFieldRect = new Rect(position.x, position.y, position.width, EditorGUIUtility.singleLineHeight);
//            EditorGUI.PropertyField(singleFieldRect, bindValue01Prop);
//            singleFieldRect.y += EditorGUIUtility.singleLineHeight;
//            EditorGUI.PropertyField(singleFieldRect, bindValue02Prop);
        }