public static PasteAnimationCurves ( UnityEditor.SerializedProperty animCurveProperty, UnityEditor.SerializedProperty animCurveProperty2, UnityEditor.SerializedProperty scalarProperty, |
||
animCurveProperty | UnityEditor.SerializedProperty | |
animCurveProperty2 | UnityEditor.SerializedProperty | |
scalarProperty | UnityEditor.SerializedProperty | |
curveRanges | ||
particleSystemCurveEditor | ParticleSystemCurveEditor | |
Результат | 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();
}
}
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(); } }