UnityEditor.ParticleSystemClipboard.HasSingleAnimationCurve C# (CSharp) Method

HasSingleAnimationCurve() public static method

public static HasSingleAnimationCurve ( ) : bool
return bool
        public static bool HasSingleAnimationCurve()
        {
            return ((m_AnimationCurve1 != null) && (m_AnimationCurve2 == null));
        }

Usage Example

示例#1
0
        static internal void Show(Rect position, SerializedProperty property, SerializedProperty property2, SerializedProperty scalar, Rect curveRanges, ParticleSystemCurveEditor curveEditor)
        {
            // Curve context menu
            GUIContent copy  = EditorGUIUtility.TrTextContent("Copy");
            GUIContent paste = EditorGUIUtility.TrTextContent("Paste");

            GenericMenu menu = new GenericMenu();

            bool isRegion   = property != null && property2 != null;
            bool validPaste = (isRegion && ParticleSystemClipboard.HasDoubleAnimationCurve()) || (!isRegion && ParticleSystemClipboard.HasSingleAnimationCurve());

            AnimationCurveContextMenu obj = new AnimationCurveContextMenu(property, property2, scalar, curveRanges, curveEditor);

            menu.AddItem(copy, false, obj.Copy);
            if (validPaste)
            {
                menu.AddItem(paste, false, obj.Paste);
            }
            else
            {
                menu.AddDisabledItem(paste);
            }

            menu.DropDown(position);
        }
All Usage Examples Of UnityEditor.ParticleSystemClipboard::HasSingleAnimationCurve