UnityEditor.ParticleSystemClipboard.PasteGradient C# (CSharp) Method

PasteGradient() public static method

public static PasteGradient ( UnityEditor.SerializedProperty gradientProperty, UnityEditor.SerializedProperty gradientProperty2 ) : void
gradientProperty UnityEditor.SerializedProperty
gradientProperty2 UnityEditor.SerializedProperty
return void
        public static void PasteGradient(SerializedProperty gradientProperty, SerializedProperty gradientProperty2)
        {
            if ((gradientProperty != null) && (m_Gradient1 != null))
            {
                gradientProperty.gradientValue = m_Gradient1;
            }
            if ((gradientProperty2 != null) && (m_Gradient2 != null))
            {
                gradientProperty2.gradientValue = m_Gradient2;
            }
        }
    }

Usage Example

 private void Paste()
 {
     ParticleSystemClipboard.PasteGradient(this.m_Prop1, null);
     if (this.m_Prop1 != null)
     {
         this.m_Prop1.serializedObject.ApplyModifiedProperties();
     }
     GradientPreviewCache.ClearCache();
 }
All Usage Examples Of UnityEditor.ParticleSystemClipboard::PasteGradient