C# Class Nodify.Editor.NodifyEditorUtilities

Mostra file Open project: anneomcl/LetsMake Class Usage Examples

Public Properties

Property Type Description
currentConnectingAnchor Anchor
currentDraggingAnchor Anchor
currentManipulatingNode Nodify.Runtime.Node
currentManipulatingNodeOffset Vector2
currentSelectedGroup Nodify.Runtime.NodeGroup

Private Properties

Property Type Description

Public Methods

Method Description
BeginZoomArea ( float zoomScale, Rect screenCoordsArea ) : Rect
ClosestPointOnRectangle ( Vector2 point, Rect rect ) : Vector2
CreateMenuSort ( CreateMenu a, CreateMenu b ) : int

Sorts the create menu using the Uri scheme.

DrawBezier ( Vector2 start, Vector2 end, Color color, float size, float bendiness = 50 ) : void

Draws a bezier with a specified bendiness.

Duplicate ( GameObject obj ) : GameObject

Duplicates the gameObject the same as the Unity way.

EndZoomArea ( ) : void
FindAnchorRenderer ( Type anchorType ) : object

Find the anchor renderer that best matches the anchor type.

FindNodeRenderer ( Type nodeType ) : object

Find a Rendering.NodeRenderer that matches the type of node to render.

FindNodeTypes ( ) : List

Finds all types that have the CreateMenu attribute. These should be type of Node.

FindStyleByName ( GUISkin skin, string styleName ) : GUIStyle

Iterates through the custom styles of a GUISkin and finds a custom style by name.

GetCurrentAssetPath ( ) : string

Gets the current asset path.

PointOnBezier ( Vector2 s, Vector2 e, Vector2 st, Vector2 et, float t ) : Vector2

Finds the point on the bezier curve at T.

PointOnBezier ( Vector2 s, Vector2 e, float t, float bendiness = 50 ) : Vector2

Finds a point on the Bezier curve at time T based on bendiness.

SafeDestroy ( GameObject gameObject ) : void

Destroys the gameobject in both Run mode and edit mode safely.

Truncate ( string source, int length, string trail = "..." ) : string

Returns a truncated version of a string based on additional parameters supplied.

Method Details

BeginZoomArea() public static method

public static BeginZoomArea ( float zoomScale, Rect screenCoordsArea ) : Rect
zoomScale float
screenCoordsArea UnityEngine.Rect
return UnityEngine.Rect

ClosestPointOnRectangle() public static method

public static ClosestPointOnRectangle ( Vector2 point, Rect rect ) : Vector2
point Vector2
rect UnityEngine.Rect
return Vector2

CreateMenuSort() public static method

Sorts the create menu using the Uri scheme.
public static CreateMenuSort ( CreateMenu a, CreateMenu b ) : int
a CreateMenu
b CreateMenu
return int

DrawBezier() public static method

Draws a bezier with a specified bendiness.
public static DrawBezier ( Vector2 start, Vector2 end, Color color, float size, float bendiness = 50 ) : void
start Vector2 Start.
end Vector2 End.
color Color Color.
size float Size.
bendiness float Bendiness.
return void

Duplicate() public static method

Duplicates the gameObject the same as the Unity way.
public static Duplicate ( GameObject obj ) : GameObject
obj UnityEngine.GameObject
return UnityEngine.GameObject

EndZoomArea() public static method

public static EndZoomArea ( ) : void
return void

FindAnchorRenderer() public static method

Find the anchor renderer that best matches the anchor type.
public static FindAnchorRenderer ( Type anchorType ) : object
anchorType System.Type Anchor type.
return object

FindNodeRenderer() public static method

Find a Rendering.NodeRenderer that matches the type of node to render.
public static FindNodeRenderer ( Type nodeType ) : object
nodeType System.Type Node type.
return object

FindNodeTypes() public static method

Finds all types that have the CreateMenu attribute. These should be type of Node.
public static FindNodeTypes ( ) : List
return List

FindStyleByName() public static method

Iterates through the custom styles of a GUISkin and finds a custom style by name.
public static FindStyleByName ( GUISkin skin, string styleName ) : GUIStyle
skin UnityEngine.GUISkin
styleName string
return UnityEngine.GUIStyle

GetCurrentAssetPath() public static method

Gets the current asset path.
public static GetCurrentAssetPath ( ) : string
return string

PointOnBezier() public static method

Finds the point on the bezier curve at T.
public static PointOnBezier ( Vector2 s, Vector2 e, Vector2 st, Vector2 et, float t ) : Vector2
s Vector2 S.
e Vector2 E.
st Vector2 St.
et Vector2 Et.
t float T.
return Vector2

PointOnBezier() public static method

Finds a point on the Bezier curve at time T based on bendiness.
public static PointOnBezier ( Vector2 s, Vector2 e, float t, float bendiness = 50 ) : Vector2
s Vector2 S.
e Vector2 E.
t float T.
bendiness float Bendiness.
return Vector2

SafeDestroy() public static method

Destroys the gameobject in both Run mode and edit mode safely.
public static SafeDestroy ( GameObject gameObject ) : void
gameObject UnityEngine.GameObject
return void

Truncate() public static method

Returns a truncated version of a string based on additional parameters supplied.
public static Truncate ( string source, int length, string trail = "..." ) : string
source string
length int
trail string
return string

Property Details

currentConnectingAnchor public_oe static_oe property

public static Anchor currentConnectingAnchor
return Anchor

currentDraggingAnchor public_oe static_oe property

public static Anchor currentDraggingAnchor
return Anchor

currentManipulatingNode public_oe static_oe property

public static Node,Nodify.Runtime currentManipulatingNode
return Nodify.Runtime.Node

currentManipulatingNodeOffset public_oe static_oe property

public static Vector2 currentManipulatingNodeOffset
return Vector2

currentSelectedGroup public_oe static_oe property

public static NodeGroup,Nodify.Runtime currentSelectedGroup
return Nodify.Runtime.NodeGroup