C# Class UnityEditor.ProBuilder.ProGridsInterface

Afficher le fichier Open project: Bala-7/CounterStrike Class Usage Examples

Méthodes publiques

Méthode Description
GetActiveGridAxis ( ) : HandleAxis
GetActiveGridOffset ( ) : float
GetPivot ( Vector3 &pivot ) : bool

Return the last known grid pivot point.

GetProGridsInstance ( ) : object
GetProGridsSnapAsGroup ( ) : bool
GetProGridsType ( ) : Type

Get a pg_Editor type.

GridVisible ( ) : bool

Is the grid visible?

IsFullGridEnabled ( ) : bool
OnHandleMove ( Vector3 worldDirection ) : void

Tell ProGrids that a non-Unity handle has moved in some direction (in world space).

ProGridsActive ( ) : bool

True if ProGrids is open in scene.

ProGridsSnap ( Vector3 point ) : Vector3

Snap a Vector3 to the nearest point on the current ProGrids grid if ProGrids is enabled.

ProGridsSnap ( Vector3 point, Vector3 mask ) : Vector3

Snap a Vector3 to the nearest point on the current ProGrids grid if ProGrids is enabled, with mask.

ProGridsSnap ( float point ) : float

Snap a Vector3 to the nearest point on the current ProGrids grid if ProGrids is enabled.

SceneToolbarIsExtended ( ) : bool

Is the scene toolbar extended or collapsed? Also check ProGridsActive to see if ProGrids is open in the first place.

SnapEnabled ( ) : bool

If ProGrids is open and snap enabled, return true. False otherwise.

SnapValue ( ) : float

Return the last known snap value setting from ProGrids.

SubscribePushToGridEvent ( Action listener ) : void

Subscribe to PushToGrid events.

SubscribeToolbarEvent ( Action listener ) : void

Subscribe to toolbar extendo/retracto events. Delegates are called with bool paramater Listener(bool menuOpen);

UnsubscribePushToGridEvent ( Action listener ) : void

Remove subscription from PushToGrid events.

UnsubscribeToolbarEvent ( Action listener ) : void

Remove subscription from extendo/retracto tooblar events.

UseAxisConstraints ( ) : bool

Returns the current UseAxisConstraints value from ProGrids.

Private Methods

Méthode Description
ProGridsInterface ( ) : UnityEngine

Method Details

GetActiveGridAxis() public static méthode

public static GetActiveGridAxis ( ) : HandleAxis
Résultat HandleAxis

GetActiveGridOffset() public static méthode

public static GetActiveGridOffset ( ) : float
Résultat float

GetPivot() public static méthode

Return the last known grid pivot point.
public static GetPivot ( Vector3 &pivot ) : bool
pivot Vector3
Résultat bool

GetProGridsInstance() public static méthode

public static GetProGridsInstance ( ) : object
Résultat object

GetProGridsSnapAsGroup() public static méthode

public static GetProGridsSnapAsGroup ( ) : bool
Résultat bool

GetProGridsType() public static méthode

Get a pg_Editor type.
public static GetProGridsType ( ) : Type
Résultat Type

GridVisible() public static méthode

Is the grid visible?
public static GridVisible ( ) : bool
Résultat bool

IsFullGridEnabled() public static méthode

public static IsFullGridEnabled ( ) : bool
Résultat bool

OnHandleMove() public static méthode

Tell ProGrids that a non-Unity handle has moved in some direction (in world space).
public static OnHandleMove ( Vector3 worldDirection ) : void
worldDirection Vector3
Résultat void

ProGridsActive() public static méthode

True if ProGrids is open in scene.
public static ProGridsActive ( ) : bool
Résultat bool

ProGridsSnap() public static méthode

Snap a Vector3 to the nearest point on the current ProGrids grid if ProGrids is enabled.
public static ProGridsSnap ( Vector3 point ) : Vector3
point Vector3
Résultat Vector3

ProGridsSnap() public static méthode

Snap a Vector3 to the nearest point on the current ProGrids grid if ProGrids is enabled, with mask.
public static ProGridsSnap ( Vector3 point, Vector3 mask ) : Vector3
point Vector3
mask Vector3
Résultat Vector3

ProGridsSnap() public static méthode

Snap a Vector3 to the nearest point on the current ProGrids grid if ProGrids is enabled.
public static ProGridsSnap ( float point ) : float
point float
Résultat float

SceneToolbarIsExtended() public static méthode

Is the scene toolbar extended or collapsed? Also check ProGridsActive to see if ProGrids is open in the first place.
public static SceneToolbarIsExtended ( ) : bool
Résultat bool

SnapEnabled() public static méthode

If ProGrids is open and snap enabled, return true. False otherwise.
public static SnapEnabled ( ) : bool
Résultat bool

SnapValue() public static méthode

Return the last known snap value setting from ProGrids.
public static SnapValue ( ) : float
Résultat float

SubscribePushToGridEvent() public static méthode

Subscribe to PushToGrid events.
public static SubscribePushToGridEvent ( Action listener ) : void
listener Action
Résultat void

SubscribeToolbarEvent() public static méthode

Subscribe to toolbar extendo/retracto events. Delegates are called with bool paramater Listener(bool menuOpen);
public static SubscribeToolbarEvent ( Action listener ) : void
listener Action
Résultat void

UnsubscribePushToGridEvent() public static méthode

Remove subscription from PushToGrid events.
public static UnsubscribePushToGridEvent ( Action listener ) : void
listener Action
Résultat void

UnsubscribeToolbarEvent() public static méthode

Remove subscription from extendo/retracto tooblar events.
public static UnsubscribeToolbarEvent ( Action listener ) : void
listener Action
Résultat void

UseAxisConstraints() public static méthode

Returns the current UseAxisConstraints value from ProGrids.
public static UseAxisConstraints ( ) : bool
Résultat bool