Example #1
0
        private AnimationCurve[] DrawWeatherPropertyCurveArray(WeatherProperty[] weatherPropertyArray, AnimationCurve[] curves, int curvesStartIndex, string errLabel)
        {
            GUILayout.BeginVertical();
            if (weatherPropertyArray != null)
            {
                for (int i = 0; i < weatherPropertyArray.Length; i++)
                {
                    WeatherProperty weatherProperty = weatherPropertyArray[i];

                    GUILayout.BeginHorizontal();
                    GUILayout.Label(weatherProperty.name + ": ");
                    Rect rect = EditorGUILayout.GetControlRect();
                    curves[i + curvesStartIndex] = EditorGUI.CurveField(rect, curves[i + curvesStartIndex]);
                    GUILayout.EndHorizontal();
                }
            }
            else
            {
                GUILayout.Label(errLabel);
            }
            GUILayout.EndVertical();

            return(curves);
        }
Example #2
0
 set => SetValue(WeatherProperty, value);