UnityEditor.LineRendererCurveEditor.CheckCurveChangedExternally C# (CSharp) Method

CheckCurveChangedExternally() public method

public CheckCurveChangedExternally ( ) : void
return void
        public void CheckCurveChangedExternally()
        {
            CurveWrapper curveWrapperFromID = this.m_Editor.GetCurveWrapperFromID(0);
            if (this.m_WidthCurve != null)
            {
                AnimationCurve animationCurveValue = this.m_WidthCurve.animationCurveValue;
                if ((curveWrapperFromID == null) != this.m_WidthCurve.hasMultipleDifferentValues)
                {
                    this.m_Refresh = true;
                }
                else if (curveWrapperFromID != null)
                {
                    if (curveWrapperFromID.curve.length == 0)
                    {
                        this.m_Refresh = true;
                    }
                    else if ((animationCurveValue.length >= 1) && (animationCurveValue.keys[0].value != curveWrapperFromID.curve.keys[0].value))
                    {
                        this.m_Refresh = true;
                    }
                }
            }
            else if (curveWrapperFromID != null)
            {
                this.m_Refresh = true;
            }
        }

Usage Example

        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            m_CurveEditor.CheckCurveChangedExternally();
            m_CurveEditor.OnInspectorGUI();

            EditorGUILayout.PropertyField(m_Time);
            EditorGUILayout.PropertyField(m_MinVertexDistance);
            EditorGUILayout.PropertyField(m_Autodestruct);
            EditorGUILayout.PropertyField(m_Emitting);
            EditorGUILayout.PropertyField(m_ColorGradient, Styles.colorGradient);
            EditorGUILayout.PropertyField(m_NumCornerVertices, Styles.numCornerVertices);
            EditorGUILayout.PropertyField(m_NumCapVertices, Styles.numCapVertices);
            EditorGUILayout.PropertyField(m_Alignment, Styles.alignment);
            EditorGUILayout.PropertyField(m_TextureMode, Styles.textureMode);
            EditorGUILayout.PropertyField(m_GenerateLightingData, Styles.generateLightingData);
            EditorGUILayout.PropertyField(m_ShadowBias, Styles.shadowBias);

            DrawMaterials();
            LightingSettingsGUI(false);
            OtherSettingsGUI(true, false, true);

            serializedObject.ApplyModifiedProperties();
        }
All Usage Examples Of UnityEditor.LineRendererCurveEditor::CheckCurveChangedExternally