Class PathEditorTool<T>
Inheritance
PathEditorTool<T>
Assembly: Unity.2D.Path.Editor.dll
public abstract class PathEditorTool<T> : EditorTool where T : ScriptablePath
Type Parameters
Properties
Declaration
public bool enableSnapping { get; set; }
Property Value
The icon and tooltip for this custom editor tool. If this function is not implemented, the toolbar displays the Inspector icon for the target type. If no target type is defined, the toolbar displays the Tool Mode icon.
Declaration
public override GUIContent toolbarIcon { get; }
Property Value
Overrides
Methods
Declaration
protected virtual IDrawer GetCustomDrawer(Object target)
Parameters
| Type |
Name |
Description |
| Object |
target |
|
Returns
Declaration
protected virtual bool GetLinearTangentIsZero(Object target)
Parameters
| Type |
Name |
Description |
| Object |
target |
|
Returns
Declaration
public T GetPath(Object targetObject)
Parameters
| Type |
Name |
Description |
| Object |
targetObject |
|
Returns
Declaration
protected abstract IShape GetShape(Object target)
Parameters
| Type |
Name |
Description |
| Object |
target |
|
Returns
Declaration
protected virtual void Initialize(T path, SerializedObject serializedObject)
Parameters
Checks whether the custom editor tool is available based on the state of the editor.
Declaration
public override bool IsAvailable()
Returns
| Type |
Description |
| bool |
Returns true if the custom editor tool is available. Returns false otherwise.
|
Overrides
Declaration
protected virtual void OnActivate()
Declaration
protected virtual void OnCustomGUI(T path)
Parameters
| Type |
Name |
Description |
| T |
path |
|
Declaration
protected virtual void OnDeactivate()
Declaration
public void SetPath(Object target)
Parameters
| Type |
Name |
Description |
| Object |
target |
|
Declaration
protected abstract void SetShape(T path, SerializedObject serializedObject)
Parameters
Extension Methods