UnityEditor.ParticleSystemClipboard.PasteAnimationCurves C# (CSharp) Method

PasteAnimationCurves() public static method

public static PasteAnimationCurves ( UnityEditor.SerializedProperty animCurveProperty, UnityEditor.SerializedProperty animCurveProperty2, UnityEditor.SerializedProperty scalarProperty, Rect curveRanges, ParticleSystemCurveEditor particleSystemCurveEditor ) : void
animCurveProperty UnityEditor.SerializedProperty
animCurveProperty2 UnityEditor.SerializedProperty
scalarProperty UnityEditor.SerializedProperty
curveRanges UnityEngine.Rect
particleSystemCurveEditor ParticleSystemCurveEditor
return void
        public static void PasteAnimationCurves(SerializedProperty animCurveProperty, SerializedProperty animCurveProperty2, SerializedProperty scalarProperty, Rect curveRanges, ParticleSystemCurveEditor particleSystemCurveEditor)
        {
            if ((animCurveProperty != null) && (m_AnimationCurve1 != null))
            {
                animCurveProperty.animationCurveValue = m_AnimationCurve1;
                ClampCurve(animCurveProperty, curveRanges);
            }
            if ((animCurveProperty2 != null) && (m_AnimationCurve2 != null))
            {
                animCurveProperty2.animationCurveValue = m_AnimationCurve2;
                ClampCurve(animCurveProperty2, curveRanges);
            }
            if (scalarProperty != null)
            {
                scalarProperty.floatValue = m_AnimationCurveScalar;
            }
            if (particleSystemCurveEditor != null)
            {
                particleSystemCurveEditor.Refresh();
            }
        }

Usage Example

示例#1
0
 private void Paste()
 {
     ParticleSystemClipboard.PasteAnimationCurves(m_Prop1, m_Prop2, m_Scalar, m_CurveRanges, m_ParticleSystemCurveEditor);
     if (m_Prop1 != null)
     {
         m_Prop1.serializedObject.ApplyModifiedProperties();
     }
     if (m_Prop2 != null)
     {
         m_Prop2.serializedObject.ApplyModifiedProperties();
     }
     if (m_Scalar != null)
     {
         m_Scalar.serializedObject.ApplyModifiedProperties();
     }
 }
All Usage Examples Of UnityEditor.ParticleSystemClipboard::PasteAnimationCurves