Class BaseBrushVariator
Inheritance
System.Object
BaseBrushVariator
Syntax
public abstract class BaseBrushVariator : IBrushController, IBrushTerrainCache
Constructors
BaseBrushVariator(String, IBrushEventHandler, IBrushTerrainCache)
Declaration
protected BaseBrushVariator(string toolName, IBrushEventHandler eventHandler, IBrushTerrainCache terrainCache)
Parameters
Properties
canUpdateTerrainUnderCursor
Declaration
public bool canUpdateTerrainUnderCursor { get; }
Property Value
Type |
Description |
System.Boolean |
|
Implements
isInUse
Declaration
public virtual bool isInUse { get; }
Property Value
Type |
Description |
System.Boolean |
|
Implements
isRaycastHitUnderCursorValid
Declaration
public bool isRaycastHitUnderCursorValid { get; }
Property Value
Type |
Description |
System.Boolean |
|
Implements
raycastHitUnderCursor
Declaration
public RaycastHit raycastHitUnderCursor { get; }
Property Value
Type |
Description |
RaycastHit |
|
Implements
terrainUnderCursor
Declaration
public Terrain terrainUnderCursor { get; }
Property Value
Implements
Methods
AppendBrushInfo(Terrain, IOnSceneGUI, StringBuilder)
Declaration
public virtual void AppendBrushInfo(Terrain terrain, IOnSceneGUI editContext, StringBuilder builder)
Parameters
Type |
Name |
Description |
Terrain |
terrain |
|
IOnSceneGUI |
editContext |
|
System.Text.StringBuilder |
builder |
|
Implements
CalculateMouseDelta(Event, Single)
Declaration
protected static Vector2 CalculateMouseDelta(Event mouseEvent, float scale = 1F)
Parameters
Type |
Name |
Description |
Event |
mouseEvent |
|
System.Single |
scale |
|
Returns
CalculateMouseDeltaFromInitialPosition(Event, Single)
Declaration
protected Vector2 CalculateMouseDeltaFromInitialPosition(Event mouseEvent, float scale = 1F)
Parameters
Type |
Name |
Description |
Event |
mouseEvent |
|
System.Single |
scale |
|
Returns
GetEditorPrefs(String, Boolean)
Declaration
protected bool GetEditorPrefs(string name, bool defaultValue)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Boolean |
defaultValue |
|
Returns
Type |
Description |
System.Boolean |
|
GetEditorPrefs(String, Single)
Declaration
protected float GetEditorPrefs(string name, float defaultValue)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Single |
defaultValue |
|
Returns
Type |
Description |
System.Single |
|
LockTerrainUnderCursor(Boolean)
Declaration
public void LockTerrainUnderCursor(bool cursorVisible)
Parameters
Type |
Name |
Description |
System.Boolean |
cursorVisible |
|
Implements
OnBeginModifier()
Declaration
protected virtual bool OnBeginModifier()
Returns
Type |
Description |
System.Boolean |
|
OnEndModifier()
Declaration
protected virtual bool OnEndModifier()
Returns
Type |
Description |
System.Boolean |
|
Declaration
public virtual void OnEnterToolMode(BrushShortcutHandler<BrushShortcutType> shortcutHandler)
Parameters
Implements
Declaration
public virtual void OnExitToolMode(BrushShortcutHandler<BrushShortcutType> shortcutHandler)
Parameters
Implements
OnInspectorGUI(Terrain, IOnInspectorGUI)
Declaration
public virtual void OnInspectorGUI(Terrain terrain, IOnInspectorGUI editContext)
Parameters
Type |
Name |
Description |
Terrain |
terrain |
|
IOnInspectorGUI |
editContext |
|
Implements
OnModifierUsingMouseMove(Event, Terrain, IOnSceneGUI)
Declaration
protected virtual bool OnModifierUsingMouseMove(Event mouseEvent, Terrain terrain, IOnSceneGUI editContext)
Parameters
Type |
Name |
Description |
Event |
mouseEvent |
|
Terrain |
terrain |
|
IOnSceneGUI |
editContext |
|
Returns
Type |
Description |
System.Boolean |
|
OnModifierUsingMouseWheel(Event, Terrain, IOnSceneGUI)
Declaration
protected virtual bool OnModifierUsingMouseWheel(Event mouseEvent, Terrain terrain, IOnSceneGUI editContext)
Parameters
Type |
Name |
Description |
Event |
mouseEvent |
|
Terrain |
terrain |
|
IOnSceneGUI |
editContext |
|
Returns
Type |
Description |
System.Boolean |
|
OnPaint(Terrain, IOnPaint)
Declaration
public virtual bool OnPaint(Terrain terrain, IOnPaint editContext)
Parameters
Type |
Name |
Description |
Terrain |
terrain |
|
IOnPaint |
editContext |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
OnSceneGUI(Event, Int32, Terrain, IOnSceneGUI)
Declaration
public virtual void OnSceneGUI(Event currentEvent, int controlId, Terrain terrain, IOnSceneGUI editContext)
Parameters
Type |
Name |
Description |
Event |
currentEvent |
|
System.Int32 |
controlId |
|
Terrain |
terrain |
|
IOnSceneGUI |
editContext |
|
Implements
RequestRepaint()
Declaration
protected void RequestRepaint()
SetEditorPrefs(String, Boolean)
Declaration
protected void SetEditorPrefs(string name, bool currentValue)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Boolean |
currentValue |
|
SetEditorPrefs(String, Single)
Declaration
protected void SetEditorPrefs(string name, float currentValue)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Single |
currentValue |
|
UnlockTerrainUnderCursor()
Declaration
public void UnlockTerrainUnderCursor()
Implements