예제 #1
0
 private void ShowVector3Parameters(ref Vector3Data _data, string _label)
 {
     _data.toggle = EditorGUILayout.ToggleLeft(_label, _data.toggle);
     if (_data.toggle)
     {
         ShowAxisParameters(ref _data);
     }
 }
예제 #2
0
 private void ShowAxisParameters(ref Vector3Data _data)
 {
     if (_data.xyzData.toggle)
     {
         ShowSpecificAxis(ref _data.xyzData, "XYZ");
     }
     else
     {
         EditorGUILayout.BeginVertical();
         {
             ShowSpecificAxis(ref _data.xyzData, "XYZ");
             GUILayout.Space(10);
             ShowSpecificAxis(ref _data.xData, "X");
             ShowSpecificAxis(ref _data.yData, "Y");
             ShowSpecificAxis(ref _data.zData, "Z");
         }
         EditorGUILayout.EndVertical();
     }
 }
예제 #3
0
        // Data Analyse
        private Vector3 GetVector3Value(Vector3Data _data)
        {
            Vector3 _value = Vector3.zero;

            if (_data.xyzData.toggle)
            {
                _value.x += GetAxisValue(_data.xyzData);
                _value.y += GetAxisValue(_data.xyzData);
                _value.z += GetAxisValue(_data.xyzData);
            }
            else
            {
                _value.x += GetAxisValue(_data.xData);
                _value.y += GetAxisValue(_data.yData);
                _value.z += GetAxisValue(_data.zData);
            }


            return(_value);
        }