Unity.Manual.Scripts

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 2723

DownloadUnity.Manual.Scripts
Open PDF In BrowserView PDF
Leave feedback

Description
A class containing methods to assist with accessibility for users with di erent vision capabilities.

Static Methods
GetColorBlindSafePalette

Gets a palette of colors that should be distinguishable for normal vision,
deuteranopia, protanopia, and tritanopia.

Leave feedback

Description
Unity Ads.

Static Properties
debugMode

Controls the amount of logging output from the advertisement system.

gameId

Returns the game identi er for the current platform.

isInitialized

Returns whether the advertisement system is initialized successfully.

isShowing

Returns whether an advertisement is currently being shown.

isSupported

Returns if the current platform is supported by the advertisement system.

testMode

Returns whether the testing mode is enabled.

version

Returns the current Unity Ads version.

Static Methods
GetPlacementState

Returns the placement state.

Initialize

Manually initializes the advertisement system. Normally this is done from editor, and
you should only call this method if you are using UnityAds with automatic initialization
disabled.

IsReady

Returns whether an advertisement is ready to be shown. Placements are con gured per
game in the UnityAds admin site, where you can also set your default placement.

SetMetaData

Sets various metadata for Unity Ads.

Show

Show an advertisement in your project.

Leave feedback
Obsolete

Description
Player debug message level.

Leave feedback

Description
Class for sending various metadata to UnityAds.

Properties
category

Metadata category.

Values

Public Methods
Get
Set

Sets new metadata elds.

Leave feedback

Description
Collection of options that can be passed to Advertisements.Show to modify advertisement behaviour.

Properties
gamerSid

Add a string to specify an identi er for a speci c user in the game.

resultCallback

Callback to recieve the result of the advertisement.

Leave feedback

Description
Various states that Unity Ads placements can be in.

Properties
Ready

Placement is ready to be shown an advertisement from.

NotAvailable

Placement is not available.

Disabled

Placement has been disabled.

Waiting

Placement is waiting to be ready.

NoFill

Placement has no advertisements to show.

Leave feedback

Description
ShowResult is passed to ShowOptions.resultCallback after the advertisement has completed.

Properties
Failed

Indicates that the advertisement failed to complete.

Skipped

Indicates that the advertisement was skipped.

Finished

Indicates that the advertisement completed successfully.

Leave feedback

Description
Singleton class to access the baked NavMesh.
The NavMesh is a class can be used to do spatial queries, like path nding and walkability tests, set the path nding
cost for speci c area types, and to tweak global behavior of path nding and avoidance.
In order to use the spatial queries, you need to rst bake NavMesh for your Scene.
See also:
• Building a NavMesh – for more information on how to setup and bake NavMesh
• Areas and Costs – to learn how to use di erent Area types.
• NavMeshAgent – to learn how to control and move NavMesh Agents.
• NavMeshObstacle – to learn how to control NavMesh Obstacles using scripting.
• O MeshLink – to learn how to control O -Mesh Links using scripting.

Static Properties
AllAreas

Area mask constant that includes all NavMesh areas.

avoidancePredictionTime

Describes how far in the future the agents predict collisions for avoidance.

onPreUpdate

Set a function to be called before the NavMesh is updated during the frame
update execution.

path ndingIterationsPerFrame

The maximum amount of nodes processed each frame in the asynchronous
path nding process.

Static Methods
AddLink

Adds a link to the NavMesh. The link is described by the NavMeshLinkData struct.

AddNavMeshData

Adds the speci ed NavMeshData to the game.

CalculatePath

Calculate a path between two points and store the resulting path.

CalculateTriangulation

Calculates triangulation of the current navmesh.

CreateSettings

Creates and returns a new entry of NavMesh build settings available for runtime
NavMesh building.

FindClosestEdge

Locate the closest NavMesh edge from a point on the NavMesh.

GetAreaCost

Gets the cost for path nding over geometry of the area type.

GetAreaFromName

Returns the area index for a named NavMesh area type.

GetSettingsByID

Returns an existing entry of NavMesh build settings.

GetSettingsByIndex

Returns an existing entry of NavMesh build settings by its ordered index.

GetSettingsCount

Returns the number of registered NavMesh build settings.

GetSettingsNameFromID

Returns the name associated with the NavMesh build settings matching the
provided agent type ID.

Raycast

Trace a line between two points on the NavMesh.

RemoveAllNavMeshData

Removes all NavMesh surfaces and links from the game.

RemoveLink

Removes a link from the NavMesh.

RemoveNavMeshData

Removes the speci ed NavMeshDataInstance from the game, making it
unavailable for agents and queries.

RemoveSettings

Removes the build settings matching the agent type ID.

SamplePosition

Finds the closest point on NavMesh within speci ed range.

SetAreaCost

Sets the cost for nding path over geometry of the area type on all agents.

Delegates
OnNavMeshPreUpdate

A delegate which can be used to register callback methods to be invoked before the
NavMesh system updates.

Leave feedback

Description
Navigation mesh agent.
This component is attached to a mobile character in the game to allow it to navigate the Scene using the
NavMesh. See the Navigation section of the manual for further details.

Properties
acceleration

The maximum acceleration of an agent as it follows a path, given in units / sec^2.

agentTypeID

The type ID for the agent.

angularSpeed

Maximum turning speed in (deg/s) while following a path.

areaMask

Speci es which NavMesh areas are passable. Changing areaMask will make the
path stale (see isPathStale).

autoBraking

Should the agent brake automatically to avoid overshooting the destination
point?

autoRepath

Should the agent attempt to acquire a new path if the existing path becomes
invalid?

autoTraverseO MeshLink

Should the agent move across O MeshLinks automatically?

avoidancePriority

The avoidance priority level.

baseO set

The relative vertical displacement of the owning GameObject.

currentO MeshLinkData

The current O MeshLinkData.

desiredVelocity

The desired velocity of the agent including any potential contribution from
avoidance. (Read Only)

destination

Gets or attempts to set the destination of the agent in world-space units.

hasPath

Does the agent currently have a path? (Read Only)

height

The height of the agent for purposes of passing under obstacles, etc.

isOnNavMesh

Is the agent currently bound to the navmesh? (Read Only)

isOnO MeshLink

Is the agent currently positioned on an O MeshLink? (Read Only)

isPathStale

Is the current path stale. (Read Only)

isStopped

This property holds the stop or resume condition of the NavMesh agent.

navMeshOwner

Returns the owning object of the NavMesh the agent is currently placed on (Read

Only).
nextO MeshLinkData

The next O MeshLinkData on the current path.

nextPosition

Gets or sets the simulation position of the navmesh agent.

obstacleAvoidanceType

The level of quality of avoidance.

path

Property to get and set the current path.

pathPending

Is a path in the process of being computed but not yet ready? (Read Only)

pathStatus

The status of the current path (complete, partial or invalid).

radius

The avoidance radius for the agent.

remainingDistance

The distance between the agent's position and the destination on the current
path. (Read Only)

speed

Maximum movement speed when following a path.

steeringTarget

Get the current steering target along the path. (Read Only)

stoppingDistance

Stop within this distance from the target position.

updatePosition

Gets or sets whether the transform position is synchronized with the simulated
agent position. The default value is true.

updateRotation

Should the agent update the transform orientation?

updateUpAxis

Allows you to specify whether the agent should be aligned to the up-axis of the
NavMesh or link that it is placed on.

velocity

Access the current velocity of the NavMeshAgent component, or set a velocity to
control the agent manually.

Public Methods
ActivateCurrentO MeshLink

Enables or disables the current o -mesh link.

CalculatePath

Calculate a path to a speci ed point and store the resulting path.

CompleteO MeshLink

Completes the movement on the current O MeshLink.

FindClosestEdge

Locate the closest NavMesh edge.

GetAreaCost

Gets the cost for path calculation when crossing area of a particular type.

Move

Apply relative movement to current position.

Raycast

Trace a straight path towards a target postion in the NavMesh without moving
the agent.

ResetPath

Clears the current path.

SamplePathPosition

Sample a position along the current path.

SetAreaCost

Sets the cost for traversing over areas of the area type.

SetDestination

Sets or updates the destination thus triggering the calculation for a new path.

SetPath

Assign a new path to this agent.

Warp

Warps agent to the provided position.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
Specify which of the temporary data generated while building the NavMesh should be retained in memory after
the process has completed.
It is possible to collect and display in the Editor the intermediate data used in the process of building the
navigation mesh using the NavMeshBuilder. This can help with diagnosing those situations when the resulting
NavMesh isn’t of the expected shape.

Input Geometry, Regions, Polygonal Mesh Detail and Raw Contours shown after building the NavMesh with debug
options
The process for computing a NavMesh comprises of several sequential steps:
i. decomposing the Scene's terrain and meshes into triangles;
ii. rasterizing the input triangles into a 3D voxel representation and nding ledges;
iii. partitioning the voxels lying at the surface into simpler horizontal regions;
iv. nding a tight- tting contour for each of these regions;
v. simplifying the contours into polygonal shapes;
vi. creating a mesh of convex polygons based on all the contours combined;
vii. re ning the polygonal mesh into a triangulated version that approximates better the Scene's original
geometry.

Through the use of the debug functionality the results from each stage can be captured and displayed separately,
whereas normally they would get discarded when the NavMesh construction is completed.
Depending on the Scene composition this debug data can be considerably large in size. It is stored in memory in a
compressed manner but gets further expanded when being displayed.
Notes:
1. Unity does not save Debug visualizations - they are only available during the session in which Unity is building
the NavMesh.
2. Debug data is neither displayed nor collected for NavMeshes that are statically baked with the legacy system,
nor for any patches recomputed locally due to the presence of NavMesh Obstacles.
See Also: NavMeshBuildSettings, NavMeshBuilder.BuildNavMeshData, NavMeshEditorHelpers.DrawBuildDebug.

Properties
ags

Specify which types of debug data to collect when building the NavMesh.

Leave feedback

Description
Navigation mesh builder interface.
Note: There are two classes with the name NavMeshBuilder. They are declared in two di erent namespaces:
UnityEngine.AI and UnityEditor.AI. Their methods are all listed together on this page. The namespace is
indicated in parentheses next to each method.

Static Properties
isRunning

Returns true if an asynchronous build is still running. (UnityEditor)

Static Methods
BuildNavMesh

Build the Navmesh. (UnityEditor)

BuildNavMeshAsync

Build the Navmesh Asyncronously. (UnityEditor)

BuildNavMeshData

Builds a NavMesh data object from the provided input sources.
(UnityEngine)

BuildNavMeshForMultipleScenes

Builds the combined navmesh for the contents of multiple Scenes.
(UnityEditor)

Cancel

Cancel Navmesh construction. (UnityEditor) See Also:
NavMeshBuilder.BuildNavMeshAsync

ClearAllNavMeshes

Clear all Navmeshes. (UnityEditor)

CollectSources

For convenience, you can create a list of build sources directly from the
current geometry. (UnityEngine)

CollectSourcesInStage

Creates a list of build sources directly from the current geometry in the
speci ed editor stage. (UnityEditor)

UpdateNavMeshData

Incrementally updates the NavMeshData based on the sources.
(UnityEngine)

UpdateNavMeshDataAsync

Asynchronously and incrementally updates the NavMeshData based on
the sources. (UnityEngine)

Leave feedback

Description
The NavMesh build markup allows you to control how certain objects are treated during the NavMesh build
process, speci cally when collecting sources for building.
You can override the area type or specify that certain objects should be excluded from collected sources. The
markup is applied hierarchically. See Also: NavMeshBuilder.CollectSources.

Properties
area

The area type to use when override area is enabled.

ignoreFromBuild

Use this to specify whether the GameObject and its children should be ignored.

overrideArea

Use this to specify whether the area type of the GameObject and its children should be
overridden by the area type speci ed in this struct.

root

Use this to specify which GameObject (including the GameObject’s children) the markup
should be applied to.

Leave feedback

Description
The NavMeshBuildSettings struct allows you to specify a collection of settings which describe the dimensions and
limitations of a particular agent type.
You might want to de ne multiple NavMeshBuildSettings if your game involves characters with large di erences
in height, width or climbing ability.
You can also use this struct to control the precision and granularity of the build process, by setting the voxel and
tile sizes. Some of the values are coupled, meaning there are constraints on the values based on other values. For
example, it’s not valid for agentClimb to be larger than agentHeight. To help diagnose violations of these rules, a
special method ValidationReport can be evaluated.

Properties
agentClimb

The maximum vertical step size an agent can take.

agentHeight

The height of the agent for baking in world units.

agentRadius

The radius of the agent for baking in world units.

agentSlope

The maximum slope angle which is walkable (angle in degrees).

agentTypeID

The agent type ID the NavMesh will be baked for.

debug

Options for collecting debug data during the build process.

minRegionArea

The approximate minimum area of individual NavMesh regions.

overrideTileSize

Enables overriding the default tile size. See Also: tileSize.

overrideVoxelSize

Enables overriding the default voxel size. See Also: voxelSize.

tileSize

Sets the tile size in voxel units.

voxelSize

Sets the voxel size in world length units.

Public Methods
ValidationReport

Validates the properties of NavMeshBuildSettings.

Leave feedback

Description
The input to the NavMesh builder is a list of NavMesh build sources.
Their shape can be one of the following: mesh, terrain, box, sphere, or capsule. Each of them is described by a
NavMeshBuildSource struct.
You can specify a build source by lling a NavMeshBuildSource struct and adding that to the list of sources that
are passed to the bake function. Alternatively, you can use the collect API to quickly create NavMesh build sources
from available render meshes or physics colliders. See NavMeshBuilder.CollectSources.
If you use this function at runtime, any meshes with read/write access disabled will not be processed or included
in the nal NavMesh. See Mesh.isReadable.

using UnityEngine;
using UnityEngine.AI;

public class Example : MonoBehaviour
{
// Make a build source for a box in local space
public NavMeshBuildSource BoxSource10x10()
{
var src = new NavMeshBuildSource();
src.transform = transform.localToWorldMatrix;
src.shape = NavMeshBuildSourceShape.Box;
src.size = new Vector3(10.0f, 0.1f, 10.0f);
return src;
}
}

Properties
area

Describes the area type of the NavMesh surface for this object.

component

Points to the owning component - if available, otherwise null.

shape

The type of the shape this source describes. See Also: NavMeshBuildSourceShape.

size

Describes the dimensions of the shape.

sourceObject

Describes the object referenced for Mesh and Terrain types of input sources.

transform

Describes the local to world transformation matrix of the build source. That is, position
and orientation and scale of the shape.

Leave feedback

Description
Contains and represents NavMesh data.
An object of this class can be used for creating instances of NavMeshes. See NavMesh.AddNavMeshData. The
contained NavMesh can be built and updated using the build API. See NavMeshBuilder and methods therein.

Properties
position

Gets or sets the world space position of the NavMesh data.

rotation

Gets or sets the orientation of the NavMesh data.

sourceBounds

Returns the bounding volume of the input geometry used to build this NavMesh (Read
Only).

Constructors
NavMeshData

Constructs a new object for representing a NavMesh for the default agent type.

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
The instance is returned when adding NavMesh data.
A valid NavMesh data instance is available to the navigation system. This means you can calculate paths etc. using
that instance. You also need the instance if you want to remove the NavMesh data at a later time.
See Also: Remove, NavMesh.AddNavMeshData, NavMesh.RemoveNavMeshData.

Properties
owner

Get or set the owning Object.

valid

True if the NavMesh data is added to the navigation system - otherwise false (Read Only).

Public Methods
Remove

Removes this instance from the NavMesh system.

Leave feedback

Description
Result information for NavMesh queries.

Properties
distance

Distance to the point of hit.

hit

Flag set when hit.

mask

Mask specifying NavMesh area at point of hit.

normal

Normal at the point of hit.

position

Position of hit.

Leave feedback

Description
Used for runtime manipulation of links connecting polygons of the NavMesh.
A typical use case is to connect di erent navigation meshes. The link is described by the NavMeshLinkData struct.
The NavMesh Link is the scripting equivalent of the class-O MeshLink component – but allows for wide links as
opposed to just points.

Properties
agentTypeID

Speci es which agent type this link is available for.

area

Area type of the link.

bidirectional

If true, the link can be traversed in both directions, otherwise only from start to end
position.

costModi er

If positive, overrides the path nder cost to traverse the link.

endPosition

End position of the link.

startPosition

Start position of the link.

width

If positive, the link will be rectangle aligned along the line from start to end.

Leave feedback

Description
An instance representing a link available for path nding.
It can also be used for removing NavMesh links from the navigation system.

Properties
owner

Get or set the owning Object.

valid

True if the NavMesh link is added to the navigation system - otherwise false (Read Only).

Public Methods
Remove

Removes this instance from the game.

Leave feedback

Description
An obstacle for NavMeshAgents to avoid.
A NavMeshObstacle is cylindrical in shape and can move around the surface of the NavMesh with a speci ed
velocity. By default, the obstacle will only a ect the agent's avoidance behaviour rather than the path nding. This
means that the agent will ignore the obstacle when plotting a path but will sidestep around it while moving along
the path. If carving is enabled, the obstacle will create a temporary "hole" in the NavMesh. The hole will be
recognised by the path nding, so paths will be plotted to avoid the obstacle. This means that if, say, an obstacle
blocks a narrow gap, the path nding will seek an alternative route to the target. Without carving, the agent will
head for the gap but won't be able to pass until the obstacle is clear.
See Also: NavMeshAgent.

Properties
carveOnlyStationary

Should this obstacle be carved when it is constantly moving?

carving

Should this obstacle make a cut-out in the navmesh.

carvingMoveThreshold

Threshold distance for updating a moving carved hole (when carving is enabled).

carvingTimeToStationary

Time to wait until obstacle is treated as stationary (when carving and
carveOnlyStationary are enabled).

center

The center of the obstacle, measured in the object's local space.

height

Height of the obstacle's cylinder shape.

radius

Radius of the obstacle's capsule shape.

shape

The shape of the obstacle.

size

The size of the obstacle, measured in the object's local space.

velocity

Velocity at which the obstacle moves around the NavMesh.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
A path as calculated by the navigation system.
The path is represented as a list of waypoints stored in the corners array. These points are not set directly from
user scripts but a NavMeshPath with points correctly assigned is returned by the NavMesh.CalculatePath function
and the NavMeshAgent.path property.

Properties
corners

Corner points of the path. (Read Only)

status

Status of the path. (Read Only)

Constructors
NavMeshPath

NavMeshPath constructor.

Public Methods
ClearCorners

Erase all corner points from path.

GetCornersNonAlloc

Calculate the corners for the path.

Leave feedback

Description
Speci es which agent type and areas to consider when searching the NavMesh.
This struct is used with the NavMesh query methods overloaded with the query lter argument. See Also:
NavMesh.CalculatePath, NavMesh.Raycast, NavMesh.FindClosestEdge, NavMesh.SamplePosition.

Properties
agentTypeID

The agent type ID, specifying which navigation meshes to consider for the query
functions.

areaMask

A bitmask representing the traversable area types.

Public Methods
GetAreaCost

Returns the area cost multiplier for the given area type for this lter.

SetAreaCost

Sets the path nding cost multiplier for this lter for a given area type.

Leave feedback

Description
Contains data describing a triangulation of a navmesh.

Properties
areas

NavMesh area indices for the navmesh triangulation.

indices

Triangle indices for the navmesh triangulation.

vertices

Vertices for the navmesh triangulation.

Leave feedback

Description
Link allowing movement outside the planar navigation mesh.

Properties
activated

Is link active.

area

NavMesh area index for this O MeshLink component.

autoUpdatePositions

Automatically update endpoints.

biDirectional

Can link be traversed in both directions.

costOverride

Modify path nding cost for the link.

endTransform

The transform representing link end position.

occupied

Is link occupied. (Read Only)

startTransform

The transform representing link start position.

Public Methods
UpdatePositions

Explicitly update the link endpoints.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods

BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
State of O MeshLink.

Properties
activated

Is link active (Read Only).

endPos

Link end world position (Read Only).

linkType

Link type speci er (Read Only).

o MeshLink

The O MeshLink if the link type is a manually placed O meshlink (Read Only).

startPos

Link start world position (Read Only).

valid

Is link valid (Read Only).

Leave feedback

Description
Bitmask used for operating with debug data from the NavMesh build process.
Used in two situations:
- within NavMeshBuildSettings.debug to specify which debug data to retain after the build process has completed,
preserving the world position and orientation;
- as a parameter of NavMeshEditorHelpers.DrawBuildDebug to control which of the available debug data types to
display for a speci ed NavMesh.
See Also: NavMeshBuildSettings.

Properties
None

No debug data from the NavMesh build process is taken into consideration.

InputGeometry

The triangles of all the geometry that is used as a base for computing the new
NavMesh.

Voxels

The voxels produced by rasterizing the source geometry into walkable and
unwalkable areas.

Regions

The segmentation of the traversable surfaces into smaller areas necessary for
producing simple polygons.

RawContours

The contours that follow precisely the edges of each surface region.

Simpli edContours

Contours bounding each of the surface regions, described through fewer vertices and
straighter edges compared to RawContours.

PolygonMeshes

Meshes of convex polygons constructed within the uni ed contours of adjacent
regions.

PolygonMeshesDetail

The triangulated meshes with height details that better approximate the source
geometry.

All

All debug data from the NavMesh build process is taken into consideration.

Leave feedback

Description
Used with NavMeshBuildSource to de ne the shape for building NavMesh.

Properties
Mesh

Describes a Mesh source for use with NavMeshBuildSource.

Terrain

Describes a TerrainData source for use with NavMeshBuildSource.

Box

Describes a box primitive for use with NavMeshBuildSource.

Sphere

Describes a sphere primitive for use with NavMeshBuildSource.

Capsule

Describes a capsule primitive for use with NavMeshBuildSource.

Modi erBox

Describes a Modi erBox source for use with NavMeshBuildSource.

Leave feedback

Description
Used for specifying the type of geometry to collect. Used with NavMeshBuilder.CollectSources.

Properties
RenderMeshes

Collect meshes form the rendered geometry.

PhysicsColliders

Collect geometry from the 3D physics collision representation.

Leave feedback

Description
Shape of the obstacle.

Properties
Capsule

Capsule shaped obstacle.

Box

Box shaped obstacle.

Leave feedback

Description
Status of path.

Properties
PathComplete

The path terminates at the destination.

PathPartial

The path cannot reach the destination.

PathInvalid

The path is invalid.

Leave feedback

Description
Level of obstacle avoidance.

Properties
NoObstacleAvoidance

Disable avoidance.

LowQualityObstacleAvoidance

Enable simple avoidance. Low performance impact.

MedQualityObstacleAvoidance

Medium avoidance. Medium performance impact.

GoodQualityObstacleAvoidance

Good avoidance. High performance impact.

HighQualityObstacleAvoidance

Enable highest precision. Highest performance impact.

Leave feedback

Description
Link type speci er.

Properties
LinkTypeManual

Manually speci ed type of link.

LinkTypeDropDown

Vertical drop.

LinkTypeJumpAcross

Horizontal jump.

Leave feedback

Description
Unity Analytics provides insight into your game users e.g. DAU, MAU.
Note: The documentation that follows is for usage of Unity Analytics with Unity 5.1 and above. To integrate Unity
Analytics with earlier versions of Unity, refer to the documentation at https://analytics.cloud.unity3d.com/docs
Speci cally, out-of-the-box features include access to user engagement and retention data through Metric
Monitor and Data Explorer. Segmentation of players across various user dimensions and characteristics is
automatically applied, with more than 20 standard segments available without any additional instrumentation.
For more detail around features, refer to the Unity Analytics homepage at http://unity3d.com/unity/analytics.

Static Properties
deviceStatsEnabled

Controls whether the sending of device stats at runtime is enabled.

enabled

Controls whether the Analytics service is enabled at runtime.

limitUserTracking

Controls whether to limit user tracking at runtime.

Static Methods
CustomEvent

Custom Events (optional).

FlushEvents

Attempts to ush immediately all queued analytics events to the network and lesystem
cache if possible (optional).

RegisterEvent

This API is used for registering a Runtime Analytics event. It is meant for internal use only
and is likely to change in the future. User code should never use this API.

SendEvent

This API is used to send a Runtime Analytics event. It is meant for internal use only and is
likely to change in the future. User code should never use this API.

SetUserBirthYear

User Demographics (optional).

SetUserGender

User Demographics (optional).

SetUserId

User Demographics (optional).

Transaction

Tracking Monetization (optional).

Leave feedback

Description
The main class of the Unity Analytics Standard Event SDK.
The event methods in this class provide ' re and forget' ease of use, allowing you to send a standard event with a
single line of code. If you expect to be sending the same standard event with some amount of frequency, you may
want to create an event payload and invoke the Send method when the event occurs. The event methods in this
class provide " re and forget" ease of use, allowing you to send a standard event with a single line of code. If you
expect to be sending the same standard event with some amount of frequency, you may want to create an event
payload and invoke the Send method when the event occurs.

Static Properties
debugMode

Gets or sets a value indicating whether debug mode is enabled.

sdkVersion

Gets the Unity Analytics Standard Event SDK version.

Static Methods
AchievementStep

Sends a achievement_step event.

AchievementUnlocked

Sends a achievement_unlocked event.

AdComplete

Sends a ad_complete event.

AdO er

Sends a ad_o er event.

AdSkip

Sends a ad_skip event.

AdStart

Sends a ad_start event.

ChatMessageSent

Sends a chat_message_sent event.

Custom

Sends a custom event (eventName) with data (eventData)

CustomEvent

Sends a custom event.

CutsceneSkip

Sends a cutscene_skip event.

CutsceneStart

Sends a cutscene_start event.

FirstInteraction

Sends a rst_interaction event.

GameOver

Sends a game_over event.

GameStart

Sends a game_start event.

IAPTransaction

Sends a iap_transaction event.

ItemAcquired

Sends a item_acquired event.

ItemSpent

Sends a item_spent event.

LevelComplete

Sends a level_complete event.

LevelFail

Sends a level_fail event.

LevelQuit

Sends a level_quit event.

LevelSkip

Sends a level_skip event.

LevelStart

Sends a level_start event.

LevelUp

Sends a level_up event.

PostAdAction

Sends a post_ad_action event.

PushNoti cationClick

Sends a push_noti cation_click event.

PushNoti cationEnable

Sends a push_noti cation_enable event.

ScreenVisit

Sends a screen_visit event.

SocialShare

Sends a social_share event.

SocialShareAccept

Sends a social_share_accept event.

StoreItemClick

Sends a store_item_click event.

StoreOpened

Sends a store_opened event.

TutorialComplete

Sends a tutorial_complete event.

TutorialSkip

Sends a tutorial_skip event.

TutorialStart

Sends a tutorial_start event.

TutorialStep

Sends a tutorial_step event.

UserSignup

Sends a user_signup event.

Leave feedback

Description
Provides access to the Analytics session information for the current game instance.
This class contains static methods for looking up Analytics session information. Note that cumulative statistics are
reset if the player re-installs the game.

using
using
using
using
using

System.Collections;
System.Collections.Generic;
UnityEngine;
UnityEngine.Analytics;
System;

public class NewBehaviourScript : MonoBehaviour
{
void Start()
{
Debug.Log("Start
" + AnalyticsSessionInfo.userId + " " + AnalyticsSess
AnalyticsSessionInfo.sessionStateChanged += OnSessionStateChanged;
}

void OnSessionStateChanged(AnalyticsSessionState sessionState, long sessionI
{
Debug.Log("Call
" + AnalyticsSessionInfo.userId + " " + sessionState
}
}

Static Properties
sessionCount

The number of sessions played since the app was installed.

sessionElapsedTime

The time elapsed, in milliseconds, since the beginning of the current game session.

sessionFirstRun

Reports whether the current session is the rst session since the player installed the
game or application.

sessionId

A random, unique GUID identifying the current game or app session.

sessionState

The current state of the session.

userId

A random GUID uniquely identifying sessions played on the same instance of your

game or app.

Events
sessionStateChanged

Dispatched when the Analytics session state changes.

Delegates
SessionStateChanged

Dispatched when the Analytics session state changes.

Leave feedback
Obsolete

Description
Automatically create and send analytics events based on a variety of triggers.
Set event name, parameter names, and automatically use parameter values either from properties of attached
Components or from literal values. Send the instrumented event.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with

Network.Instantiate.
OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Unity Performace provides insight into your game performace.

Static Properties
enabled

Controls whether the Performance Reporting service is enabled at runtime.

graphicsInitializationFinishTime

Time taken to initialize graphics in microseconds, measured from
application startup.

Leave feedback

Description
The source through which an item, consumable, or currency was acquired.

Properties
None

No available source, or source unknown. Note: Use a string value if the acquisition source
is not one of the elements de ned in this enumeration.

Store

Purchased using currency or consumable resources.

Earned

Awarded through an achievement or other in-game interaction.

Promotion

Granted as a promotion of some in-game feature or through cross promotion.

Gift

Granted without motive other than good feelings.

RewardedAd

Granted as a reward for watching an advertisement.

TimedReward

Granted periodically.

SocialReward

Granted through social engagement.

Leave feedback

Description
The type of currency (premium or soft) used to acquire the item.
See Also: AnalyticsEvent.ItemAcquired.

Properties
Soft

Not directly purchased with real-world money.

Premium

Purchased with real-world money.

Leave feedback

Description
The list of advertising or mediation network service providers.
Use the members of this list when possible to promote consistency in your Analytics data. However, if the
advertising network is not included in this list, pass the argument to the Standard Event function as a string.
See Also: AnalyticsEvent.AdComplete, AnalyticsEvent.AdO er, AnalyticsEvent.AdSkip, AnalyticsEvent.AdStart,
AnalyticsEvent.PostAdAction.

Properties
None

No available network, or network unknown. Note: Use a string value to indicate a network
not de ned in this enumeration.

Aarki

Aarki network.

AdAction

AdAction network.

AdapTv

AdapTv network.

Adcash

Adcash network.

AdColony

AdColony network.

AdMob

AdMob network.

AerServ

AerServ network.

Airpush

Airpush network.

Altrooz

Altrooz network.

Ampush

Ampush network.

AppleSearch

AppleSearch network.

AppLift

AppLift network.

AppLovin

AppLovin network.

Appnext

Appnext network.

AppNexus

AppNexus network.

Appoday

Appoday network.

Appodeal

Appodeal network.

AppsUnion

AppsUnion network.

Avazu

Avazu network.

BlueStacks

BlueStacks network.

Chartboost

Chartboost network.

ClickDealer

ClickDealer network.

CPAlead

CPAlead network.

CrossChannel

CrossChannel network.

CrossInstall

CrossInstall network.

Epom

Epom network.

Facebook

Facebook network.

Fetch

Fetch network.

Fiksu

Fiksu network.

Flurry

Flurry network.

Fuse

Fuse network.

Fyber

Fyber network.

Glispa

Glispa network.

Google

Google network.

GrowMobile

GrowMobile network.

HeyZap

HeyZap network.

HyperMX

HyperMX network.

Iddiction

Iddiction network.

IndexExchange

IndexExchange network.

InMobi

InMobi network.

Instagram

Instagram network.

Instal

Instal network.

Ipsos

Ipsos network.

IronSource

IronSource network.

Jirbo

Jirbo network.

Kimia

Kimia network.

Leadbolt

Leadbolt network.

Lifto

Lifto network.

Manage

Manage network.

Matomy

Matomy network.

MediaBrix

MediaBrix network.

MillenialMedia

MillenialMedia network.

Minimob

Minimob network.

MobAir

MobAir network.

MobileCore

MobileCore network.

Mobobeat

Mobobeat network.

Mobusi

Mobusi network.

Mobvista

Mobvista network.

MoPub

MoPub network.

Motive

Motive network.

Msales

Msales network.

NativeX

NativeX network.

OpenX

OpenX network.

Pandora

Pandora network.

PropellerAds

PropellerAds network.

Revmob

Revmob network.

RubiconProject

RubiconProject network.

SiriusAd

SiriusAd network.

Smaato

Smaato network.

SponsorPay

SponsorPay network.

SpotXchange

SpotXchange network.

StartApp

StartApp network.

Tapjoy

Tapjoy network.

Taptica

Taptica network.

Tremor

Tremor network.

TrialPay

TrialPay network.

Twitter

Twitter network.

UnityAds

UnityAds network.

Vungle

Vungle network.

Yeahmobi

Yeahmobi network.

YuMe

YuMe network.

Leave feedback

Description
Analytics API result.

Properties
Ok

Analytics API result: Success.

NotInitialized

Analytics API result: Analytics not initialized.

AnalyticsDisabled

Analytics API result: Analytics is disabled.

TooManyItems

Analytics API result: Too many parameters.

SizeLimitReached

Analytics API result: Argument size limit.

TooManyRequests

Analytics API result: Too many requests.

InvalidData

Analytics API result: Invalid argument value.

UnsupportedPlatform

Analytics API result: This platform doesn't support Analytics.

Leave feedback

Description
Session tracking states.

Properties
kSessionStopped

Session tracking has stopped.

kSessionStarted

Session tracking has started.

kSessionPaused

Session tracking has paused.

kSessionResumed

Session tracking has resumed.

Leave feedback

Description
The list of authorization networks for in-game login sessions.
Use the members of this list when possible to promote consistency in your Analytics data. However, if the
authorization network is not included in this list, pass the argument to the Standard Event function as a string.
See Also: AnalyticsEvent.UserSignup.

Properties
None

No available authorization network, or network unknown. Note: Use a string value to
indicate an authorization network not de ned in this enumeration.

Internal

You use your own authorization system.

Facebook

Facebook authorization.

Twitter

Twitter authorization.

Google

Google authorization.

GameCenter

GameCenter authorization.

Leave feedback

Description
User Demographics: Gender of a user.

Properties
Male

User Demographics: Male Gender of a user.

Female

User Demographics: Female Gender of a user.

Unknown

User Demographics: Unknown Gender of a user.

Leave feedback

Description
The list of the in-game screen or interface types.
Use the members of this list when possible to promote consistency in your Analytics data. However, if the screen
name is not included in this list, pass the argument to the Standard Event function as a string.
See Also: AnalyticsEvent.ScreenVisit.

Properties
None

No de ned screen name. Note: Use a string value to indicate a screen name not de ned
in this enumeration.

MainMenu

The game's main menu screen.

Settings

The game's settings screen.

Map

The game's map screen.

Lose

The screen shown when the player loses the game.

Win

The screen shown when the player wins the game.

Credits

The game's credits screen.

Title

The game's title screen.

IAPPromo

The screen shown for IAP promotions.

CrossPromo

The screen shown for cross promotions.

FeaturePromo

The screen shown for feature promotions.

Hint

The game's hint screen.

Pause

The game's pause screen.

Inventory

The game's inventory screen.

Leaderboard

The game's leaderboard screen.

Achievements

The game's achievement screen.

Lobby

The game's lobby screen.

Leave feedback

Description
The list of media types or modes used for social engagements.
Use the members of this list when possible to promote consistency in your Analytics data. However, if the media
type or mode is not included in this list, pass the argument to the Standard Event function as a string.
See Also: AnalyticsEvent.SocialShare, AnalyticsEvent.SocialShareAccept.

Properties
None

No de ned engagement media or mode. Note: Use a string value to indicate a mode of
social engagement not de ned in this enumeration.

TextOnly

A text-based mode of engagement, such as a text or chat message.

Image

An image-based mode of engagement.

Video

A video-based mode of engagement.

Invite

A mode of engagement that involves an invitation.

Achievement

An in-game achievement.

Leave feedback

Description
The list of social networks used with social engagements.
Use the members of this list when possible to promote consistency in your Analytics data. However, if the social
network is not included in this list, pass the argument to the Standard Event function as a string.
See Also: AnalyticsEvent.SocialShare, AnalyticsEvent.SocialShareAccept.

Properties
None

No available social network, or network unknown. Note: Use a string value to indicate
social network not de ned in this enumeration.

Facebook

Facebook.

Twitter

Twitter.

Instagram

Instagram.

GooglePlus

Google Plus.

Pinterest

Pinterest.

WeChat

WeChat.

SinaWeibo

The Sina Weibo social network.

TencentWeibo

The Tencent Weibo social network.

QQ

QQ and QZone networks.

Zhihu

Zhihu network.

VK

VKontakte network.

OK_ru

Odnoklassniki network.

Leave feedback

Description
The list of in-game store categories.
See Also: AnalyticsEvent.StoreItemClick, AnalyticsEvent.StoreOpened

Properties
Soft

Contains items purchasable with in-game currency only.

Premium

Contains items purchasable with real-world money.

Leave feedback
Implements interfaces:IConstraint

Description
Constrains the orientation of an object relative to the position of one or more source objects, such that the object
is facing the average position of the sources.

Properties
aimVector

The axis towards which the constrained object orients.

constraintActive

Activates or deactivates the constraint.

locked

Locks the o set and rotation at rest.

rotationAtRest

The rotation used when the sources have a total weight of 0.

rotationAxis

The axes a ected by the AimConstraint.

rotationO set

Represents an o set from the constrained orientation.

sourceCount

The number of sources set on the component (read-only).

upVector

The up vector.

weight

The weight of the constraint component.

worldUpObject

The world up object, used to calculate the world up vector when the world up Type is
AimConstraint.WorldUpType.ObjectUp or AimConstraint.WorldUpType.ObjectRotationUp.

worldUpType

The type of the world up vector.

worldUpVector

The world up Vector used when the world up type is AimConstraint.WorldUpType.Vector
or AimConstraint.WorldUpType.ObjectRotationUp.

Public Methods
AddSource

Adds a constraint source.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

RemoveSource

Removes a source from the component.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
Speci es how the world up vector used by the aim constraint is de ned.

Properties
SceneUp

Uses and de nes the world up vector as the Unity Scene up vector (the Y axis).

ObjectUp

Uses and de nes the world up vector as a vector from the constrained object, in the
direction of the up object.

ObjectRotationUp

Uses and de nes the world up vector as relative to the local space of the object.

Vector

Uses and de nes the world up vector as a vector speci ed by the user.

None

Neither de nes nor uses a world up vector.

Leave feedback
Implements interfaces:IPlayable

Description
A Playable that controls an AnimationClip.
NOTE: You can use PlayableExtensions methods with AnimationClipPlayable objects.

Public Methods
GetAnimationClip

Returns the AnimationClip stored in the AnimationClipPlayable.

GetApplyFootIK

Returns the state of the ApplyFootIK ag.

GetApplyPlayableIK

Returns the state of the ApplyPlayableIK ag.

SetApplyFootIK

Sets the value of the ApplyFootIK ag.

SetApplyPlayableIK

Requests OnAnimatorIK to be called on the animated GameObject.

Static Methods
Create

Creates an AnimationClipPlayable in the PlayableGraph.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that controls an animation layer mixer.
NOTE: You can use PlayableExtensions methods with AnimationLayerMixerPlayable objects.

Static Properties
Null

Returns an invalid AnimationLayerMixerPlayable.

Public Methods
IsLayerAdditive

Returns true if the layer is additive, false otherwise.

SetLayerAdditive

Speci es whether a layer is additive or not. Additive layers blend with
previous layers.

SetLayerMaskFromAvatarMask

Sets the mask for the current layer.

Static Methods
Create

Creates an AnimationLayerMixerPlayable in the PlayableGraph.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that controls an animation mixer.
NOTE: You can use PlayableExtensions methods with AnimationMixerPlayable objects.

Static Properties
Null

Returns an invalid AnimationMixerPlayable.

Static Methods
Create

Creates an AnimationMixerPlayable in the PlayableGraph.

Leave feedback

Description
A PlayableBinding that contains information representing an AnimationPlayableOutput.

Static Methods
Create

Creates a PlayableBinding that contains information representing an
AnimationPlayableOutput.

Leave feedback
Implements interfaces:IPlayableOutput

Description
A IPlayableOutput implementation that connects the PlayableGraph to an Animator in the Scene.
NOTE: You can use PlayableOutputExtensions methods on AnimationPlayableOutput objects.

Public Methods
GetTarget

Returns the Animator that plays the animation graph.

SetTarget

Sets the Animator that plays the animation graph.

Static Methods
Create

Creates an AnimationPlayableOutput in the PlayableGraph.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that controls an animation RuntimeAnimatorController.
NOTE: You can use PlayableExtensions methods with AnimatorControllerPlayable objects.

Static Properties
Null

Returns an invalid AnimatorControllerPlayable.

Static Methods
Create

Creates an AnimatorControllerPlayable in the PlayableGraph.

Leave feedback

Description
Represents a source for the constraint.

Properties
sourceTransform

The transform component of the source object.

weight

The weight of the source in the evaluation of the constraint.

Leave feedback
Implements interfaces:IConstraint

Description
Constrains the orientation of an object relative to the position of one or more source objects, such that the object
is facing the average position of the sources. The LookAtConstraint is a simpli ed AimConstraint typically used
with a Camera.

Properties
constraintActive

Activates or deactivates the constraint.

locked

Locks the o set and rotation at rest.

roll

The rotation angle along the z axis of the object. The constraint uses this property to
calculate the world up vector when Animations.LookAtConstraint.UseUpObject is false.

rotationAtRest

The rotation used when the sources have a total weight of 0.

rotationO set

Represents an o set from the constrained orientation.

sourceCount

The number of sources set on the component (Read Only).

useUpObject

Determines how the up vector is calculated.

weight

The weight of the constraint component.

worldUpObject

The world up object, used to calculate the world up vector when
Animations.LookAtConstraint.UseUpObject is true.

Public Methods
AddSource

Adds a constraint source.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

RemoveSource

Removes a source from the component.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

Inherited Members
Properties

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy

instead.
DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback
Implements interfaces:IConstraint

Description
Constrains the orientation and translation of an object to one or more source objects. The constrained object
behaves as if it is in the hierarchy of the sources.

Properties
constraintActive

Activates or deactivates the constraint.

locked

Locks the o sets and position (translation and rotation) at rest.

rotationAtRest

The rotation used when the sources have a total weight of 0.

rotationAxis

The rotation axes a ected by the ParentConstraint.

rotationO sets

The rotation o sets from the constrained orientation.

sourceCount

The number of sources set on the component (read-only).

translationAtRest

The position of the object in local space, used when the sources have a total weight of 0.

translationAxis

The translation axes a ected by the ParentConstraint.

translationO sets

The translation o sets from the constrained orientation.

weight

The weight of the constraint component.

Public Methods
AddSource

Adds a constraint source.

GetRotationO set

Gets the rotation o set associated with a source by index.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

GetTranslationO set

Gets the rotation o set associated with a source by index.

RemoveSource

Removes a source from the component.

SetRotationO set

Sets the rotation o set associated with a source by index.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

SetTranslationO set

Sets the translation o set associated with a source by index.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback
Implements interfaces:IConstraint

Description
Constrains the position of an object relative to the position of one or more source objects.

Properties
constraintActive

Activates or deactivates the constraint.

locked

Locks the o set and position at rest.

sourceCount

The number of sources set on the component (read-only).

translationAtRest

The translation used when the sources have a total weight of 0.

translationAxis

The axes a ected by the PositionConstraint.

translationO set

The o set from the constrained position.

weight

The weight of the constraint component.

Public Methods
AddSource

Adds a constraint source.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

RemoveSource

Removes a source from the component.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback
Implements interfaces:IConstraint

Description
Constrains the rotation of an object relative to the rotation of one or more source objects.

Properties
constraintActive

Activates or deactivates the constraint.

locked

Locks the o set and rotation at rest.

rotationAtRest

The rotation used when the sources have a total weight of 0.

rotationAxis

The axes a ected by the RotationConstraint.

rotationO set

The o set from the constrained rotation.

sourceCount

The number of sources set on the component (read-only).

weight

The weight of the constraint component.

Public Methods
AddSource

Adds a constraint source.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

RemoveSource

Removes a source from the component.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback
Implements interfaces:IConstraint

Description
Constrains the scale of an object relative to the scale of one or more source objects.

Properties
constraintActive

Activates or deactivates the constraint.

locked

Locks the o set and scale at rest.

scaleAtRest

The scale used when the sources have a total weight of 0.

scaleO set

The o set from the constrained scale.

scalingAxis

The axes a ected by the ScaleConstraint.

sourceCount

The number of sources set on the component (read-only).

weight

The weight of the constraint component.

Public Methods
AddSource

Adds a constraint source.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

RemoveSource

Removes a source from the component.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
The common interface for constraint components.

Properties
constraintActive

Activate or deactivate the constraint.

locked

Lock or unlock the o set and position at rest.

sourceCount

Gets the number of sources currently set on the component.

weight

The weight of the constraint component.

Public Methods
AddSource

Add a constraint source.

GetSource

Gets a constraint source by index.

GetSources

Gets the list of sources.

RemoveSource

Removes a source from the component.

SetSource

Sets a source at a speci ed index.

SetSources

Sets the list of sources on the component.

Leave feedback

Description
Represents the axes used in 3D space.

Properties
None

Represents the case when no axis is speci ed.

X

Represents the X axis.

Y

Represents the Y axis.

Z

Represents the Z axis.

Leave feedback

Description
ReplayKit is only available on certain iPhone, iPad and iPod Touch devices running iOS 9.0 or later.
ReplayKit allows you to record the audio and video of your game, along with user commentary through the
microphone. Start a recording with the StartRecording() function, and stop it with StopRecording(). You can
preview the recording with the Preview() function, which launches a separate video viewer.
Note: The exact Apple devices which have support for ReplayKit are:
1. iPhone 5S or later
2. iPad mini 2 or later
3. iPod Touch 6th generation
4. iPad Air or later.

using System;
using UnityEngine;
#if PLATFORM_IOS
using UnityEngine.iOS;
using UnityEngine.Apple.ReplayKit;

public class Replay : MonoBehaviour
{
string lastError = "";
void OnGUI()
{
if (!ReplayKit.APIAvailable)
{
return;
}
var recording = ReplayKit.isRecording;
string caption = recording ? "Stop Recording" : "Start Recording";
if (GUI.Button(new Rect(10, 10, 500, 200), caption))
{
try
{
recording = !recording;
if (recording)
{
ReplayKit.StartRecording();
}
else
{

ReplayKit.StopRecording();
}
}
catch (Exception e)
{
lastError = e.ToString();
}
}

GUI.Label(new Rect(10, 220, 500, 50), "Last error: " + ReplayKit.lastErr
GUI.Label(new Rect(10, 280, 500, 50), "Last exception: " + lastError);

if (ReplayKit.recordingAvailable)
{
if (GUI.Button(new Rect(10, 350, 500, 200), "Preview"))
{
ReplayKit.Preview();
}
if (GUI.Button(new Rect(10, 560, 500, 200), "Discard"))
{
ReplayKit.Discard();
}
}
}
}
#endif

Static Properties
APIAvailable

A boolean that indicates whether the ReplayKit API is available (where True means
available). (Read Only)

broadcastingAPIAvailable

A Boolean that indicates whether ReplayKit broadcasting API is available (true
means available) (Read Only). Check the value of this property before making
ReplayKit broadcasting API calls. On iOS versions prior to iOS 10, this property will
have a value of false.

broadcastURL

A string property that contains an URL used to redirect the user to an on-going or
completed broadcast (Read Only).

cameraEnabled

Camera enabled status, true, if camera enabled, false otherwise.

isBroadcasting

Boolean property that indicates whether a broadcast is currently in progress
(Read Only).

isRecording

A boolean that indicates whether ReplayKit is making a recording (where True
means a recording is in progress). (Read Only)

lastError

A string value of the last error incurred by the ReplayKit: Either 'Failed to get
Screen Recorder' or 'No recording available'. (Read Only)

microphoneEnabled

Microphone enabled status, true, if microhone enabled, false otherwise.

recordingAvailable

A boolean value that indicates that a new recording is available for preview (where
True means available). (Read Only)

Static Methods
Discard

Discard the current recording.

HideCameraPreview

Hide the camera preview view.

Preview

Preview the current recording

ShowCameraPreviewAt

Shows camera preview at coordinates posX and posY.

StartBroadcasting

Initiates and starts a new broadcast When StartBroadcast is called, user is presented
with a broadcast provider selection screen, and then a broadcast setup screen.
Once it is nished, a broadcast will be started, and the callback will be invoked. It will
also be invoked in case of any error.

StartRecording

Start a new recording.

StopBroadcasting

Stops current broadcast. Will terminate currently on-going broadcast. If no
broadcast is in progress, does nothing.

StopRecording

Stop the current recording.

Delegates
BroadcastStatusCallback

Function called at the completion of broadcast startup.

Leave feedback

Description
A oat comparer used by Assert performing approximate comparison.

Static Properties
kEpsilon

Default epsilon used by the comparer.

s_ComparerWithDefaultTolerance

Default instance of a comparer class with deafult error epsilon and
absolute error check.

Constructors
FloatComparer

Creates an instance of the comparer.

Static Methods
AreEqual

Performs equality check with absolute error check.

AreEqualRelative

Performs equality check with relative error check.

Leave feedback
Obsolete

Description
An extension class that serves as a wrapper for the Assert class.
The MustExtension class wraps the Assertion.Assert into a more readable and shorter syntax.

using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.Assertions.Must;

public class ExampleClass : MonoBehaviour
{
public int health;
public GameObject go;
void Update()
{
//This assertion
Assert.AreNotEqual(0, health);
//can be also written like this
health.MustNotBeEqual(0);

//Same with this assertion
Assert.IsTrue(go.activeInHierarchy);
//can be also written like this
go.activeInHierarchy.MustBeTrue();
}
}

Leave feedback

Description
The Assert class contains assertion methods for setting invariants in the code.
All method calls will be conditionally included only in the development builds, unless explicitly speci ed (see
BuildOptions.ForceEnableAssertions). The inclusion of the assertions is controlled by UNITY_ASSERTIONS de ne.
A failure of an assertion method does not break the control ow of the execution. On a failure, an assertion
message is logged (LogType.Assert) and the execution continues. If Assert.raiseExceptions is set to true, an
AssertionException is thrown instead of logging a message.
If a debugger is attached to the project (System.Diagnostics.Debugger.IsAttached is true), AssertionException will
be thrown in order to pause the excecution and invoke the debugger.

using UnityEngine;
using UnityEngine.Assertions;

public class AssertionExampleClass : MonoBehaviour
{
public int health;
public GameObject go;

void Update()
{
// You expect the health never to be equal to zero
Assert.AreNotEqual(0, health);

// The referenced GameObject should be always (in every frame) be active
Assert.IsTrue(go.activeInHierarchy);
}
}

Static Properties
raiseExceptions

Whether Unity should throw an exception on a failure.

Static Methods

AreApproximatelyEqual

Asserts that the values are approximately equal. An absolute error check is used
for approximate equality check (|a-b| < tolerance). Default tolerance is
0.00001f.Note: Every time you call the method with tolerance speci ed, a new
instance of FloatComparer is created. For performance reasons you might want
to instance your own comparer and pass it to the AreEqual method. If the
tolerance is not speci es, a default comparer is used and the issue does not
occur.

AreEqual

Asserts that the values are equal. If no comparer is speci ed,
EqualityComparer.Default is used.

AreNotApproximatelyEqual

Asserts that the values are approximately not equal. An absolute error check is
used for approximate equality check (|a-b| < tolerance). Default tolerance is
0.00001f.

AreNotEqual

Asserts that the values are not equal.

IsFalse

Asserts that the condition is false.

IsNotNull

Asserts that the value is not null.

IsNull

Asserts that the value is null.

IsTrue

Asserts that the condition is true.

Leave feedback

Description
An exception that is thrown on a failure. Assert.raiseExceptions needs to be set to true.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that controls an AudioClip.
NOTE: You can use PlayableExtensions methods with AudioClipPlayable objects.

Static Methods
Create

Creates an AudioClipPlayable in the PlayableGraph.

Leave feedback

Description
AudioMixer asset.
This is a singleton representing a speci c audio mixer asset in the project.

Properties
outputAudioMixerGroup

Routing target.

updateMode

How time should progress for this AudioMixer. Used during Snapshot transitions.

Public Methods
ClearFloat

Resets an exposed parameter to its initial value.

FindMatchingGroups

Connected groups in the mixer form a path from the mixer's master group to the
leaves. This path has the format "Master Group/Child of Master Group/Grandchild of
Master Group", so to nd the grandchild group in this example, a valid search string
would be for instance "randchi" which would return exactly one group while "hild" or
"oup/" would return 2 di erent groups.

FindSnapshot

The name must be an exact match.

GetFloat

Returns the value of the exposed parameter speci ed. If the parameter doesn't exist
the function returns false. Prior to calling SetFloat and after ClearFloat has been
called on this parameter the value returned will be that of the current snapshot or
snapshot transition.

SetFloat

Sets the value of the exposed parameter speci ed. When a parameter is exposed, it
is not controlled by mixer snapshots and can therefore only be changed via this
function.

TransitionToSnapshots

Transitions to a weighted mixture of the snapshots speci ed. This can be used for
games that specify the game state as a continuum between states or for
interpolating snapshots from a triangulated map location.

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
Object representing a group in the mixer.

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that controls an audio mixer.
NOTE: You can use PlayableExtensions methods with AudioMixerPlayable objects.

Leave feedback

Description
Object representing a snapshot in the mixer.

Public Methods
TransitionTo

Performs an interpolated transition towards this snapshot over the time interval speci ed.

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
A PlayableBinding that contains information representing an AudioPlayableOutput.

Static Methods
Create

Creates a PlayableBinding that contains information representing an
AudioPlayableOutput.

Leave feedback
Implements interfaces:IPlayableOutput

Description
A IPlayableOutput implementation that will be used to play audio.
NOTE: You can use PlayableOutputExtensions methods with AudioPlayableOutput objects.

Static Properties
Null

Returns an invalid AudioPlayableOutput.

Public Methods
GetEvaluateOnSeek

Gets the state of output playback when seeking.

SetEvaluateOnSeek

Controls whether the output should play when seeking.

Static Methods
Create

Creates an AudioPlayableOutput in the PlayableGraph.

Leave feedback

Description
The mode in which an AudioMixer should update its time.
Use this with AudioMixer.updateMode to de ne how the AudioMixer time is updated.

Properties
Normal

Update the AudioMixer with scaled game time.

UnscaledTime

Update the AudioMixer with unscaled realtime.

Leave feedback

Description
Engine API for CrashReporting Service.

Static Properties
enableCaptureExceptions

This Boolean eld will cause CrashReportHandler to capture exceptions when set
to true. By default enable capture exceptions is true.

logBu erSize

The Performance Reporting service will keep a bu er of up to the last X log
messages (Debug.Log, etc) to send along with crash reports. The default is 10 log
messages, the max is 50. Set this to 0 to disable capture of logs with your crash
reports.

Static Methods
GetUserMetadata

Get a custom crash report metadata eld that has been set.

SetUserMetadata

Set a custom metadata key-value pair to be included with crash reports.

Leave feedback

Description
A zero argument persistent callback that can be saved with the Scene.

using UnityEngine;
using UnityEngine.Events;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
UnityEvent m_MyEvent;

void Start()
{
if (m_MyEvent == null)
m_MyEvent = new UnityEvent();

m_MyEvent.AddListener(Ping);
}

void Update()
{
if (Input.anyKeyDown && m_MyEvent != null)
{
m_MyEvent.Invoke();
}
}

void Ping()
{
Debug.Log("Ping");
}
}

Constructors

UnityEvent

Constructor.

Public Methods
AddListener

Add a non persistent listener to the UnityEvent.

Invoke

Invoke all registered callbacks (runtime and persistent).

RemoveListener

Remove a non persistent listener from the UnityEvent.

Inherited Members
Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback

Description
One argument version of UnityEvent.
If you wish to use a generic UnityEvent type you must override the class type.

using UnityEngine;
using UnityEngine.Events;

[System.Serializable]
public class MyIntEvent : UnityEvent
{
}

public class ExampleClass : MonoBehaviour
{
public MyIntEvent m_MyEvent;

void Start()
{
if (m_MyEvent == null)
m_MyEvent = new MyIntEvent();

m_MyEvent.AddListener(Ping);
}

void Update()
{
if (Input.anyKeyDown && m_MyEvent != null)
{
m_MyEvent.Invoke(5);
}
}

void Ping(int i)
{
Debug.Log("Ping" + i);

}
}

Inherited Members
Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback

Description
Two argument version of UnityEvent.
If you wish to use a generic UnityEvent type you must override the class type.

using UnityEngine;
using UnityEngine.Events;

[System.Serializable]
public class MyIntEvent : UnityEvent
{
}

public class ExampleClass : MonoBehaviour
{
public MyIntEvent m_MyEvent;

void Start()
{
if (m_MyEvent == null)
m_MyEvent = new MyIntEvent();

m_MyEvent.AddListener(Ping);
}

void Update()
{
if (Input.anyKeyDown && m_MyEvent != null)
{
m_MyEvent.Invoke(5, 6);
}
}

void Ping(int i, int j)
{
Debug.Log("Ping" + i + ", " + j);

}
}

Inherited Members
Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback

Description
Three argument version of UnityEvent.
If you wish to use a generic UnityEvent type you must override the class type.

using UnityEngine;
using UnityEngine.Events;

[System.Serializable]
public class MyIntEvent : UnityEvent
{
}

public class ExampleClass : MonoBehaviour
{
public MyIntEvent m_MyEvent;

void Start()
{
if (m_MyEvent == null)
m_MyEvent = new MyIntEvent();

m_MyEvent.AddListener(Ping);
}

void Update()
{
if (Input.anyKeyDown && m_MyEvent != null)
{
m_MyEvent.Invoke(5, 6, 7);
}
}

void Ping(int i, int j, int k)
{
Debug.Log("Ping" + i + j + k);

}
}

Inherited Members
Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback

Description
Four argument version of UnityEvent.
If you wish to use a generic UnityEvent type you must override the class type.

using UnityEngine;
using UnityEngine.Events;

[System.Serializable]
public class MyIntEvent : UnityEvent
{
}

public class ExampleClass : MonoBehaviour
{
public MyIntEvent m_MyEvent;

void Start()
{
if (m_MyEvent == null)
m_MyEvent = new MyIntEvent();

m_MyEvent.AddListener(Ping);
}

void Update()
{
if (Input.anyKeyDown && m_MyEvent != null)
{
m_MyEvent.Invoke(5, 6, 7, 8);
}
}

void Ping(int i, int j, int k, int l)
{

Debug.Log("Ping" + i + j + k + l);
}
}

Inherited Members
Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback
Implements interfaces:ISerializationCallbackReceiver

Description
Abstract base class for UnityEvents.
This class provides the base functionality for the UnityEvents.

Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback

Description
THe mode that a listener is operating in.

Properties
EventDe ned

The listener will use the function binding speci ed by the even.

Void

The listener will bind to zero argument functions.

Object

The listener will bind to one argument Object functions.

Int

The listener will bind to one argument int functions.

Float

The listener will bind to one argument oat functions.

String

The listener will bind to one argument string functions.

Bool

The listener will bind to one argument bool functions.

Leave feedback

Description
Controls the scope of UnityEvent callbacks.

Properties
O

Callback is not issued.

EditorAndRuntime

Callback is always issued.

RuntimeOnly

Callback is only issued in the Runtime and Editor playmode.

Leave feedback

Description
A class that can be used for sending simple events via the event system.

Properties
used

Is the event used?

Public Methods
Reset

Reset the event.

Use

Use the event.

Leave feedback

Description
Event Data associated with Axis Events (Controller / Keyboard).
See Also: BaseEventData.

Properties
moveDir

MoveDirection for this event.

moveVector

Raw input vector associated with this event.

Inherited Members
Properties
used

Is the event used?

currentInputModule

A reference to the BaseInputModule that sent this event.

selectedObject

The object currently considered selected by the EventSystem.

Public Methods
Reset

Reset the event.

Use

Use the event.

Leave feedback

Description
A class that contains the base event data that is common to all event types in the new EventSystem.

Properties
currentInputModule

A reference to the BaseInputModule that sent this event.

selectedObject

The object currently considered selected by the EventSystem.

Constructors
BaseEventData

Construct a BaseEventData tied to the passed EventSystem.

Inherited Members
Properties
used

Is the event used?

Public Methods
Reset

Reset the event.

Use

Use the event.

Leave feedback

Description
Interface to the Input system used by the BaseInputModule. With this it is possible to bypass the Input system
with your own but still use the same InputModule. For example this can be used to feed fake input into the UI or
interface with a di erent input system.

Properties
compositionCursorPos

Interface to Input.compositionCursorPos. Can be overridden to provide custom
input instead of using the Input class.

compositionString

Interface to Input.compositionString. Can be overridden to provide custom input
instead of using the Input class.

imeCompositionMode

Interface to Input.imeCompositionMode. Can be overridden to provide custom input
instead of using the Input class.

mousePosition

Interface to Input.mousePosition. Can be overridden to provide custom input
instead of using the Input class.

mousePresent

Interface to Input.mousePresent. Can be overridden to provide custom input instead
of using the Input class.

mouseScrollDelta

Interface to Input.mouseScrollDelta. Can be overridden to provide custom input
instead of using the Input class.

touchCount

Interface to Input.touchCount. Can be overridden to provide custom input instead of
using the Input class.

touchSupported

Interface to Input.touchSupported. Can be overridden to provide custom input
instead of using the Input class.

Public Methods
GetAxisRaw

Interface to Input.GetAxisRaw. Can be overridden to provide custom input instead of
using the Input class.

GetButtonDown

Interface to Input.GetButtonDown. Can be overridden to provide custom input
instead of using the Input class.

GetMouseButton

Interface to Input.GetMouseButton. Can be overridden to provide custom input
instead of using the Input class.

GetMouseButtonDown

Interface to Input.GetMouseButtonDown. Can be overridden to provide custom
input instead of using the Input class.

GetMouseButtonUp

Interface to Input.GetMouseButtonUp. Can be overridden to provide custom input
instead of using the Input class.

GetTouch

Interface to Input.GetTouch. Can be overridden to provide custom input instead of
using the Input class.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
A base module that raises events and sends them to GameObjects.
An Input Module is a component of the EventSystem that is responsible for raising events and sending them to
GameObjects for handling. The BaseInputModule is a class that all Input Modules in the EventSystem inherit
from. Examples of provided modules are TouchInputModule and StandaloneInputModule, if these are inadequate
for your project you can create your own by extending from the BaseInputModule.

using UnityEngine;
using UnityEngine.EventSystems;

// Create a module that every tick sends a 'Move' event to
// the target object

public class MyInputModule : BaseInputModule
{
public GameObject m_TargetObject;

public override void Process()
{
if (m_TargetObject == null)
return;
ExecuteEvents.Execute(m_TargetObject, new BaseEventData(eventSystem), Ex
}
}

Properties
input

The current BaseInput being used by the input module.

inputOverride

Used to override the default BaseInput for the input module.

Public Methods
ActivateModule

Called when the module is activated. Override this if you want custom code to
execute when you activate your module.

DeactivateModule

Called when the module is deactivated. Override this if you want custom code to
execute when you deactivate your module.

IsModuleSupported

Check to see if the module is supported. Override this if you have a platfrom
speci c module (eg. TouchInputModule that you do not want to activate on
standalone.

IsPointerOverGameObject

Is the pointer with the given ID over an EventSystem object?

Process

Process the current tick for the module.

ShouldActivateModule

Should be activated.

UpdateModule

Update the internal state of the Module.

Protected Methods
GetAxisEventData

Given some input data generate an AxisEventData that can be used by the event
system.

GetBaseEventData

Generate a BaseEventData that can be used by the EventSystem.

HandlePointerExitAndEnter

Handle sending enter and exit events when a new enter target is found.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

Static Methods
DetermineMoveDirection

Given an input movement, determine the best MoveDirection.

FindCommonRoot

Given 2 GameObjects, return a common root GameObject (or null).

FindFirstRaycast

Return the rst valid RaycastResult.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine

running on this behaviour.
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with

Network.Instantiate.
OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Base class for any RayCaster.
A Raycaster is responsible for raycasting against Scene elements to determine if the cursor is over them. Default
Raycasters include PhysicsRaycaster, Physics2DRaycaster, GraphicRaycaster.
Custom raycasters can be added by extending this class.

Properties
eventCamera

The camera that will generate rays for this raycaster.

renderOrderPriority

Priority of the raycaster based upon render order.

sortOrderPriority

Priority of the raycaster based upon sort order.

Public Methods
Raycast

Raycast against the Scene.

Protected Methods
OnDisable

See MonoBehaviour.OnDisable.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Handles input, raycasting, and sending events.
The EventSystem is responsible for processing and handling events in a Unity Scene. A Scene should only contain
one EventSystem. The EventSystem works in conjunction with a number of modules and mostly just holds state
and delegates functionality to speci c, overrideable components.
When the EventSystem is started it searches for any BaseInputModules attached to the same GameObject and
adds them to an internal list. On update each attached module receives an UpdateModules call, where the
module can modify internal state. After each module has been Updated the active module has the Process call
executed. This is where custom module processing can take place.

Static Properties
current

Return the current EventSystem.

Properties
alreadySelecting

Returns true if the EventSystem is already in a SetSelectedGameObject.

currentInputModule

The currently active BaseInputModule.

currentSelectedGameObject

The GameObject currently considered active by the EventSystem.

rstSelectedGameObject

The GameObject that was selected rst.

isFocused

Flag to say whether the EventSystem thinks it should be paused or not based
upon focused state.

pixelDragThreshold

The soft area for dragging in pixels.

sendNavigationEvents

Should the EventSystem allow navigation events (move / submit / cancel).

Public Methods
IsPointerOverGameObject

Is the pointer with the given ID over an EventSystem object?

RaycastAll

Raycast into the Scene using all con gured BaseRaycasters.

SetSelectedGameObject

Set the GameObject as selected. Will send an OnDeselect the the old selected
object and OnSelect to the new selected object.

UpdateModules

Recalculate the internal list of BaseInputModules.

Protected Methods
OnDisable

See MonoBehaviour.OnDisable.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game

object.
SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback
Implements interfaces:IBeginDragHandler, ICancelHandler, IDeselectHandler, IDragHandler, IDropHandler,
IEndDragHandler, IEventSystemHandler, IInitializePotentialDragHandler, IMoveHandler, IPointerClickHandler,
IPointerDownHandler, IPointerEnterHandler, IPointerExitHandler, IPointerUpHandler, IScrollHandler,
ISelectHandler, ISubmitHandler, IUpdateSelectedHandler

Description
Receives events from the EventSystem and calls registered functions for each event.
The EventTrigger can be used to specify functions you wish to be called for each EventSystem event. You can
assign multiple functions to a single event and whenever the EventTrigger receives that event it will call those
functions in the order they were provided.
NOTE: Attaching this component to a GameObject will make that object intercept ALL events, and no events will
propagate to parent objects.
There are two ways to intercept events: You could extend EventTrigger, and override the functions for the events
you are interested in intercepting; as shown in this example:

using UnityEngine;
using UnityEngine.EventSystems;

public class EventTriggerExample : EventTrigger
{
public override void OnBeginDrag(PointerEventData data)
{
Debug.Log("OnBeginDrag called.");
}

public override void OnCancel(BaseEventData data)
{
Debug.Log("OnCancel called.");
}

public override void OnDeselect(BaseEventData data)
{
Debug.Log("OnDeselect called.");
}

public override void OnDrag(PointerEventData data)

{
Debug.Log("OnDrag called.");
}

public override void OnDrop(PointerEventData data)
{
Debug.Log("OnDrop called.");
}

public override void OnEndDrag(PointerEventData data)
{
Debug.Log("OnEndDrag called.");
}

public override void OnInitializePotentialDrag(PointerEventData data)
{
Debug.Log("OnInitializePotentialDrag called.");
}

public override void OnMove(AxisEventData data)
{
Debug.Log("OnMove called.");
}

public override void OnPointerClick(PointerEventData data)
{
Debug.Log("OnPointerClick called.");
}

public override void OnPointerDown(PointerEventData data)
{
Debug.Log("OnPointerDown called.");
}

public override void OnPointerEnter(PointerEventData data)
{
Debug.Log("OnPointerEnter called.");
}

public override void OnPointerExit(PointerEventData data)
{
Debug.Log("OnPointerExit called.");
}

public override void OnPointerUp(PointerEventData data)
{
Debug.Log("OnPointerUp called.");
}

public override void OnScroll(PointerEventData data)
{
Debug.Log("OnScroll called.");
}

public override void OnSelect(BaseEventData data)
{
Debug.Log("OnSelect called.");
}

public override void OnSubmit(BaseEventData data)
{
Debug.Log("OnSubmit called.");
}

public override void OnUpdateSelected(BaseEventData data)
{
Debug.Log("OnUpdateSelected called.");
}
}

...or you can specify individual delegates:

using UnityEngine;
using UnityEngine.EventSystems;

public class EventTriggerDelegateExample : MonoBehaviour
{
void Start()
{
EventTrigger trigger = GetComponent();
EventTrigger.Entry entry = new EventTrigger.Entry();
entry.eventID = EventTriggerType.PointerDown;
entry.callback.AddListener((data) => { OnPointerDownDelegate((PointerEve
trigger.triggers.Add(entry);
}

public void OnPointerDownDelegate(PointerEventData data)
{
Debug.Log("OnPointerDownDelegate called.");
}
}

Properties
triggers

All the functions registered in this EventTrigger.

Public Methods
OnBeginDrag

Called before a drag is started.

OnCancel

Called by the EventSystem when a Cancel event occurs.

OnDeselect

Called by the EventSystem when a new object is being selected.

OnDrag

Called by the EventSystem every time the pointer is moved during dragging.

OnDrop

Called by the EventSystem when an object accepts a drop.

OnEndDrag

Called by the EventSystem once dragging ends.

OnInitializePotentialDrag

Called by the EventSystem when a drag has been found, but before it is valid to
begin the drag.

OnMove

Called by the EventSystem when a Move event occurs.

OnPointerClick

Called by the EventSystem when a Click event occurs.

OnPointerDown

Called by the EventSystem when a PointerDown event occurs.

OnPointerEnter

Called by the EventSystem when the pointer enters the object associated with this
EventTrigger.

OnPointerExit

Called by the EventSystem when the pointer exits the object associated with this
EventTrigger.

OnPointerUp

Called by the EventSystem when a PointerUp event occurs.

OnScroll

Called by the EventSystem when a Scroll event occurs.

OnSelect

Called by the EventSystem when a Select event occurs.

OnSubmit

Called by the EventSystem when a Submit event occurs.

OnUpdateSelected

Called by the EventSystem when the object associated with this EventTrigger is
updated.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators

p
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this

object's collider (2D physics only).
OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over

the same GUIElement or Collider as it was pressed.
OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
An Entry in the EventSystem delegates list.
It stores the callback and which event type should this callback be red.

Properties
callback

The desired TriggerEvent to be Invoked.

eventID

What type of event is the associated callback listening for.

Leave feedback

Description
UnityEvent class for Triggers.
See EventTrigger for example usage.

Inherited Members
Public Methods
GetPersistentEventCount

Get the number of registered persistent listeners.

GetPersistentMethodName

Get the target method name of the listener at index index.

GetPersistentTarget

Get the target component of the listener at index index.

RemoveAllListeners

Remove all non-persisent (ie created from script) listeners from the event.

SetPersistentListenerState

Modify the execution state of a persistent listener.

Static Methods
GetValidMethodInfo

Given an object, function name, and a list of argument types; nd the method that
matches.

Leave feedback

Description
Helper class that can be used to send IEventSystemHandler events to GameObjects.

Static Properties
beginDragHandler

IBeginDragHandler execute helper function.

cancelHandler

ICancelHandler execute helper function.

deselectHandler

IDeselectHandler execute helper function.

dragHandler

IDragHandler execute helper function.

dropHandler

IDropHandler execute helper function.

endDragHandler

IEndDragHandler execute helper function.

initializePotentialDrag

IInitializePotentialDragHandler execute helper function.

moveHandler

IMoveHandler execute helper function.

pointerClickHandler

IPointerClickHandler execute helper function.

pointerDownHandler

IPointerDownHandler execute helper function.

pointerEnterHandler

IPointerEnterHandler execute helper function.

pointerExitHandler

IPointerExitHandler execute helper function.

pointerUpHandler

IPointerUpHandler execute helper function.

scrollHandler

IScrollHandler execute helper function.

selectHandler

ISelectHandler execute helper function.

submitHandler

ISubmitHandler execute helper function.

updateSelectedHandler

IUpdateSelectedHandler execute helper function.

Static Methods
CanHandleEvent

Can the given GameObject handle the IEventSystemHandler of type T.

Execute

Execute the event of type T : IEventSystemHandler on GameObject.

ExecuteHierarchy

Recurse up the hierarchy calling Execute until there is a GameObject that can handle
the event.

GetEventHandler

Traverse the object hierarchy starting at root, and return the GameObject which
implements the event handler of type .

ValidateEventData

Attempt to convert the data to type T. If conversion fails an ArgumentException is
thrown.

Delegates
EventFunction

Function de nition for an EventFunction that is used to map a given EventInterface into
a speci c event call.

Leave feedback

Description
Raycaster for casting against 2D Physics components.
See: BaseRaycaster.

Public Methods
Raycast

See: BaseRaycaster.

Inherited Members
Properties
eventCamera

The camera that will generate rays for this raycaster.

renderOrderPriority

Priority of the raycaster based upon render order.

sortOrderPriority

Priority of the raycaster based upon sort order.

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

depth

Get the depth of the con gured camera.

eventCamera

Get the camera that is used for this module.

eventMask

Mask of allowed raycast events.

nalEventMask
maxRayIntersections

Logical and of Camera mask and eventMask.
Max number of ray intersection allowed to be found.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
OnDisable

See MonoBehaviour.OnDisable.

ComputeRayAndDistance

Returns a ray going from camera through the event position and the
distance between the near and far clipping planes along that ray.

Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators

bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this

object's collider (2D physics only).
OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over

the same GUIElement or Collider as it was pressed.
OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Raycaster for casting against 3D Physics components.
See: BaseRaycaster.

Properties
depth

Get the depth of the con gured camera.

eventCamera

Get the camera that is used for this module.

eventMask

Mask of allowed raycast events.

nalEventMask

Logical and of Camera mask and eventMask.

maxRayIntersections

Max number of ray intersection allowed to be found.

Public Methods
Raycast

See: BaseRaycaster.

Protected Methods
ComputeRayAndDistance

Returns a ray going from camera through the event position and the distance
between the near and far clipping planes along that ray.

Inherited Members
Properties
eventCamera

The camera that will generate rays for this raycaster.

renderOrderPriority

Priority of the raycaster based upon render order.

sortOrderPriority

Priority of the raycaster based upon sort order.

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine

running on this behaviour.
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
OnDisable

See MonoBehaviour.OnDisable.

Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this

object (2D physics only).
OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Event payload associated with pointer (mouse / touch) events.

Properties
button

The InputButton for this event.

clickCount

Number of clicks in a row.

clickTime

The last time a click event was sent.

delta

Pointer delta since last update.

dragging

Is a drag operation currently occuring.

enterEventCamera

The camera associated with the last OnPointerEnter event.

hovered

List of objects in the hover stack.

lastPress

The GameObject for the last press event.

pointerCurrentRaycast

RaycastResult associated with the current event.

pointerDrag

The object that is receiving OnDrag.

pointerEnter

The object that received 'OnPointerEnter'.

pointerId

Identi cation of the pointer.

pointerPress

The GameObject that received the OnPointerDown.

pointerPressRaycast

RaycastResult associated with the pointer press.

position

Current pointer position.

pressEventCamera

The camera associated with the last OnPointerPress event.

pressPosition

The screen space coordinates of the last pointer click.

rawPointerPress

The object that the press happened on even if it can not handle the press event.

scrollDelta

The amount of scroll since the last update.

useDragThreshold

Should a drag threshold be used?

Public Methods
IsPointerMoving

Is the pointer moving.

IsScrolling

Is scroll being used on the input device.

Inherited Members
Properties
used

Is the event used?

currentInputModule

A reference to the BaseInputModule that sent this event.

selectedObject

The object currently considered selected by the EventSystem.

Public Methods
Reset

Reset the event.

Use

Use the event.

Leave feedback

Description
The state of a press for the given frame.

Properties
Pressed

Button was pressed this frame.

Released

Button was released this frame.

PressedAndReleased

Button was pressed and released this frame.

NotChanged

Same as last frame.

Leave feedback

Description
Input press tracking.

Properties
Left

Left button.

Right

Right button.

Middle

Middle button.

Leave feedback

Description
A BaseInputModule for pointer input.
Used by TouchInputModule and StandaloneInputModule.

Static Properties
kFakeTouchesId

Touch id for when simulating touches on a non touch device.

kMouseLeftId

Id of the cached left mouse pointer event.

kMouseMiddleId

Id of the cached middle mouse pointer event.

kMouseRightId

Id of the cached right mouse pointer event.

Protected Methods
ClearSelection

Clear all pointers and deselect any selected objects in the EventSystem.

CopyFromTo

Copy one PointerEventData to another.

DeselectIfSelectionChanged

Deselect the current selected GameObject if the currently pointed-at
GameObject is di erent.

GetLastPointerEventData

Return the last PointerEventData for the given touch / mouse id.

GetMousePointerEventData

Return the current MouseState.

GetPointerData

Search the cache for currently active pointers, return true if found.

GetTouchPointerEventData

Given a touch populate the PointerEventData and return if we are pressed or
released.

ProcessDrag

Process the drag for the current frame with the given pointer event.

ProcessMove

Process movement for the current frame with the given pointer event.

RemovePointerData

Remove the PointerEventData from the cache.

StateForMouseButton

Given a mouse button return the current state for the frame.

Inherited Members
Properties
input

The current BaseInput being used by the input module.

inputOverride

Used to override the default BaseInput for the input module.

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
ActivateModule

Called when the module is activated. Override this if you want custom code to
execute when you activate your module.

DeactivateModule

Called when the module is deactivated. Override this if you want custom code to
execute when you deactivate your module.

IsModuleSupported

Check to see if the module is supported. Override this if you have a platfrom
speci c module (eg. TouchInputModule that you do not want to activate on
standalone.

IsPointerOverGameObject

Is the pointer with the given ID over an EventSystem object?

Process

Process the current tick for the module.

ShouldActivateModule

Should be activated.

UpdateModule

Update the internal state of the Module.

BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children

using depth rst search.
GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
GetAxisEventData

Given some input data generate an AxisEventData that can be used by
the event system.

GetBaseEventData

Generate a BaseEventData that can be used by the EventSystem.

HandlePointerExitAndEnter

Handle sending enter and exit events when a new enter target is
found.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
DetermineMoveDirection

Given an input movement, determine the best MoveDirection.

FindCommonRoot

Given 2 GameObjects, return a common root GameObject (or null).

FindFirstRaycast

Return the rst valid RaycastResult.

print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use
Destroy instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new
Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Information about a mouse button event.

Properties
buttonData

Pointer data associated with the mouse event.

buttonState

The state of the button this frame.

Public Methods
PressedThisFrame

Was the button pressed this frame?

ReleasedThisFrame

Was the button released this frame?

Leave feedback

Description
A hit result from a BaseRaycaster.

Properties
depth

The relative depth of the element.

distance

Distance to the hit.

gameObject

The GameObject that was hit by the raycast.

index

Hit index.

isValid

Is there an associated module and a hit GameObject.

module

BaseInputModule that raised the hit.

screenPosition

The screen position from which the raycast was generated.

sortingLayer

The SortingLayer of the hit object.

sortingOrder

The SortingOrder for the hit object.

worldNormal

The normal at the hit location of the raycast.

worldPosition

The world position of the where the raycast has hit.

Public Methods
Clear

Reset the result.

Leave feedback

Description
A BaseInputModule designed for mouse / keyboard / controller input.
Input module for working with, mouse, keyboard, or controller.

Properties
cancelButton

Input manager name for the 'cancel' button.

forceModuleActive

Force this module to be active.

horizontalAxis

Input manager name for the horizontal axis button.

inputActionsPerSecond

Number of keyboard / controller inputs allowed per second.

repeatDelay

Delay in seconds before the input actions per second repeat rate takes e ect.

submitButton

Maximum number of input events handled per second.

verticalAxis

Input manager name for the vertical axis.

Public Methods
ActivateModule

See BaseInputModule.

DeactivateModule

See BaseInputModule.

IsModuleSupported

See BaseInputModule.

Process

See BaseInputModule.

ShouldActivateModule

See BaseInputModule.

UpdateModule

See BaseInputModule.

Protected Methods
ProcessMouseEvent

Iterate through all the di erent mouse events.

ProcessMousePress

Calculate and process any mouse button state changes.

ProcessTouchPress

This method is called by Unity whenever a touch event is processed.
Override this method with a custom implementation to process touch
events yourself.

SendMoveEventToSelectedObject

Calculate and send a move event to the current selected object.

SendSubmitEventToSelectedObject

Calculate and send a submit event to the current selected object.

SendUpdateEventToSelectedObject

Send a update event to the currently selected object.

Inherited Members
Static Properties
kFakeTouchesId

Touch id for when simulating touches on a non touch device.

kMouseLeftId

Id of the cached left mouse pointer event.

kMouseMiddleId

Id of the cached middle mouse pointer event.

kMouseRightId

Id of the cached right mouse pointer event.

Properties
input

The current BaseInput being used by the input module.

inputOverride

Used to override the default BaseInput for the input module.

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
IsPointerOverGameObject

Is the pointer with the given ID over an EventSystem object?

BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
GetAxisEventData

Given some input data generate an AxisEventData that can be used by
the event system.

GetBaseEventData

Generate a BaseEventData that can be used by the EventSystem.

HandlePointerExitAndEnter

Handle sending enter and exit events when a new enter target is
found.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

ClearSelection

Clear all pointers and deselect any selected objects in the
EventSystem.

CopyFromTo

Copy one PointerEventData to another.

DeselectIfSelectionChanged

Deselect the current selected GameObject if the currently pointed-at
GameObject is di erent.

GetLastPointerEventData

Return the last PointerEventData for the given touch / mouse id.

GetMousePointerEventData

Return the current MouseState.

GetPointerData

Search the cache for currently active pointers, return true if found.

GetTouchPointerEventData

Given a touch populate the PointerEventData and return if we are
pressed or released.

ProcessDrag

Process the drag for the current frame with the given pointer event.

ProcessMove

Process movement for the current frame with the given pointer event.

RemovePointerData

Remove the PointerEventData from the cache.

StateForMouseButton

Given a mouse button return the current state for the frame.

Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
DetermineMoveDirection

Given an input movement, determine the best MoveDirection.

FindCommonRoot

Given 2 GameObjects, return a common root GameObject (or null).

FindFirstRaycast

Return the rst valid RaycastResult.

print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use
Destroy instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new
Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback
Obsolete

Description
Input module used for touch based input.

Inherited Members
Static Properties
kFakeTouchesId

Touch id for when simulating touches on a non touch device.

kMouseLeftId

Id of the cached left mouse pointer event.

kMouseMiddleId

Id of the cached middle mouse pointer event.

kMouseRightId

Id of the cached right mouse pointer event.

Properties
input

The current BaseInput being used by the input module.

inputOverride

Used to override the default BaseInput for the input module.

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
ActivateModule

Called when the module is activated. Override this if you want custom code to
execute when you activate your module.

DeactivateModule

Called when the module is deactivated. Override this if you want custom code to
execute when you deactivate your module.

IsModuleSupported

Check to see if the module is supported. Override this if you have a platfrom
speci c module (eg. TouchInputModule that you do not want to activate on
standalone.

IsPointerOverGameObject

Is the pointer with the given ID over an EventSystem object?

Process

Process the current tick for the module.

ShouldActivateModule

Should be activated.

UpdateModule

Update the internal state of the Module.

BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
GetAxisEventData

Given some input data generate an AxisEventData that can be used by
the event system.

GetBaseEventData

Generate a BaseEventData that can be used by the EventSystem.

HandlePointerExitAndEnter

Handle sending enter and exit events when a new enter target is
found.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

ClearSelection

Clear all pointers and deselect any selected objects in the
EventSystem.

CopyFromTo

Copy one PointerEventData to another.

DeselectIfSelectionChanged

Deselect the current selected GameObject if the currently pointed-at
GameObject is di erent.

GetLastPointerEventData

Return the last PointerEventData for the given touch / mouse id.

GetMousePointerEventData

Return the current MouseState.

GetPointerData

Search the cache for currently active pointers, return true if found.

GetTouchPointerEventData

Given a touch populate the PointerEventData and return if we are
pressed or released.

ProcessDrag

Process the drag for the current frame with the given pointer event.

ProcessMove

Process movement for the current frame with the given pointer event.

RemovePointerData

Remove the PointerEventData from the cache.

StateForMouseButton

Given a mouse button return the current state for the frame.

Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Static Methods
DetermineMoveDirection

Given an input movement, determine the best MoveDirection.

FindCommonRoot

Given 2 GameObjects, return a common root GameObject (or null).

FindFirstRaycast

Return the rst valid RaycastResult.

print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use
Destroy instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new
Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with

Network.Instantiate.
OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Base behaviour that has protected implementations of Unity lifecycle functions.

Public Methods
IsActive

Returns true if the GameObject and the Component are active.

IsDestroyed

Returns true if the native representation of the behaviour has been destroyed.

Protected Methods
Awake

See MonoBehaviour.Awake.

OnBeforeTransformParentChanged

See MonoBehaviour.OnBeforeTransformParentChanged.

OnCanvasGroupChanged

See MonoBehaviour.OnCanvasGroupChanged.

OnCanvasHierarchyChanged

Called when the state of the parent Canvas is changed.

OnDestroy

See MonoBehaviour.OnDestroy.

OnDidApplyAnimationProperties

See LayoutGroup.OnDidApplyAnimationProperties.

OnDisable

See MonoBehaviour.OnDisable.

OnEnable

See MonoBehaviour.OnEnable.

OnRectTransformDimensionsChange

This callback is called if an associated RectTransform has its
dimensions changed.

OnTransformParentChanged

See MonoBehaviour.OnRectTransformParentChanged.

OnValidate

See MonoBehaviour.OnValidate.

Reset

See MonoBehaviour.Reset.

Start

See MonoBehaviour.Start.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a

network view.
OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnBeginDrag callbacks.
Note: You need to implement IDragHandler in addition to IBeginDragHandler.
See Also: IDragHandler.

Public Methods
OnBeginDrag

Called by a BaseInputModule before a drag is started.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnCancel callbacks.

Public Methods
OnCancel

Called by a BaseInputModule when a Cancel event occurs.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnDeselect callbacks.

Public Methods
OnDeselect

Called by the EventSystem when a new object is being selected.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnDrag callbacks.

using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

[RequireComponent(typeof(Image))]
public class DragMe : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHa
{
public bool dragOnSurfaces = true;

private GameObject m_DraggingIcon;
private RectTransform m_DraggingPlane;

public void OnBeginDrag(PointerEventData eventData)
{
var canvas = FindInParents(gameObject);
if (canvas == null)
return;

// We have clicked something that can be dragged.
// What we want to do is create an icon for this.
m_DraggingIcon = new GameObject("icon");

m_DraggingIcon.transform.SetParent(canvas.transform, false);
m_DraggingIcon.transform.SetAsLastSibling();

var image = m_DraggingIcon.AddComponent();

image.sprite = GetComponent().sprite;
image.SetNativeSize();

if (dragOnSurfaces)
m_DraggingPlane = transform as RectTransform;
else
m_DraggingPlane = canvas.transform as RectTransform;

SetDraggedPosition(eventData);
}

public void OnDrag(PointerEventData data)
{
if (m_DraggingIcon != null)
SetDraggedPosition(data);
}

private void SetDraggedPosition(PointerEventData data)
{
if (dragOnSurfaces && data.pointerEnter != null && data.pointerEnter.tra
m_DraggingPlane = data.pointerEnter.transform as RectTransform;

var rt = m_DraggingIcon.GetComponent();
Vector3 globalMousePos;
if (RectTransformUtility.ScreenPointToWorldPointInRectangle(m_DraggingPl
{
rt.position = globalMousePos;
rt.rotation = m_DraggingPlane.rotation;
}
}

public void OnEndDrag(PointerEventData eventData)
{
if (m_DraggingIcon != null)
Destroy(m_DraggingIcon);
}

static public T FindInParents(GameObject go) where T : Component
{
if (go == null) return null;
var comp = go.GetComponent();

if (comp != null)
return comp;

Transform t = go.transform.parent;
while (t != null && comp == null)
{
comp = t.gameObject.GetComponent();
t = t.parent;
}
return comp;
}
}

Public Methods
OnDrag

When draging is occuring this will be called every time the cursor is moved.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnDrop callbacks.

using UnityEngine;
using UnityEngine.EventSystems;

public class Example : MonoBehaviour, IDropHandler
{
public void OnDrop(PointerEventData data)
{
if (data.pointerDrag != null)
{
Debug.Log("Dropped object was: " + data.pointerDrag);
}
}
}

Public Methods
OnDrop

Called by a BaseInputModule on a target that can accept a drop.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnEndDrag callbacks.
Note: You need to implement IDragHandler in addition to IEndDragHandler.
See Also: IDragHandler.

Public Methods
OnEndDrag

Called by a BaseInputModule when a drag is ended.

Leave feedback

Description
Base class that all EventSystem events inherit from.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnInitializePotentialDrag callbacks.

Public Methods
OnInitializePotentialDrag

Called by a BaseInputModule when a drag has been found but before it is valid to
begin the drag.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnMove callbacks.

Public Methods
OnMove

Called by a BaseInputModule when a move event occurs.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnPointerClick callbacks.
Use the IPointerClickHandler Interface to handle click input using OnPointerClick callbacks. Ensure an Event
System exists in the Scene to allow click detection. For click detection on non-UI GameObjects, ensure a
PhysicsRaycaster is attached to the Camera.

using UnityEngine;
using UnityEngine.EventSystems;

public class Example : MonoBehaviour, IPointerClickHandler
{
//Detect if a click occurs
public void OnPointerClick(PointerEventData pointerEventData)
{
//Output to console the clicked GameObject's name and the following mess
Debug.Log(name + " Game Object Clicked!");
}
}

Public Methods
OnPointerClick

Use this callback to detect clicks.

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnPointerDown callbacks.
Detects ongoing mouse clicks until release of the mouse button. Use IPointerUpHandler to handle the release of
the mouse button.

//Attach this script to the GameObject you would like to have mouse clicks detec
//This script outputs a message to the Console when a click is currently detecte

using UnityEngine;
using UnityEngine.EventSystems;

public class Example : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
//Detect current clicks on the GameObject (the one with the script attached)
public void OnPointerDown(PointerEventData pointerEventData)
{
//Output the name of the GameObject that is being clicked
Debug.Log(name + "Game Object Click in Progress");
}

//Detect if clicks are no longer registering
public void OnPointerUp(PointerEventData pointerEventData)
{
Debug.Log(name + "No longer being clicked");
}
}

Public Methods
OnPointerDown

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnPointerEnter callbacks.
Use to detect when the mouse begins to hover over a certain GameObject. To detect when the mouse stops
hovering over the GameObject, use IPointerExitHandler.

//Attach this script to the GameObject you would like to have mouse hovering det
//This script outputs a message to the Console when the mouse pointer is current

using UnityEngine;
using UnityEngine.EventSystems;

public class Example : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
//Detect if the Cursor starts to pass over the GameObject
public void OnPointerEnter(PointerEventData pointerEventData)
{
//Output to console the GameObject's name and the following message
Debug.Log("Cursor Entering " + name + " GameObject");
}

//Detect when Cursor leaves the GameObject
public void OnPointerExit(PointerEventData pointerEventData)
{
//Output the following message with the GameObject's name
Debug.Log("Cursor Exiting " + name + " GameObject");
}
}

Public Methods
OnPointerEnter

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnPointerExit callbacks.

Public Methods
OnPointerExit

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnPointerUp callbacks.
Note: In order to receive OnPointerUp callbacks, you must also implement the IPointerDownHandler interface

Public Methods
OnPointerUp

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnScroll callbacks.

Public Methods
OnScroll

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnSelect callbacks.

Public Methods
OnSelect

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnSubmit callbacks.

Public Methods
OnSubmit

Leave feedback
Implements interfaces:IEventSystemHandler

Description
Interface to implement if you wish to receive OnUpdateSelected callbacks.

Public Methods
OnUpdateSelected

Called by the EventSystem when the object associated with this EventTrigger is updated.

Leave feedback

Description
Enum that tracks event State.

Properties
Unused

Unused.

Used

Used.

Leave feedback

Description
The type of event the TriggerEvent is intercepting.

Properties
PointerEnter

Intercepts a IPointerEnterHandler.OnPointerEnter.

PointerExit

Intercepts a IPointerExitHandler.OnPointerExit.

PointerDown

Intercepts a IPointerDownHandler.OnPointerDown.

PointerUp

Intercepts a IPointerUpHandler.OnPointerUp.

PointerClick

Intercepts a IPointerClickHandler.OnPointerClick.

Drag

Intercepts a IDragHandler.OnDrag.

Drop

Intercepts a IDropHandler.OnDrop.

Scroll

Intercepts a IScrollHandler.OnScroll.

UpdateSelected

Intercepts a IUpdateSelectedHandler.OnUpdateSelected.

Select

Intercepts a ISelectHandler.OnSelect.

Deselect

Intercepts a IDeselectHandler.OnDeselect.

Move

Intercepts a IMoveHandler.OnMove.

InitializePotentialDrag

Intercepts IInitializePotentialDrag.InitializePotentialDrag.

BeginDrag

Intercepts IBeginDragHandler.OnBeginDrag.

EndDrag

Intercepts IEndDragHandler.OnEndDrag.

Submit

Intercepts ISubmitHandler.Submit.

Cancel

Intercepts ICancelHandler.OnCancel.

Leave feedback

Description
This is an 8 direction movement enum.
MoveDirection provides a way of switching between moving states. You must assign these states to actions, such
as moving the GameObject by an up vector when in the Up state.
Having states like these are easier to identify than always having to include a large amount of vectors and
calculations. Instead, you de ne what you want the state to do in only one part, and switch to the appropriate
state when it is needed.

//This is a full example of how a GameObject changes direction using MoveDirecti
//Assign this script to a visible GameObject (with a Rigidbody attached) to see

using UnityEngine;
using UnityEngine.EventSystems;

public class Example : MonoBehaviour
{
Vector3 m_StartPosition, m_StartForce;
Rigidbody m_Rigidbody;
//Use Enum for easy switching between direction states
MoveDirection m_MoveDirection;

//Use these Vectors for moving Rigidbody components
Vector3 m_ResetVector;
Vector3 m_UpVector;
Vector3 m_RightVector;
const float speed = 5.0f;

void Start()
{
//You get the Rigidbody component attached to the GameObject
m_Rigidbody = GetComponent();
//This starts with the Rigidbody not moving in any direction at all
m_MoveDirection = MoveDirection.None;

//These are the GameObject’s starting position and Rigidbody position

m_StartPosition = transform.position;
m_StartForce = m_Rigidbody.transform.position;

//This Vector is set to 1 in the y axis (for moving upwards)
m_UpVector = Vector3.up;
//This Vector is set to 1 in the x axis (for moving in the right directi
m_RightVector = Vector3.right;
//This Vector is zeroed out for when the Rigidbody should not move
m_ResetVector = Vector3.zero;
}

void Update()
{
//This switches the direction depending on button presses
switch (m_MoveDirection)
{
//The starting state which resets the object
case MoveDirection.None:
//Reset to the starting position of the GameObject and Rigidbody
transform.position = m_StartPosition;
m_Rigidbody.transform.position = m_StartForce;
//This resets the velocity of the Rigidbody
m_Rigidbody.velocity = m_ResetVector;
break;

//This is for moving in an upwards direction
case MoveDirection.Up:
//Change the velocity so that the Rigidbody travels upwards
m_Rigidbody.velocity = m_UpVector * speed;
break;

//This is for moving left
case MoveDirection.Left:
//This moves the Rigidbody to the left (minus right Vector)
m_Rigidbody.velocity = -m_RightVector * speed;
break;

//This is for moving right
case MoveDirection.Right:
//This moves the Rigidbody to the right
m_Rigidbody.velocity = m_RightVector * speed;

break;

//This is for moving down
case MoveDirection.Down:
//This moves the Rigidbody down
m_Rigidbody.velocity = -m_UpVector * speed;
break;
}
}

void OnGUI()
{
//Press the reset Button to switch to no mode
if (GUI.Button(new Rect(100, 0, 150, 30), "Reset"))
{
//Switch to start/reset case
m_MoveDirection = MoveDirection.None;
}

//Press the Left button to switch the Rigidbody direction to the left
if (GUI.Button(new Rect(100, 30, 150, 30), "Move Left"))
{
//Switch to the left direction
m_MoveDirection = MoveDirection.Left;
}

//Press the Up button to switch the Rigidbody direction to upwards
if (GUI.Button(new Rect(100, 60, 150, 30), "Move Up"))
{
//Switch to Up Direction
m_MoveDirection = MoveDirection.Up;
}

//Press the Down button to switch the direction to down
if (GUI.Button(new Rect(100, 90, 150, 30), "Move Down"))
{
//Switch to Down Direction
m_MoveDirection = MoveDirection.Down;
}

//Press the right button to switch to the right direction
if (GUI.Button(new Rect(100, 120, 150, 30), "Move Right"))
{
//Switch to Right Direction
m_MoveDirection = MoveDirection.Right;
}
}
}

Properties
Left

This is the Left state of MoveDirection. Assign functionality for moving to the left.

Up

This is the Up state of MoveDirection. Assign functionality for moving in an upward
direction.

Right

This is the Right state of MoveDirection. Assign functionality for moving to the right.

Down

The Down State of MoveDirection. Assign functionality for moving in a downward
direction.

None

This is the None state. Assign functionality that stops movement.

Leave feedback

Description
A world position that is guaranteed to be on the surface of the NavMesh.
The NavMeshLocation stores the position on the NavMesh surface together with the PolygonId of the NavMesh
node containing that position. Using NavMeshLocations with NavMeshQuery operations remove the need to
project the desired world position onto the NavMesh at the beginning of each and every operation.
A NavMeshLocation can be invalid in two situations: 1. When it has been created empty, instead of being the
result of a NavMeshQuery operation. 2. When the NavMesh has been removed or modi ed at the indicated
position or in its close vicinity.
If a NavMeshLocation is made invalid by a NavMeshObstacle carving the NavMesh in its vicinity the
NavMeshLocation returns to a valid state if the NavMeshObstacle is removed. This is because removing a
NavMeshObstacle restores the NavMesh to its original form without regenerating it.
See Also: NavMeshQuery.MapLocation, NavMeshQuery.IsValid, PolygonId.

Properties
polygon

Unique identi er for the node in the NavMesh to which the world position has been
mapped.

position

A world position that sits precisely on the surface of the NavMesh or along its links.

Leave feedback

Description
Object used for doing navigation operations in a NavMeshWorld.
NavMeshQuery operations can be executed inside jobs (IJob, IJobParallelFor), as opposed to the operations in the
NavMesh-related structures.
To obtain a path between two locations on the NavMesh, the query must have been created with a
pathNodePoolSize value greater than 0 and the following methods need to be called in sequence:
BeginFindPath, UpdateFindPath (repeatedly, if necessary), EndFindPath, GetPathResult. These methods
rely on storing some state data inside the NavMeshQuery but all the other methods do not change the object's
state and can be called any time.
All methods throw exceptions if any of their parameters are not valid when executed in the Editor.
Note: The intended feature set for NavMeshQuery is not yet fully complete.

Constructors
NavMeshQuery

Creates the NavMeshQuery object and allocates memory to store NavMesh node
information, if required.

Public Methods
BeginFindPath

Initiates a path nding operation between two locations on the NavMesh.

CreateLocation

Returns a valid NavMeshLocation for a position and a polygon provided by the
user.

Dispose

Destroys the NavMeshQuery and deallocates all memory used by it.

EndFindPath

Obtains the number of nodes in the path that has been computed during a
successful NavMeshQuery.UpdateFindPath operation.

GetAgentTypeIdForPolygon

Returns the identi er of the agent type the NavMesh was baked for or for
which the link has been con gured.

GetPathResult

Copies into the provided array the list of NavMesh nodes that form the path
found by the NavMeshQuery operation.

GetPolygonType

Returns whether the NavMesh node is a polygon or a link.

GetPortalPoints

Obtains the end points of the line segment common to two adjacent NavMesh
nodes.

IsValid

Returns true if the node referenced by the speci ed PolygonId is active in the
NavMesh.

MapLocation

Finds the closest point and PolygonId on the NavMesh for a given world
position.

MoveLocation

Translates a NavMesh location to another position without losing contact with
the surface.

MoveLocations

Translates a series of NavMesh locations to other positions without losing
contact with the surface.

MoveLocationsInSameAreas

Translates a series of NavMesh locations to other positions without losing
contact with the surface, given one common area lter for all of them.

PolygonLocalToWorldMatrix

Returns the transformation matrix of the NavMesh surface that contains the
speci ed NavMesh node (Read Only).

PolygonWorldToLocalMatrix

Returns the inverse transformation matrix of the NavMesh surface that
contains the speci ed NavMesh node (Read Only).

Raycast

Trace a line between two points on the NavMesh.

UpdateFindPath

Continues a path search that is in progress.

Leave feedback

Description
Assembles together a collection of NavMesh surfaces and links that are used as a whole for performing
navigation operations.
Operations are initialized against one world, can use only the NavMeshes inside that world and are not aware of
the existence of any other NavMeshWorld.
Copying this object only produces a new reference to the same NavMesh data, it does not duplicate the data in
memory.
Important note: Currently only a single NavMesh world can be used and a reference to it can be obtained
through the NavMeshWorld.GetDefaultWorld method. In the future, multiple NavMesh worlds will be able to be
created and any two of them will be completely isolated from each other.
See Also: NavMeshQuery.

Public Methods
AddDependency

Tells the NavMesh world to halt any changes until the speci ed job is completed.

IsValid

Returns true if the NavMeshWorld has been properly initialized.

Static Methods
GetDefaultWorld

Returns a reference to the single NavMeshWorld that can currently exist and be used in
Unity.

Leave feedback

Description
Represents a compact identi er for the data of a NavMesh node.
It is used in NavMeshQuery operations for pinpointing and getting access to relevant nodes in the NavMesh. Each
node can be used by only one type of agent. See Also: NavMeshSurface.
This identi er becomes invalid once the node gets removed from the NavMesh, either by completely removing
the surface or by modifying the surface in the node's immediate vicinity.
See Also: NavMeshQuery.IsValid.

Public Methods
Equals

Returns true if two PolygonId objects refer to the same NavMesh node.

GetHashCode

Returns the hash code for use in collections.

IsNull

Returns true if the PolygonId has been created empty and has never pointed to any node
in the NavMesh.

Operators
operator !=

Returns true if two PolygonId objects refer to di erent NavMesh nodes or if only one of
them is null.

operator ==

Returns true if two PolygonId objects refer to the same NavMesh node or if they are both
null.

Leave feedback

Description
The types of nodes in the navigation data.
Navigation data is comprised geometrically of polygons and segments connected together.
See Also: NavMeshQuery.GetPolygonType, NavMeshSurface, NavMeshLink, O -mesh Link.

Properties
Ground

Type of node in the NavMesh representing one surface polygon.

O MeshConnection

Type of node in the NavMesh representing a point-to-point connection between two
positions on the NavMesh surface.

Leave feedback

Description
Bit ags representing the resulting state of NavMeshQuery operations.
The main values are Success, Failure and InProgress. A status will usually have only one of these main ags
set. The secondary ags (details) are set when speci c issues have been encountered during the operation.
StatusDetailMask is a bit mask that can be used to lter out these secondary ags.
Note: Issues highlighted by the presence of certain detail ags in certain situations might refer to internal
structures outside the control of users, thus they will not always be able to mitigate them by taking the necessary
actions in their code. Ways for handling these situations will be made available in the future.

Properties
Failure

The operation has failed.

Success

The operation was successful.

InProgress

The operation is in progress.

StatusDetailMask

Bitmask that has 0 set for the Success, Failure and InProgress bits and 1 set for all the
other ags.

WrongMagic

Data in the NavMesh cannot be recognized and used.

WrongVersion

Data in the NavMesh world has a wrong version.

OutOfMemory

Operation ran out of memory.

InvalidParam

A parameter did not contain valid information, useful for carring out the NavMesh query.

Bu erTooSmall

The node bu er of the query was too small to store all results.

OutOfNodes

Query ran out of node stack space during a search.

PartialResult

Query did not reach the end location, returning best guess.

Leave feedback

Description
The humanoid stream of animation data passed from one Playable to another.
The AnimationHumanStream structure is passed through the animation Playable structures, like
AnimationClipPlayable and AnimationMixerPlayable. They can be modi ed when used with an
IAnimationJobPlayable, like the AnimationScriptPlayable.
The Playables implementing IAnimationJobPlayable take a custom C# job, which must implement IAnimationJob,
and the AnimationHumanStream is then passed to its callbacks during the animation processing pass.
See Also: AnimationStream, AnimationStream.isHumanStream, and AnimationStream.AsHuman().

Properties
bodyLocalPosition

The position of the body center of mass relative to the root.

bodyLocalRotation

The rotation of the body center of mass relative to the root.

bodyPosition

The position of the body center of mass in world space.

bodyRotation

The rotation of the body center of mass in world space.

humanScale

The scale of the Avatar. (Read Only)

isValid

Returns true if the stream is valid; false otherwise. (Read Only)

leftFootHeight

The left foot height from the oor. (Read Only)

leftFootVelocity

The left foot velocity from the last evaluated frame. (Read Only)

rightFootHeight

The right foot height from the oor. (Read Only)

rightFootVelocity

The right foot velocity from the last evaluated frame. (Read Only)

Public Methods
GetGoalLocalPosition

Returns the position of this IK goal relative to the root.

GetGoalLocalRotation

Returns the rotation of this IK goal relative to the root.

GetGoalPosition

Returns the position of this IK goal in world space.

GetGoalPositionFromPose

Returns the position of this IK goal in world space computed from the stream
current pose.

GetGoalRotation

Returns the rotation of this IK goal in world space.

GetGoalRotationFromPose

Returns the rotation of this IK goal in world space computed from the stream
current pose.

GetGoalWeightPosition

Returns the position weight of the IK goal.

GetGoalWeightRotation

Returns the rotation weight of the IK goal.

GetHintPosition

Returns the position of this IK Hint in world space.

GetHintWeightPosition

Returns the position weight of the IK Hint.

GetMuscle

Returns the muscle value.

ResetToStancePose

Reset the current pose to the stance pose (T Pose).

SetGoalLocalPosition

Sets the position of this IK goal relative to the root.

SetGoalLocalRotation

Sets the rotation of this IK goal relative to the root.

SetGoalPosition

Sets the position of this IK goal in world space.

SetGoalRotation

Sets the rotation of this IK goal in world space.

SetGoalWeightPosition

Sets the position weight of the IK goal.

SetGoalWeightRotation

Sets the rotation weight of the IK goal.

SetHintPosition

Sets the position of this IK hint in world space.

SetHintWeightPosition

Sets the position weight of the IK Hint.

SetLookAtBodyWeight

Sets the LookAt body weight.

SetLookAtClampWeight

Sets the LookAt clamp weight.

SetLookAtEyesWeight

Sets the LookAt eyes weight.

SetLookAtHeadWeight

Sets the LookAt head weight.

SetLookAtPosition

Sets the look at position in world space.

SetMuscle

Sets the muscle value.

SolveIK

Execute the IK solver.

Leave feedback
Implements interfaces:IAnimationJobPlayable, IPlayable

Description
A Playable that can run a custom, multi-threaded animation job.
This playable allows to create a custom C# job that will give read and write access to the AnimationStream during
the animation process pass in the PlayableGraph. The C# job must implement the interface IAnimationJob.
NOTE: You can use PlayableExtensions methods with AnimationScriptPlayable objects.
See Also: IAnimationJob, and AnimationScriptPlayable.Create.

Public Methods
GetJobData

Gets the job data contained in the playable.

GetProcessInputs

Returns whether the playable inputs will be processed or not.

SetJobData

Sets a new job data in the playable.

SetProcessInputs

Sets the new value for processing the inputs or not.

Static Methods
Create

Creates an AnimationScriptPlayable in the PlayableGraph.

Leave feedback

Description
The stream of animation data passed from one Playable to another.
The AnimationStream structure is passed through the animation Playable structures, like AnimationClipPlayable
and AnimationMixerPlayable. They can be modi ed when used with an IAnimationJobPlayable, like the
AnimationScriptPlayable.
The Playables implementing IAnimationJobPlayable take a custom C# job, which must implement IAnimationJob,
and the AnimationStream is then passed to its callbacks during the animation processing pass.
See Also: IAnimationJob, AnimationScriptPlayable, TransformStreamHandle, PropertyStreamHandle,
TransformSceneHandle, and PropertySceneHandle.

Properties
angularVelocity

Gets or sets the avatar angular velocity for the evaluated frame.

deltaTime

Gets the delta time for the evaluated frame. (Read Only)

inputStreamCount

Gets the number of input streams. (Read Only)

isHumanStream

Returns true if the stream is from a humanoid avatar; false otherwise. (Read Only)

isValid

Returns true if the stream is valid; false otherwise. (Read Only)

rootMotionPosition

Gets the root motion position for the evaluated frame. (Read Only)

rootMotionRotation

Gets the root motion rotation for the evaluated frame. (Read Only)

velocity

Gets or sets the avatar velocity for the evaluated frame.

Public Methods
AsHuman

Gets the same stream, but as an AnimationHumanStream.

GetInputStream

Gets the AnimationStream of the playable input at index.

Leave feedback

Description
Static class providing extension methods for Animator and the animation C# jobs.
The extension methods in this class can directly be used on an Animator.
See Also: IAnimationJobPlayable.

Static Methods
BindSceneProperty

Create a PropertySceneHandle representing the new binding on the Component
property of a Transform in the Scene.

BindSceneTransform

Create a TransformSceneHandle representing the new binding between the
Animator and a Transform in the Scene.

BindStreamProperty

Create a PropertyStreamHandle representing the new binding on the Component
property of a Transform already bound to the Animator.

BindStreamTransform

Create a TransformStreamHandle representing the new binding between the
Animator and a Transform already bound to the Animator.

CloseAnimationStream

Close a stream that has been opened using OpenAnimationStream.

OpenAnimationStream

Open a new stream on the Animator.

ResolveAllSceneHandles

Newly created handles are always resolved lazily on the next access when the
jobs are run. To avoid a cpu spike while evaluating the jobs you can manually
resolve all handles from the main thread.

ResolveAllStreamHandles

Newly created handles are always resolved lazily on the next access when the
jobs are run. To avoid a cpu spike while evaluating the jobs you can manually
resolve all handles from the main thread.

Leave feedback

Description
Handle for a muscle in the AnimationHumanStream.
MuscleHandle can only be used on AnimationHumanStream, otherwise an InvalidOperationException is
thrown.

using
using
using
using

UnityEngine;
UnityEngine.Animations;
UnityEngine.Playables;
UnityEngine.Experimental.Animations;

public struct MuscleHandleExampleJob : IAnimationJob
{
public MuscleHandle muscleHandle;

public void ProcessRootMotion(AnimationStream stream) {}
public void ProcessAnimation(AnimationStream stream)
{
AnimationHumanStream humanStream = stream.AsHuman();

// Get a muscle value.
float muscleValue = humanStream.GetMuscle(muscleHandle);

// Set a muscle value.
humanStream.SetMuscle(muscleHandle, muscleValue);
}
}

[RequireComponent(typeof(Animator))]
public class MuscleHandleExample : MonoBehaviour
{
void Start()
{
var graph = PlayableGraph.Create();
var output = AnimationPlayableOutput.Create(graph, "output", GetComponen

var job = new MuscleHandleExampleJob();
job.muscleHandle = new MuscleHandle(HumanPartDof.LeftArm, ArmDof.HandDow

var scriptPlayable = AnimationScriptPlayable.Create(graph, job);
output.SetSourcePlayable(scriptPlayable);

graph.Evaluate(1.0f);

graph.Destroy();
}
}

Static Properties
muscleHandleCount

The total number of DoF parts in a humanoid. (Read Only)

Properties
dof

The muscle human sub-part. (Read Only)

humanPartDof

The muscle human part. (Read Only)

name

The name of the muscle. (Read Only)

Constructors
MuscleHandle

The di erent constructors that creates the muscle handle.

Static Methods
GetMuscleHandles

Fills the array with all the possible muscle handles on a humanoid.

Leave feedback

Description
Handle for a Component property on an object in the Scene.

using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;

using UnityEngine.Experimental.Animations;

public struct PropertySceneHandleJob : IAnimationJob
{
public PropertySceneHandle handleR;
public PropertySceneHandle handleG;
public PropertySceneHandle handleB;
public Color color;

public void ProcessRootMotion(AnimationStream stream)
{
}

public void ProcessAnimation(AnimationStream stream)
{
// Set the new light color.
handleR.SetFloat(stream, color.r);
handleG.SetFloat(stream, color.g);
handleB.SetFloat(stream, color.b);
}
}

[RequireComponent(typeof(Animator))]
[RequireComponent(typeof(Light))]
public class PropertySceneHandleExample : MonoBehaviour
{
public Light sceneLight;
public Color color = Color.white;

PlayableGraph m_Graph;
AnimationScriptPlayable m_AnimationScriptPlayable;

void Start()
{
if (sceneLight == null)
return;

var animator = GetComponent();

m_Graph = PlayableGraph.Create("PropertySceneHandleExample");
var output = AnimationPlayableOutput.Create(m_Graph, "output", animator)

var animationJob = new PropertySceneHandleJob();
animationJob.handleR = animator.BindSceneProperty(sceneLight.transform,
animationJob.handleG = animator.BindSceneProperty(sceneLight.transform,
animationJob.handleB = animator.BindSceneProperty(sceneLight.transform,
m_AnimationScriptPlayable = AnimationScriptPlayable.Create(m_Graph, anim

output.SetSourcePlayable(m_AnimationScriptPlayable);
m_Graph.Play();
}

void Update()
{
if (sceneLight == null)
return;

var animationJob = m_AnimationScriptPlayable.GetJobData();

m_Graph = PlayableGraph.Create("PropertyStreamHandleExample");
var output = AnimationPlayableOutput.Create(m_Graph, "output", animator)

var animationJob = new PropertyStreamHandleJob();
animationJob.handleR = animator.BindStreamProperty(gameObject.transform,
animationJob.handleG = animator.BindStreamProperty(gameObject.transform,
animationJob.handleB = animator.BindStreamProperty(gameObject.transform,
m_AnimationScriptPlayable = AnimationScriptPlayable.Create(m_Graph, anim

output.SetSourcePlayable(m_AnimationScriptPlayable);
m_Graph.Play();
}

void Update()
{
var animationJob = m_AnimationScriptPlayable.GetJobData();

m_Graph = PlayableGraph.Create("TransformSceneHandleExample");
var output = AnimationPlayableOutput.Create(m_Graph, "output", animator)

var animationJob = new TransformSceneHandleJob();
animationJob.handle = animator.BindSceneTransform(sceneTransform);
m_AnimationScriptPlayable = AnimationScriptPlayable.Create(m_Graph, anim

output.SetSourcePlayable(m_AnimationScriptPlayable);
m_Graph.Play();
}

void Update()
{
if (sceneTransform == null)
return;

var animationJob = m_AnimationScriptPlayable.GetJobData();

m_Graph = PlayableGraph.Create("TransformStreamHandleExample");
var output = AnimationPlayableOutput.Create(m_Graph, "output", animator)

var animationJob = new TransformStreamHandleJob();
animationJob.handle = animator.BindStreamTransform(gameObject.transform)
m_AnimationScriptPlayable = AnimationScriptPlayable.Create(m_Graph, anim

output.SetSourcePlayable(m_AnimationScriptPlayable);
m_Graph.Play();
}

void Update()
{
var animationJob = m_AnimationScriptPlayable.GetJobData();
vp.audioOutputMode = VideoAudioOutputMode.APIOnly;
vp.prepareCompleted += Prepared;
vp.Prepare();
}

void Prepared(VideoPlayer vp)
{
provider = vp.GetAudioSampleProvider(0);
provider.sampleFramesAvailable += SampleFramesAvailable;
provider.enableSampleFramesAvailableEvents = true;
provider.freeSampleFrameCountLowThreshold = provider.maxSampleFrameCount
vp.Play();
}

void SampleFramesAvailable(AudioSampleProvider provider, uint sampleFrameCoun
{

using (NativeArray buffer = new NativeArray(
(int)sampleFrameCount * provider.channelCount, Allocator.T
{
var sfCount = provider.ConsumeSampleFrames(buffer);
Debug.LogFormat("SetupSoftwareAudioOut.Available got {0} sample frame
// Do something with the samples here...
}
}
}

The following is an example of how to access samples from C++. The setup has to be done in C# and then Unity's
core and the native plug-in can call into each other without having to go through managed code.

using
using
using
using
using
using

System;
System.Runtime.InteropServices;
UnityEngine;
UnityEngine.Experimental.Video;
UnityEngine.Experimental.Audio;
UnityEngine.Video;

public class NativeAudioOutput : MonoBehaviour
{
AudioSampleProvider provider;
AudioSampleProvider.SampleFramesEventNativeFunction sampleFramesAvailableNati
SampleFramesAvailable;

void Start()
{
VideoPlayer vp = GetComponent();
vp.audioOutputMode = VideoAudioOutputMode.APIOnly;
vp.prepareCompleted += Prepared;
vp.Prepare();
}

void Prepared(VideoPlayer vp)
{
provider = vp.GetAudioSampleProvider(0);
provider.freeSampleFrameCountLowThreshold = provider.maxSampleFrameCount

SetConsumeSampleFramesFunction(

AudioSampleProvider.consumeSampleFramesNativeFunction, provider.id,
provider.channelCount, provider.sampleRate);
provider.SetSampleFramesAvailableNativeHandler(
sampleFramesAvailableNativeHandler, (IntPtr)0);

vp.Play();
}

private const string pluginName =
#if UNITY_IPHONE
"__Internal"
#else
"NativeAudioOutputPlugin"
#endif
;

[DllImport(pluginName, ExactSpelling = true, CallingConvention = CallingConve
private static extern void SetConsumeSampleFramesFunction(
AudioSampleProvider.ConsumeSampleFramesNativeFunction cb, uint id, ushort

[AOT.MonoPInvokeCallback(typeof(AudioSampleProvider.SampleFramesEventNativeFu
[DllImport(pluginName, ExactSpelling = true, CallingConvention = CallingConve
private static extern void SampleFramesAvailable(IntPtr userData, uint id, ui
}

And here is the accompanying C++ plug-in:

#include 
#include 

typedef uint32_t(__cdecl *ConsumeSampleFramesFunction)(
uint32_t providerId, float* interleavedSampleFrames, uint32_t sampleFrameCoun

ConsumeSampleFramesFunction ConsumeSampleFrames = NULL;
uint32_t providerId = -1;
float* buffer = NULL;
uint32_t bufferSampleFrameCount = 0;
uint32_t availableSampleFrameCount = 0;

extern "C" __cdecl void SetConsumeSampleFramesFunction(
ConsumeSampleFramesFunction function, uint32_t id, uint16_t channelCount, uin
{
ConsumeSampleFrames = function;
providerId = id;
delete[] buffer;
buffer = new float[channelCount * sampleRate]; // 1s worth of sample frames.
bufferSampleFrameCount = sampleRate;
}

extern "C" __cdecl void SampleFramesAvailable(void* userData, uint32_t id, uint32
{
if (ConsumeSampleFrames == NULL)
return;

// We consume the sample frames from the handler that tells us that there are
// But we could also invoke this regularly from another thread, for example t
// samples to an audio device.
const uint32_t consumedSampleFrameCount = ConsumeSampleFrames(
providerId, buffer, std::min(bufferSampleFrameCount, sampleFrameCount
// Do something with the samples here...
}

Static Properties
consumeSampleFramesNativeFunction

Pointer to the native function that provides access to audio sample
frames.

Properties
availableSampleFrameCount

Number of sample frames available for consuming with
AudioSampleProvider.ConsumeSampleFrames.

channelCount

The number of audio channels per sample frame.

enableSampleFramesAvailableEvents

Enables the AudioSampleProvider.sampleFramesAvailable events.

enableSilencePadding

If true, bu ers produced by ConsumeSampleFrames will get padded
when silence if there are less available than asked for. Otherwise, the
extra sample frames in the bu er will be left unchanged.

freeSampleFrameCount

Number of sample frames that can still be written to by the sample
producer before over owing.

freeSampleFrameCountLowThreshold

Then the free sample count falls below this threshold, the
AudioSampleProvider.sampleFramesAvailable event and associated
native is emitted.

id

Unique identi er for this instance.

maxSampleFrameCount

The maximum number of sample frames that can be accumulated
inside the internal bu er before an over ow event is emitted.

owner

Object where this provider came from.

sampleRate

The expected playback rate for the sample frames produced by this
class.

trackIndex

Index of the track in the object that created this provider.

valid

True if the object is valid.

Public Methods
ClearSampleFramesAvailableNativeHandler

Clear the native handler set with
AudioSampleProvider.SetSampleFramesAvailableNativeHandler.

ClearSampleFramesOver owNativeHandler

Clear the native handler set with
AudioSampleProvider.SetSampleFramesOver owNativeHandler.

ConsumeSampleFrames

Consume sample frames from the internal bu er.

Dispose

Release internal resources. Inherited from IDisposable.

SetSampleFramesAvailableNativeHandler

Set the native event handler for events emitted when the
number of available sample frames crosses the threshold.

SetSampleFramesOver owNativeHandler

Set the native event handler for events emitted when the
internal sample frame bu er over ows.

Events
sampleFramesAvailable

Invoked when the number of available sample frames goes beyond the threshold
set with AudioSampleProvider.freeSampleFrameCountLowThreshold.

sampleFramesOver ow

Invoked when the number of available sample frames goes beyond the maximum
that ts in the internal bu er.

Delegates

ConsumeSampleFramesNativeFunction

Type that represents the native function pointer for consuming
sample frames.

SampleFramesEventNativeFunction

Type that represents the native function pointer for handling
sample frame events.

SampleFramesHandler

Delegate for sample frame events.

Leave feedback

Description
A helper structure used to initialize a LightDataGI structure as a directional light.

Properties
color

The direct light color.

direction

The direction of the light.

indirectColor

The indirect light color.

instanceID

The light's instanceID.

mode

The lightmode.

penumbraWidthRadian

The penumbra width for soft shadows in radians.

shadow

True if the light casts shadows, otherwise False.

Leave feedback

Description
The interop structure to pass light information to the light baking backends. There are helper structures for
Directional, Point, Spot and Rectangle lights to correctly initialize this structure.

Properties
color

The color of the light.

coneAngle

The cone angle for spot lights.

fallo

The fallo model to use for baking point and spot lights.

indirectColor

The indirect color of the light.

innerConeAngle

The inner cone angle for spot lights.

instanceID

The light's instanceID.

mode

The lightmap mode for the light.

orientation

The orientation of the light.

position

The position of the light.

range

The range of the light. Unused for directional lights.

shadow

Set to 1 for shadow casting lights, 0 otherwise.

shape0

The light's sphere radius for point and spot lights, or the width for rectangle lights.

shape1

The height for rectangle lights.

type

The type of the light.

Public Methods
Init

Initialize the struct with the parameters from the given light type.

InitNoBake

Initialize a light so that the baking backends ignore it.

Leave feedback

Description
Utility class for converting Unity Lights to light types recognized by the baking backends.

Static Methods
Extract

Extracts informations from Lights.

ExtractIndirect

Extracts the indirect color from a light.

ExtractInnerCone

Extracts the inner cone angle of spot lights.

Leave feedback

Description
Interface to the light baking backends.

Static Methods
GetDelegate

Get the currently set conversion delegate.

ResetDelegate

Resets the light conversion delegate to Unity's default conversion function.

SetDelegate

Set a delegate that converts a list of lights to a list of LightDataGI structures that are
passed to the baking backends. Must be reset by calling ResetDelegate again.

Delegates
RequestLightsDelegate

Delegate called when converting lights into a form that the baking backends
understand.

Leave feedback

Description
Contains normalized linear color values for red, green, blue in the range of 0 to 1, and an additional intensity
value.

Properties
blue

The blue color value in the range of 0.0 to 1.0.

green

The green color value in the range of 0.0 to 1.0.

intensity

The intensity value used to scale the red, green and blue values.

red

The red color value in the range of 0.0 to 1.0.

Static Methods
Black

Returns a black color.

Convert

Converts a Light's color value to a normalized linear color value, automatically handling
gamma conversion if necessary.

Leave feedback

Description
A helper structure used to initialize a LightDataGI structure as a point light.

Properties
color

The direct light color.

fallo

The fallo model to use for baking the point light.

indirectColor

The indirect light color.

instanceID

The light's instanceID.

mode

The lightmode.

position

The light's position.

range

The light's range.

shadow

True if the light casts shadows, otherwise False.

sphereRadius

The light's sphere radius, in uencing soft shadows.

Leave feedback

Description
A helper structure used to initialize a LightDataGI structure as a rectangle light.

Properties
color

The direct light color.

height

The height of the rectangle light.

indirectColor

The indirect light color.

instanceID

The light's instanceID.

mode

The lightmode.

orientation

The light's orientation.

position

The light's position.

range

The light's range.

shadow

True if the light casts shadows, otherwise False.

width

The width of the rectangle light.

Leave feedback

Description
A helper structure used to initialize a LightDataGI structure as a spot light.

Properties
color

The direct light color.

coneAngle

The outer angle for the spot light.

fallo

The fallo model to use for baking the spot light.

indirectColor

The indirect light color.

innerConeAngle

The inner angle for the spot light.

instanceID

The light's instanceID.

mode

The lightmode.

orientation

The light's orientation.

position

The light's position.

range

The light's range.

shadow

True if the light casts shadows, otherwise False.

sphereRadius

The light's sphere radius, in uencing soft shadows.

Leave feedback

Description
Available fallo models for baking.

Properties
InverseSquared

Inverse squared distance fallo model.

InverseSquaredNoRangeAttenuation

Inverse squared distance fallo model (without smooth range
attenuation).

Linear

Linear fallo model.

Legacy

Quadratic fallo model.

Unde ned

Fallo model is unde ned.

Leave feedback

Description
The lightmode. A light can be realtime, mixed, baked or unknown. Unknown lights will be ignored by the baking
backends.

Properties
Realtime

The light is realtime. No contribution will be baked in lightmaps or light probes.

Mixed

The light is mixed. Mixed lights are interpreted based on the global light mode setting in
the lighting window.

Baked

The light is fully baked and has no realtime component.

Unknown

The light should be ignored by the baking backends.

Leave feedback

Description
The light type.

Properties
Directional

An in nite directional light.

Point

A point light emitting light in all directions.

Spot

A spot light emitting light in a direction with a cone shaped opening angle.

Rectangle

A light shaped like a rectangle emitting light into the hemisphere that it is facing.

Disc

A light shaped like a disc emitting light into the hemisphere that it is facing.

Leave feedback

Description
The class representing the player loop in Unity.
This class contains functions for interacting with the player loop in the core of Unity. You can use this class to get
the update order of all native systems and set a custom order with new script entry points inserted.

Static Methods
GetDefaultPlayerLoop

Returns the default update order of all engine systems in Unity.

SetPlayerLoop

Set a new custom update order of all engine systems in Unity.

Leave feedback

Description
The representation of a single system being updated by the player loop in Unity.
This struct represents a single system in the player loop. A system can be one of Unity's built-in native systems, or
you can new custom systems to add to the player loop using C#. Native systems can only be retrieved by calling
PlayerLoop.GetDefaultPlayerLoop, and the parameters of them should not be modi ed.

Properties
loopConditionFunction

The loop condition for a native engine system. To get a valid value for this, you must
copy it from one of the PlayerLoopSystems returned by
PlayerLoop.GetDefaultPlayerLoop.

subSystemList

A list of sub systems which run as part of this item in the player loop.

type

This property is used to identify which native system this belongs to, or to get the
name of the managed system to show in the pro ler.

updateDelegate

A managed delegate. You can set this to create a new C# entrypoint in the player
loop.

updateFunction

A native engine system. To get a valid value for this, you must copy it from one of the
PlayerLoopSystems returned by PlayerLoop.GetDefaultPlayerLoop.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that produces a Camera texture.
NOTE: You can use PlayableExtensions methods with CameraPlayable objects.

Static Methods
Create

Creates a CameraPlayable in the PlayableGraph.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that allows application of a Material shader to one or many texture inputs to
produce a texture output.
NOTE: You can use PlayableExtensions methods with MaterialE ectPlayable objects.

Static Methods
Create

Creates a MaterialE ectPlayable in the PlayableGraph.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that allows mixing two textures.
NOTE: You can use PlayableExtensions methods with TextureMixerPlayable objects.

Static Methods
Create

Creates a TextureMixerPlayable in the PlayableGraph.

Leave feedback

Description
A PlayableBinding that contains information representing a TexturePlayableOutput.

Static Methods
Create

Creates a PlayableBinding that contains information representing a
TexturePlayableOutput.

Leave feedback
Implements interfaces:IPlayableOutput

Description
An IPlayableOutput implementation that will be used to manipulate textures.
NOTE: You can use PlayableOutputExtensions methods with TexturePlayableOutput objects.

Static Properties
Null

Returns an invalid TexturePlayableOutput.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Update phase in the native player loop.
This is the C# representation of an update phase in the native player loop. It can only be used to identify the
update phase in native.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Native engine system updated by the native player loop.

Leave feedback

Description
Values for the blend state.
See Also: RenderStateBlock, ShaderLab: Blending.

Static Properties
Default

Default values for the blend state.

Properties
alphaToMask

Turns on alpha-to-coverage.

blendState0

Blend state for render target 0.

blendState1

Blend state for render target 1.

blendState2

Blend state for render target 2.

blendState3

Blend state for render target 3.

blendState4

Blend state for render target 4.

blendState5

Blend state for render target 5.

blendState6

Blend state for render target 6.

blendState7

Blend state for render target 7.

separateMRTBlendStates

Determines whether each render target uses a separate blend state.

Constructors
BlendState

Creates a new blend state with the speci ed values.

Leave feedback

Description
Camera related properties in CullingParameters.
Typical use case is to compute culling parameters from Camera data, see CullResults.GetCullingParameters.

Public Methods
GetCameraCullingPlane

Get a camera culling plane.

GetShadowCullingPlane

Get a shadow culling plane.

SetCameraCullingPlane

Set a camera culling plane.

SetShadowCullingPlane

Set a shadow culling plane.

Leave feedback

Description
Core Camera related properties in CullingParameters.
Typical use case is to compute culling parameters from Camera data, see CullResults.GetCullingParameters.

Leave feedback

Description
Culling results (visible objects, lights, re ection probes).
In a scriptable render loop, the rendering process is typically doing culling for each camera (CullResults.Cull),
followed by rendering subsets of visible objects (RenderLoop.DrawRenderers) and processing visible lights
(visibleLights, visibleRe ectionProbes).
CullResults also provides several functions to aid shadow rendering
(ComputeDirectionalShadowMatricesAndCullingPrimitives, ComputeSpotShadowMatricesAndCullingPrimitives,
ComputePointShadowMatricesAndCullingPrimitives).

Properties
visibleLights

Array of visible lights.

visibleO screenVertexLights

O screen lights that still e ect visible Scene vertices.

visibleRe ectionProbes

Array of visible re ection probes.

visibleRenderers

Visible renderers.

Public Methods
ComputeDirectionalShadowMatricesAndCullingPrimitives

Calculates the view and projection matrices and
shadow split data for a directional light.

ComputePointShadowMatricesAndCullingPrimitives

Calculates the view and projection matrices and
shadow split data for a point light.

ComputeSpotShadowMatricesAndCullingPrimitives

Calculates the view and projection matrices and
shadow split data for a spot light.

FillLightIndices

Fills a compute bu er with per-object light
indices.

GetLightIndexMap

If a RenderPipeline sorts or otherwise modi es
the VisibleLight list, an index remap will be
necessary to properly make use of per-object light
lists.

GetLightIndicesCount

Gets the number of per-object light indices.

GetShadowCasterBounds

Returns the bounding box that encapsulates the
visible shadow casters. Can be used to, for
instance, dynamically adjust cascade ranges.

SetLightIndexMap

If a RenderPipeline sorts or otherwise modi es
the VisibleLight list, an index remap will be
necessary to properly make use of per-object light
lists. If an element of the array is set to -1, the
light corresponding to that element will be
disabled.

Static Methods
Cull

Perform culling for a Camera.

GetCullingParameters

Get culling parameters for a camera.

Leave feedback

Description
Values for the depth state.
See Also: RenderStateBlock, ShaderLab: Culling & Depth Testing.

Static Properties
Default

Default values for the depth state.

Properties
compareFunction

How should depth testing be performed.

writeEnabled

Controls whether pixels from this object are written to the depth bu er.

Constructors
DepthState

Creates a new depth state with the given values.

Leave feedback

Description
Settings for ScriptableRenderContext.DrawRenderers.
DrawRendererSettings describes how to sort visible objects are sorted (sorting) and which shader passes to use
(shaderPassName).
See Also: ScriptableRenderContext.DrawRenderers, CullResults.Cull, FilterRenderersSettings.

Static Properties
maxShaderPasses

The maxiumum number of passes that can be rendered in 1 DrawRenderers call.

Properties
ags

Other ags controlling object rendering.

rendererCon guration

What kind of per-object data to setup during rendering.

sorting

How to sort objects during rendering.

Constructors
DrawRendererSettings

Create a draw settings struct.

Public Methods
SetOverrideMaterial

Set the Material to use for all drawers that would render in this group.

SetShaderPassName

Set the shader passes that this draw call can render.

Leave feedback

Description
This struct describes the methods to sort objects during rendering.
See Also: DrawRendererSettings, RenderLoop.DrawRenderers.

Properties
cameraCustomSortAxis

Used to calculate distance to objects, by comparing the positions of objects to this
axis.

cameraPosition

Used to calculate the distance to objects.

ags

What kind of sorting to do while rendering.

sortMode

Type of sorting to use while rendering.

worldToCameraMatrix

Used to calculate the distance to objects.

Leave feedback

Description
Settings for ScriptableRenderContext.DrawShadows.
This structure describes which shadow light to render (lightIndex) with what split settings (splitData).
See Also: ShadowSplitData.

Properties
cullResults

Culling results to use.

lightIndex

The index of the shadow-casting light to be rendered.

splitData

The split data.

Constructors
DrawShadowsSettings

Create a shadow settings object.

Leave feedback

Description
Filter settings for ScriptableRenderContext.DrawRenderers.
FilterRenderersSettings describes how to lter the given set of visible objects to render.
See Also: ScriptableRenderContext.DrawRenderers.

Properties
excludeMotionVectorObjects

Set to true to exclude objects that are currently in motion from rendering. The
default value is false.

layerMask

Only render objects in the given layer mask.

renderingLayerMask

The rendering layer mask to use when ltering available renderers for
drawing.

renderQueueRange

Render objects whose material render queue in inside this range.

Constructors
FilterRenderersSettings

Leave feedback

Description
Describes a subset of objects to be rendered.
See Also: ScriptableRenderContext.DrawRenderers.
.

Leave feedback

Description
LODGroup culling parameters.
See Also: CullingParameters.

Properties
cameraPixelHeight

Rendering view height in pixels.

cameraPosition

Camera position.

eldOfView

Camera's eld of view.

isOrthographic

Indicates whether camera is orthographic.

orthoSize

Orhographic camera size.

Leave feedback

Description
Values for the raster state.
See Also: ShaderLab: Culling & Depth Testing.

Static Properties
Default

Default values for the raster state.

Properties
cullingMode

Controls which sides of polygons should be culled (not drawn).

depthClip

Enable clipping based on depth.

o setFactor

Scales the maximum Z slope.

o setUnits

Scales the minimum resolvable depth bu er value.

Constructors
RasterState

Creates a new raster state with the given values.

Leave feedback

Description
Object encapsulating the duration of a single renderpass that contains one or more subpasses.
The RenderPass object provides a new way to switch rendertargets in the context of a Scriptable Rendering
Pipeline. As opposed to the SetRenderTargets function, the RenderPass object speci es a clear beginning and an
end for the rendering, alongside explicit load/store actions on the rendering surfaces.
The RenderPass object also allows running multiple subpasses within the same renderpass, where the pixel
shaders have a read access to the current pixel value within the renderpass. This allows for e cient
implementation of various rendering methods on tile-based GPUs, such as deferred rendering.
RenderPasses are natively implemented on Metal (iOS) and Vulkan, but the API is fully functional on all rendering
backends via emulation (using legacy SetRenderTargets calls and reading the current pixel values via texel
fetches).
A quick example on how to use the RenderPass API within the Scriptable Render Pipeline to implement deferred
rendering:
The RenderPass mechanism has the following limitations: - All attachments must have the same resolution and
MSAA sample count - The rendering results of previous subpasses are only available within the same screenspace pixel coordinate via the UNITY_READ_FRAMEBUFFER_INPUT(x) macro in the shader; the attachments cannot
be bound as textures or otherwise accessed until the renderpass has ended - iOS Metal does not allow reading
from the Z-Bu er, so an additional render target is needed to work around that - The maximum amount of
attachments allowed per RenderPass is currently 8 + depth, but note that various GPUs may have stricter limits.

using UnityEngine;
using UnityEngine.Experimental.Rendering;

public class DeferredRenderer
{
private RenderPassAttachment
private RenderPassAttachment
private RenderPassAttachment
private RenderPassAttachment
private RenderPassAttachment

m_Albedo;
m_SpecRough;
m_Normal;
m_Emission;
m_Depth;

public DeferredRenderer()
{
// Create the attachment objects. If these attachments are not specifica
// these are treated as temporary surfaces that are discarded at the end

// NOTE: DO NOT ALLOCATE NEW RENDERPASSATTACHMENTS EVERY FRAME!
// These objects only get garbage collected when a Scene is unloaded, so
m_Albedo = new RenderPassAttachment(RenderTextureFormat.ARGB32);
m_SpecRough = new RenderPassAttachment(RenderTextureFormat.ARGB32);
m_Normal = new RenderPassAttachment(RenderTextureFormat.ARGB2101010);
m_Emission = new RenderPassAttachment(RenderTextureFormat.ARGBHalf);
m_Depth = new RenderPassAttachment(RenderTextureFormat.Depth);

// At the beginning of the render pass, clear the emission buffer to all
m_Emission.Clear(new Color(0.0f, 0.0f, 0.0f, 0.0f), 1.0f, 0);
m_Depth.Clear(new Color(), 1.0f, 0);
}

public void ExecuteRenderLoop(Camera camera, CullResults cullResults, Script
{
// Bind the albedo surface to the current camera target, so the final pa
// The second argument specifies whether the existing contents of the su
// in our case we do not need that because we'll be clearing the attachm
// bandwidth on tiled GPUs.
// The third argument specifies whether the rendering results need to be
// the renderpass. We need this as we'll be generating the final image t
// We could do this in the constructor already, but the camera target ma
m_Albedo.BindSurface(BuiltinRenderTextureType.CameraTarget, false, true)

// All other attachments are transient surfaces that are not stored anyw
// those surfaces do not even have a memory allocated for the pixel valu

// Start the renderpass using the given scriptable rendercontext, resolu
using (RenderPass rp = new RenderPass(scriptableRenderContext, camera.pi
{
// Start the first subpass, GBuffer creation: render to albedo, spec
using (new RenderPass.SubPass(rp, new[] { m_Albedo, m_SpecRough, m_N
{
// Render the deferred G-Buffer
RenderGBuffer(cullResults, camera, scriptableRenderContext);
}
// Second subpass, lighting: Render to the emission buffer, read fro
// The last parameter indicates whether the depth buffer can be boun
// Note that some renderers (notably iOS Metal) won't allow reading
// so those renderers should write the Z into an additional FP32 ren
using (new RenderPass.SubPass(rp, new[] { m_Emission }, new[] { m_Al
{

PushGlobalShadowParams(scriptableRenderContext);

RenderLighting(camera, cullResults, scriptableRenderContext);

scriptableRenderContext.DrawSkybox(camera);
}
// Third subpass, tonemapping: Render to albedo (which is bound to t
using (new RenderPass.SubPass(rp, new[] { m_Albedo }, new[] { m_Emis
{
// present frame buffer.
FinalPass(scriptableRenderContext);
}
}
}
}

Properties
colorAttachments

Read only: array of RenderPassAttachment objects currently bound into this RenderPass.

context

Read only: The ScriptableRenderContext object this RenderPass was created for.

depthAttachment

Read only: The depth/stencil attachment used in this RenderPass, or null if none.

height

Read only: The height of the RenderPass surfaces in pixels.

sampleCount

Read only: MSAA sample count for this RenderPass.

width

Read only: The width of the RenderPass surfaces in pixels.

Constructors
RenderPass

Create a RenderPass and start it within the ScriptableRenderContext.

Public Methods
Dispose

End the RenderPass.

Leave feedback

Description
This class encapsulates a single subpass within a RenderPass. RenderPasses can never be standalone, they must
always contain at least one SubPass. See Also: RenderPass.

Constructors
RenderPass.SubPass

Create a subpass and start it.

Public Methods
Dispose

End the subpass.

Leave feedback

Description
A declaration of a single color or depth rendering surface to be attached into a RenderPass.
A RenderPassAttachment object identi es a single color or depth rendering surface that can be used with a
RenderPass. Note that the RenderPassAttachment object derives from UnityEngine.Object so they do not get
garbage collected like normal C# objects. Instead, they are only GC'd when unloading a Scene or when
Resources.UnloadUnusedAssets() is called. Therefore do not create these objects each frame: Instead, create
these objects in the constructor of your rendering class, and reuse those objects each frame.

Properties
clearColor

The currently assigned clear color for this attachment. Default is black.

clearDepth

Currently assigned depth clear value for this attachment. Default value is 1.0.

clearStencil

Currently assigned stencil clear value for this attachment. Default is 0.

format

The RenderTextureFormat of this attachment.

loadAction

The load action to be used on this attachment when the RenderPass starts.

storeAction

The store action to use with this attachment when the RenderPass ends. Only used when
either BindSurface or BindResolveSurface has been called.

Constructors
RenderPassAttachment

Create a RenderPassAttachment to be used with RenderPass.

Public Methods
BindResolveSurface

When the renderpass that uses this attachment ends, resolve the MSAA surface into the
given target.

BindSurface

Binds this RenderPassAttachment to the given target surface.

Clear

When the RenderPass starts, clear this attachment into the color or depth/stencil values
given (depending on the format of this attachment). Changes loadAction to
RenderBu erLoadAction.Clear.

Inherited Members
Properties

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback
Implements interfaces:IRenderPipeline

Description
De nes a series of commands and settings that describes how Unity renders a frame.

Properties
disposed

When the IRenderPipeline is invalid or destroyed this returns true.

Public Methods
Dispose

Dispose the Renderpipeline destroying all internal state.

Render

De nes custom rendering for this RenderPipeline.

Static Methods
BeginCameraRendering

Call the delegate used during SRP rendering before a single camera starts
rendering.

BeginFrameRendering

Call the delegate used during SRP rendering before a render begins.

Events
beginCameraRendering

Call that should be issued by an SRP when the SRP begins to render a Camera so
that other systems can inject per camera render logic.

beginFrameRendering

Call that should be issued by an SRP when the SRP begins to render so that other
systems can inject 'pre render' logic.

Leave feedback
Implements interfaces:IRenderPipelineAsset

Description
An asset that produces a speci c IRenderPipeline.
Default implementation of IRenderPipelineAsset. This manages the lifecylces of inherited types, as well as ensures
that created IRenderPipeline's are invalidated when the asset is changed.
See Also: IRenderPipelineAsset.

Public Methods
CreatePipeline

Create a IRenderPipeline speci c to this asset.

DestroyCreatedInstances

Destroys all cached data and created IRenderLoop's.

GetAutodeskInteractiveMaskedShader

Retrieves the default Autodesk Interactive masked Shader for
this pipeline.

GetAutodeskInteractiveShader

Retrieves the default Autodesk Interactive Shader for this
pipeline.

GetAutodeskInteractiveTransparentShader

Retrieves the default Autodesk Interactive transparent Shader
for this pipeline.

GetDefault2DMaterial

Return the default 2D Material for this pipeline.

GetDefaultLineMaterial

Return the default Line Material for this pipeline.

GetDefaultMaterial

Return the default Material for this pipeline.

GetDefaultParticleMaterial

Return the default particle Material for this pipeline.

GetDefaultShader

Return the default Shader for this pipeline.

GetDefaultTerrainMaterial

Return the default Terrain Material for this pipeline.

GetDefaultUIETC1SupportedMaterial

Return the default UI ETC1 Material for this pipeline.

GetDefaultUIMaterial

Return the default UI Material for this pipeline.

GetDefaultUIOverdrawMaterial

Return the default UI overdraw Material for this pipeline.

GetRenderingLayerMaskNames

Returns the list of names used to display Rendering Layer Mask
UI for this pipeline.

GetTerrainBrushPassIndex

The render index for the terrain brush in the editor.

Protected Methods
CreatedInstances

Returns the list of current IRenderPipeline's created by the asset.

InternalCreatePipeline

Create a IRenderPipeline speci c to this asset.

OnDisable

Default implementation of OnDisable for RenderPipelineAsset. See
ScriptableObject.OnDisable

OnValidate

Default implementation of OnValidate for RenderPipelineAsset. See
MonoBehaviour.OnValidate

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

CreateInstance

Creates an instance of a scriptable object.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

This function is called when the ScriptableObject script is started.

OnDestroy

This function is called when the scriptable object will be destroyed.

OnEnable

This function is called when the object is loaded.

Leave feedback

Description
Render Pipeline manager.

Static Properties
currentPipeline

Returns the instance of the currently used Render Pipeline.

Leave feedback

Description
Describes a material render queue range.
See Also: ScriptableRenderContext.DrawRenderers, FilterRenderersSettings.renderQueueRange.

Static Properties
all

A range that includes all objects.

opaque

A range that includes only opaque objects.

transparent

A range that includes only transparent objects.

Properties
max

Inclusive upper bound for the range.

min

Inclusive lower bound for the range.

Leave feedback

Description
A set of values used to override the render state. Note that it is not enough to set e.g. blendState, but that mask
must also include RenderStateMask.Blend for the override to occur.
See Also: ScriptableRenderContext.DrawRenderers, RenderStateMask, RenderStateMapping.

Properties
blendState

Speci es the new blend state.

depthState

Speci es the new depth state.

mask

Speci es which parts of the render state that is overriden.

rasterState

Speci es the new raster state.

stencilReference

The value to be compared against and/or the value to be written to the bu er based on
the stencil state.

stencilState

Speci es the new stencil state.

Constructors
RenderStateBlock

Creates a new render state block with the speci ed mask.

Leave feedback

Description
Maps a RenderType to a speci c render state override.
See Also: ScriptableRenderContext.DrawRenderers, RenderStateBlock.

Properties
renderType

Speci ces the RenderType to override the render state for.

stateBlock

Speci es the values to override the render state with.

Constructors
RenderStateMapping

Creates a new render state mapping with the speci ed values.

Leave feedback

Description
Values for the blend state.
See Also: RenderStateBlock, ShaderLab: Blending.

Static Properties
Default

Default values for the blend state.

Properties
alphaBlendOperation

Operation used for blending the alpha (A) channel.

colorBlendOperation

Operation used for blending the color (RGB) channel.

destinationAlphaBlendMode

Blend factor used for the alpha (A) channel of the destination.

destinationColorBlendMode

Blend factor used for the color (RGB) channel of the destination.

sourceAlphaBlendMode

Blend factor used for the alpha (A) channel of the source.

sourceColorBlendMode

Blend factor used for the color (RGB) channel of the source.

writeMask

Speci es which color components will get written into the target framebu er.

Constructors
RenderTargetBlendState

Creates a new blend state with the given values.

Leave feedback

Description
Parameters controlling culling process in CullResults.
Typical use case is to compute culling parameters from Camera data, see CullResults.GetCullingParameters.

Properties
accurateOcclusionThreshold

This parameter determines query distance for occlusion culling. The
accurateOcclusionThreshold controls the distance where the level of detail
(LOD) changes.The default value of this parameter is -1, and any value less
than 0 has the same e ect. Default values result in automatic calculation of the
LOD.When you use occlusion culling, the occlusion data of the world varies in
level of detail. In the occlusion data, there are tiles of various sizes. Each tile
contains a cells-and-portals graph. In each cell, visibility is the same. This
means that any two points are visible within the cell. Portals are the openings
between the cells, which determine the visibility between them.The tiles are in
a k-d tree. The tree contains di erent sized tiles, where each tile represents a
level of detail. When you query a small tile, you get accurate culling results at
the price of query time.During the culling, the tile size varies with the distance
from the camera. This gives ner detail closer to the camera, and coarser detail
at further distance.The higher the value is, the higher the accuracy is far away
form the camera. High values can have a negative impact on performance.

cameraProperties

Camera Properties used for culling.

cullingFlags

Culling Flags for the culling.

cullingMask

CullingMask used for culling.

cullingMatrix

CullingMatrix used for culling.

cullingPlaneCount

Number of culling planes to use.

cullStereoProj

The projection matrix generated for single-pass stereo culling.

cullStereoSeparation

Distance between the virtual eyes.

cullStereoView

The view matrix generated for single-pass stereo culling.

isOrthographic

Is the cull orthographic.

layerCull

Layers to cull.

lodParameters

LODParameters for culling.

position

Position for the origin of th cull.

re ectionProbeSortOptions

Re ection Probe Sort options for the cull.

sceneMask

Scene Mask to use for the cull.

shadowDistance

Shadow distance to use for the cull.

Public Methods
GetCullingPlane

Fetch the culling plane at the given index.

GetLayerCullDistance

Get the distance for the culling of a speci c layer.

SetCullingPlane

Set the culling plane at a given index.

SetLayerCullDistance

Set the distance for the culling of a speci c layer.

Leave feedback

Description
De nes state and drawing commands used in a custom render pipelines.
When de ning a custom RenderPipeline, a ScriptableRenderContext is used to set state and drawing commands to be submitted to the GPU.
A RenderPipeline.Render method implementation typically culls objects that don't need to be rendered for all the Cameras (see CullResults), and then makes a series of
calls to ScriptableRenderContext.DrawRenderers intermixed with ScriptableRenderContext.ExecuteCommandBu er calls. These calls set up global Shader properties,
change render targets, dispatch compute shaders, and other rendering tasks. Finally, ScriptableRenderContext.Submit is called to execute the render loop.
See Also: RenderPipeline.

Public Methods
DrawRenderers

Draw subset of visible objects.

DrawShadows

Draw shadow casters for a single light.

DrawSkybox

Draw skybox.

ExecuteCommandBu er

Execute a custom graphics command bu er.

ExecuteCommandBu erAsync

Executes a command bu er on an async compute queue with the queue selected based on the ComputeQueueType parameter passed.
execution:CommandBu er.BeginSampleCommandBu er.CopyCounterValueCommandBu er.CopyTextureCommandBu er.CreateGPUF
of the commands within the bu er are guaranteed to be executed on the same queue. If the target platform does not support async com

SetupCameraProperties

Setup camera speci c global shader variables.

StartMultiEye

Fine-grain control to begin stereo rendering on the scriptable render context.

StereoEndRender

Indicate completion of stereo rendering on a single frame.

StopMultiEye

Stop stereo rendering on the scriptable render context.

Submit

Submit rendering loop for execution.

Static Methods
EmitWorldGeometryForSceneView

Emit UI geometry into the Scene view for rendering.

Leave feedback

Description
Shader pass name identi er.
See Also: DrawRendererSettings, RenderLoop.DrawRenderers.

Constructors
ShaderPassName

Create shader pass name identi er.

Leave feedback

Description
Describes the culling information for a given shadow split (e.g. directional cascade).

Properties
cullingPlaneCount

The number of culling planes.

cullingSphere

The culling sphere. The rst three components of the vector describe the sphere center,
and the last component speci es the radius.

Public Methods
GetCullingPlane

Gets a culling plane.

SetCullingPlane

Sets a culling plane.

Leave feedback

Description
Values for the stencil state.
See Also: RenderStateBlock, ShaderLab: Stencil.

Static Properties
Default

Default values for the stencil state.

Properties
compareFunction

The function used to compare the reference value to the current contents of the
bu er.

compareFunctionBack

The function used to compare the reference value to the current contents of the
bu er for back-facing geometry.

compareFunctionFront

The function used to compare the reference value to the current contents of the
bu er for front-facing geometry.

enabled

Controls whether the stencil bu er is enabled.

failOperation

What to do with the contents of the bu er if the stencil test fails.

failOperationBack

What to do with the contents of the bu er if the stencil test fails for back-facing
geometry.

failOperationFront

What to do with the contents of the bu er if the stencil test fails for front-facing
geometry.

passOperation

What to do with the contents of the bu er if the stencil test (and the depth test)
passes.

passOperationBack

What to do with the contents of the bu er if the stencil test (and the depth test)
passes for back-facing geometry.

passOperationFront

What to do with the contents of the bu er if the stencil test (and the depth test)
passes for front-facing geometry.

readMask

An 8 bit mask as an 0–255 integer, used when comparing the reference value with
the contents of the bu er.

writeMask

An 8 bit mask as an 0–255 integer, used when writing to the bu er.

zFailOperation

What to do with the contents of the bu er if the stencil test passes, but the depth
test fails.

zFailOperationBack

What to do with the contents of the bu er if the stencil test passes, but the depth
test fails for back-facing geometry.

zFailOperationFront

What to do with the contents of the bu er if the stencil test passes, but the depth
test fails for front-facing geometry.

Constructors
StencilState

Creates a new stencil state with the given values.

Leave feedback

Description
Describes the rendering features supported by a given render pipeline.
Set the active supported rendering features when enabling a render pipeline. This will change the state of the
editor UI to re ect the changes.

Static Properties
active

Get / Set a SupportedRenderingFeatures.

Properties
defaultMixedLightingMode

This is the fallback mode if the mode the user had previously
selected is no longer available. See
SupportedRenderingFeatures.supportedMixedLightingModes.

re ectionProbeSupportFlags

Flags for supported re ection probes.

rendererOverridesEnvironmentLighting

Determines if the renderer will override the Environment
Lighting and will no longer need the built-in UI for it.

rendererOverridesFog

Determines if the renderer will override the fog settings in the
Lighting Panel and will no longer need the built-in UI for it.

rendererOverridesOtherLightingSettings

Determines if the renderer will override halo and are settings
in the Lighting Panel and will no longer need the built-in UI for it.

rendererSupportsLightProbeProxyVolumes

Are light probe proxy volumes supported?

rendererSupportsMotionVectors

Are motion vectors supported?

rendererSupportsReceiveShadows

Can renderers support receiving shadows?

rendererSupportsRe ectionProbes

Are re ection probes supported?

rendererSupportsRendererPriority

Determines if the renderer supports renderer priority sorting.

supportedLightmapBakeTypes

What baking types are supported. The unsupported ones will be
hidden from the UI. See LightmapBakeType.

supportedLightmapsModes

Speci es what modes are supported. Has to be at least one. See
LightmapsMode.

supportedMixedLightingModes

Speci es what LightmapMixedBakeMode that are supported.
Please de ne a

SupportedRenderingFeatures.defaultMixedLightingMode in
case multiple modes are supported.

Leave feedback

Description
Same as MixedLightingMode for baking, but is used to determine what is supported by the pipeline.

Properties
None

No mode is supported.

IndirectOnly

Same as MixedLightingMode.IndirectOnly but determines if it is supported by the
pipeline.

Subtractive

Same as MixedLightingMode.Subtractive but determines if it is supported by the pipeline.

Shadowmask

Determines what is supported by the rendering pipeline. This enum is similar to
MixedLightingMode.

Leave feedback

Description
Supported modes for Re ectionProbes.

Properties
None

Default re ection probe support.

Rotation

Rotated re ection probes are supported.

Leave feedback

Description
Holds data of a visible light.
After CullResults.Cull is done, CullResults.visibleLights will contain an array of lights that are visible. The visible
light structure contains packed information for most commonly used Light variables, and a VisibleLight.light
reference to the Light component itself.
See Also: CullResults.visibleLights, Light.

Properties
nalColor

Light color multiplied by intensity.

ags

Light ags, see VisibleLightFlags.

light

Accessor to Light component.

lightType

Light type.

localToWorld

Light transformation matrix.

range

Light range.

screenRect

Light's in uence rectangle on screen.

spotAngle

Spot light angle.

Leave feedback

Description
Holds data of a visible re ection probe.
After CullResults.Cull is done, CullResults.visibleRe ectionProbes will contain an array of re ection probes that are
visible. The visible re ection probe structure contains packed information for most commonly used
Re ectionProbe variables, and a VisibleRe ectionProbe.probe reference to the component itself.
See Also: CullResults.visibleRe ectionProbes, Re ectionProbe.

Properties
blendDistance

Probe blending distance.

bounds

Probe bounding box.

boxProjection

Should probe use box projection.

center

Probe projection center.

hdr

Shader data for probe HDR texture decoding.

importance

Probe importance.

localToWorld

Probe transformation matrix.

probe

Accessor to Re ectionProbe component.

texture

Probe texture.

Leave feedback

Description
De nes a series of commands and settings that describes how Unity renders a frame.
Unity supports a few built-in rendering pipelines optimized for speci c platforms. These pipelines are open
source and available in the Github project.
You can also de ne your own custom RenderPipeline tailored for your speci c project needs. To create a custom
RenderPipeline:
1) Create a script that extends RenderPipelineAsset or IRenderPipelineAsset, this will become the manager and
provider for you RenderPipeline. 2) Implement IRenderPipeline and override IRenderPipeline.Render and
IRenderPipeline._disposed 3) Create a RenderPipeline Asset by using ScriptableObject.CreateAsset. 3) Use your
RenderPipeline either by assigning it in the GraphicsSettings in the Editor or by using the scripting interface
GraphicsSettings.renderPipeline".

Properties
disposed

When the IRenderPipeline is invalid or destroyed this returns true.

Public Methods
Render

De nes custom rendering for this RenderPipeline.

Leave feedback

Description
An asset that produces a speci c IRenderPipeline.
A RenderPipelineAsset is responsible for constructing and managing the lifecycle of a IRenderPipeline. This
involves holding settings information, producing the instance used for rendering, and destroying created
pipelines when the settings become invalid.

Public Methods
CreatePipeline

Create a IRenderPipeline speci c to this asset.

DestroyCreatedInstances

Override this method to destroy RenderPipeline cached state.

GetTerrainBrushPassIndex

The render index for the terrain brush in the editor.

Leave feedback

Description
Flags controlling RenderLoop.DrawRenderers.
See Also: DrawRendererSettings. ags, RenderLoop.DrawRenderers.

Properties
None

No ags are set.

EnableDynamicBatching

When set, enables dynamic batching.

EnableInstancing

When set, enables GPU instancing.

Leave feedback

Description
Use this format usages to gure out the capabilities of speci c GraphicsFormat
Each graphics card may not support all usages across formats. Use SystemInfo.IsFormatSupported to check which
usages the graphics card supports.
See Also: Texture2D, texture assets.

Properties
Sample

To create and sample textures.

Linear

To sample textures with a linear lter

Render

To create and render to a rendertexture.

Blend

To blend on a rendertexture.

LoadStore

To perform resource load and store on a texture

MSAA2x

To create and render to a MSAA 2X rendertexture.

MSAA4x

To create and render to a MSAA 4X rendertexture.

MSAA8x

To create and render to a MSAA 8X rendertexture.

Leave feedback

Description
Use this format to create either Textures or RenderTextures from scripts.

using UnityEngine;
using UnityEngine.Experimental.Rendering;

public class ExampleScript : MonoBehaviour
{
TextureCreationFlags flags;
void Start()
{
// Create a new texture and assign it to the material of the renderer.
var texture = new Texture2D(128, 128, GraphicsFormat.R8G8B8A8_SRGB, flag
GetComponent().material.mainTexture = texture;
}
}

Each graphics card may not support all usages across formats. Use SystemInfo.IsFormatSupported to check which
usages the graphics card supports.
Each "format" is represented by a single enum value. The name of a format is based on the following criteria: - For
color formats, the component-format speci es the size of the R, G, B, and A components (if present). - For
depth/stencil formats, the component-format speci es the size of the depth (D) and stencil (S) components (if
present). - UNorm: The components are unsigned normalized values in the range [0,1]. - SNorm: The components
are signed normalized values in the range [-1,1]. - UInt: The components are unsigned integer values in the range
[0, 2^(n-1)]. - SInt: The components are signed integer values in the range [-2^(n-1),2^(n-1)-1]. - UFloat: The
components are unsigned oating-point numbers (used by packed, shared exponent, and some compressed
formats). - SFloat: The components are signed oating-point numbers. - SRGB: The R, G, and B components are
unsigned normalized values that represent values using sRGB nonlinear encoding, while the A component (if one
exists) is a regular unsigned normalized value. - PACKnn: The format is packed into an underlying type with nn
bits.
See Also: Texture2D, texture assets.

Properties
None

The format is not speci ed.

R8_SRGB

A one-component, 8-bit unsigned normalized format that has a single 8bit R component stored with sRGB nonlinear encoding.

R8G8_SRGB

A two-component, 16-bit unsigned normalized format that has an 8-bit R
component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G
component stored with sRGB nonlinear encoding in byte 1.

R8G8B8_SRGB

A three-component, 24-bit unsigned normalized format that has an 8-bit
R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G
component stored with sRGB nonlinear encoding in byte 1, and an 8-bit B
component stored with sRGB nonlinear encoding in byte 2.

R8G8B8A8_SRGB

A four-component, 32-bit unsigned normalized format that has an 8-bit R
component stored with sRGB nonlinear encoding in byte 0, an 8-bit G
component stored with sRGB nonlinear encoding in byte 1, an 8-bit B
component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A
component in byte 3.

R8_UNorm

A one-component, 8-bit unsigned normalized format that has a single 8bit R component.

R8G8_UNorm

A two-component, 16-bit unsigned normalized format that has an 8-bit R
component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G
component stored with sRGB nonlinear encoding in byte 1.

R8G8B8_UNorm

A three-component, 24-bit unsigned normalized format that has an 8-bit
R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B
component in byte 2.

R8G8B8A8_UNorm

A four-component, 32-bit unsigned normalized format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, an 8-bit B
component in byte 2, and an 8-bit A component in byte 3.

R8_SNorm

A one-component, 8-bit signed normalized format that has a single 8-bit R
component.

R8G8_SNorm

A two-component, 16-bit signed normalized format that has an 8-bit R
component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G
component stored with sRGB nonlinear encoding in byte 1.

R8G8B8_SNorm

A three-component, 24-bit signed normalized format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, and an 8-bit B
component in byte 2.

R8G8B8A8_SNorm

A four-component, 32-bit signed normalized format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, an 8-bit B
component in byte 2, and an 8-bit A component in byte 3.

R8_UInt

A one-component, 8-bit unsigned integer format that has a single 8-bit R
component.

R8G8_UInt

A two-component, 16-bit unsigned integer format that has an 8-bit R
component in byte 0, and an 8-bit G component in byte 1.

R8G8B8_UInt

A three-component, 24-bit unsigned integer format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, and an 8-bit B
component in byte 2.

R8G8B8A8_UInt

A four-component, 32-bit unsigned integer format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, an 8-bit B
component in byte 2, and an 8-bit A component in byte 3.

R8_SInt

A one-component, 8-bit signed integer format that has a single 8-bit R
component.

R8G8_SInt

A two-component, 16-bit signed integer format that has an 8-bit R
component in byte 0, and an 8-bit G component in byte 1.

R8G8B8_SInt

A three-component, 24-bit signed integer format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, and an 8-bit B
component in byte 2.

R8G8B8A8_SInt

A four-component, 32-bit signed integer format that has an 8-bit R
component in byte 0, an 8-bit G component in byte 1, an 8-bit B
component in byte 2, and an 8-bit A component in byte 3.

R16_UNorm

A one-component, 16-bit unsigned normalized format that has a single
16-bit R component.

R16G16_UNorm

A two-component, 32-bit unsigned normalized format that has a 16-bit R
component in bytes 0..1, and a 16-bit G component in bytes 2..3.

R16G16B16_UNorm

A three-component, 48-bit unsigned normalized format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit
B component in bytes 4..5.

R16G16B16A16_UNorm

A four-component, 64-bit unsigned normalized format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B
component in bytes 4..5, and a 16-bit A component in bytes 6..7.

R16_SNorm

A one-component, 16-bit signed normalized format that has a single 16bit R component.

R16G16_SNorm

A two-component, 32-bit signed normalized format that has a 16-bit R
component in bytes 0..1, and a 16-bit G component in bytes 2..3.

R16G16B16_SNorm

A three-component, 48-bit signed normalized format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit
B component in bytes 4..5.

R16G16B16A16_SNorm

A four-component, 64-bit signed normalized format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B
component in bytes 4..5, and a 16-bit A component in bytes 6..7.

R16_UInt

A one-component, 16-bit unsigned integer format that has a single 16-bit

R component.
R16G16_UInt

A two-component, 32-bit unsigned integer format that has a 16-bit R
component in bytes 0..1, and a 16-bit G component in bytes 2..3.

R16G16B16_UInt

A three-component, 48-bit unsigned integer format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit
B component in bytes 4..5.

R16G16B16A16_UInt

A four-component, 64-bit unsigned integer format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B
component in bytes 4..5, and a 16-bit A component in bytes 6..7.

R16_SInt

A one-component, 16-bit signed integer format that has a single 16-bit R
component.

R16G16_SInt

A two-component, 32-bit signed integer format that has a 16-bit R
component in bytes 0..1, and a 16-bit G component in bytes 2..3.

R16G16B16_SInt

A three-component, 48-bit signed integer format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit
B component in bytes 4..5.

R16G16B16A16_SInt

A four-component, 64-bit signed integer format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B
component in bytes 4..5, and a 16-bit A component in bytes 6..7.

R32_UInt

A one-component, 32-bit unsigned integer format that has a single 32-bit
R component.

R32G32_UInt

A two-component, 64-bit unsigned integer format that has a 32-bit R
component in bytes 0..3, and a 32-bit G component in bytes 4..7.

R32G32B32_UInt

A three-component, 96-bit unsigned integer format that has a 32-bit R
component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit
B component in bytes 8..11.

R32G32B32A32_UInt

A four-component, 128-bit unsigned integer format that has a 32-bit R
component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B
component in bytes 8..11, and a 32-bit A component in bytes 12..15.

R32_SInt

A one-component, 32-bit signed integer format that has a single 32-bit R
component.

R32G32_SInt

A two-component, 64-bit signed integer format that has a 32-bit R
component in bytes 0..3, and a 32-bit G component in bytes 4..7.

R32G32B32_SInt

A three-component, 96-bit signed integer format that has a 32-bit R
component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit
B component in bytes 8..11.

R32G32B32A32_SInt

A four-component, 128-bit signed integer format that has a 32-bit R
component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B
component in bytes 8..11, and a 32-bit A component in bytes 12..15.

R16_SFloat

A one-component, 16-bit signed oating-point format that has a single 16bit R component.

R16G16_SFloat

A two-component, 32-bit signed oating-point format that has a 16-bit R
component in bytes 0..1, and a 16-bit G component in bytes 2..3.

R16G16B16_SFloat

A three-component, 48-bit signed oating-point format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit
B component in bytes 4..5.

R16G16B16A16_SFloat

A four-component, 64-bit signed oating-point format that has a 16-bit R
component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B
component in bytes 4..5, and a 16-bit A component in bytes 6..7.

R32_SFloat

A one-component, 32-bit signed oating-point format that has a single 32bit R component.

R32G32_SFloat

A two-component, 64-bit signed oating-point format that has a 32-bit R
component in bytes 0..3, and a 32-bit G component in bytes 4..7.

R32G32B32_SFloat

A three-component, 96-bit signed oating-point format that has a 32-bit R
component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit
B component in bytes 8..11.

R32G32B32A32_SFloat

A four-component, 128-bit signed oating-point format that has a 32-bit R
component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B
component in bytes 8..11, and a 32-bit A component in bytes 12..15.

B8G8R8_SRGB

A three-component, 24-bit unsigned normalized format that has an 8-bit
R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G
component stored with sRGB nonlinear encoding in byte 1, and an 8-bit B
component stored with sRGB nonlinear encoding in byte 2.

B8G8R8A8_SRGB

A four-component, 32-bit unsigned normalized format that has an 8-bit B
component stored with sRGB nonlinear encoding in byte 0, an 8-bit G
component stored with sRGB nonlinear encoding in byte 1, an 8-bit R
component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A
component in byte 3.

B8G8R8_UNorm

A three-component, 24-bit unsigned normalized format that has an 8-bit
B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R
component in byte 2.

B8G8R8A8_UNorm

A four-component, 32-bit unsigned normalized format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, an 8-bit R
component in byte 2, and an 8-bit A component in byte 3.

B8G8R8_SNorm

A three-component, 24-bit signed normalized format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, and an 8-bit R
component in byte 2.

B8G8R8A8_SNorm

A four-component, 32-bit signed normalized format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, an 8-bit R
component in byte 2, and an 8-bit A component in byte 3.

B8G8R8_UInt

A three-component, 24-bit unsigned integer format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, and an 8-bit R
component in byte 2

B8G8R8A8_UInt

A four-component, 32-bit unsigned integer format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, an 8-bit R
component in byte 2, and an 8-bit A component in byte 3.

B8G8R8_SInt

A three-component, 24-bit signed integer format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, and an 8-bit R
component in byte 2.

B8G8R8A8_SInt

A four-component, 32-bit signed integer format that has an 8-bit B
component in byte 0, an 8-bit G component in byte 1, an 8-bit R
component in byte 2, and an 8-bit A component in byte 3.

R4G4B4A4_UNormPack16

A four-component, 16-bit packed unsigned normalized format that has a
4-bit R component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit
B component in bits 4..7, and a 4-bit A component in bits 0..3.

B4G4R4A4_UNormPack16

A four-component, 16-bit packed unsigned normalized format that has a
4-bit B component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit
R component in bits 4..7, and a 4-bit A component in bits 0..3.

R5G6B5_UNormPack16

A three-component, 16-bit packed unsigned normalized format that has a
5-bit R component in bits 11..15, a 6-bit G component in bits 5..10, and a
5-bit B component in bits 0..4.

B5G6R5_UNormPack16

A three-component, 16-bit packed unsigned normalized format that has a
5-bit B component in bits 11..15, a 6-bit G component in bits 5..10, and a
5-bit R component in bits 0..4.

R5G5B5A1_UNormPack16

A four-component, 16-bit packed unsigned normalized format that has a
5-bit R component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit
B component in bits 1..5, and a 1-bit A component in bit 0.

B5G5R5A1_UNormPack16

A four-component, 16-bit packed unsigned normalized format that has a
5-bit B component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit
R component in bits 1..5, and a 1-bit A component in bit 0.

A1R5G5B5_UNormPack16

A four-component, 16-bit packed unsigned normalized format that has a
1-bit A component in bit 15, a 5-bit R component in bits 10..14, a 5-bit G

component in bits 5..9, and a 5-bit B component in bits 0..4.
E5B9G9R9_UFloatPack32

A three-component, 32-bit packed unsigned oating-point format that has
a 5-bit shared exponent in bits 27..31, a 9-bit B component mantissa in
bits 18..26, a 9-bit G component mantissa in bits 9..17, and a 9-bit R
component mantissa in bits 0..8.

B10G11R11_UFloatPack32

A three-component, 32-bit packed unsigned oating-point format that has
a 10-bit B component in bits 22..31, an 11-bit G component in bits 11..21,
an 11-bit R component in bits 0..10.

A2B10G10R10_UNormPack32

A four-component, 32-bit packed unsigned normalized format that has a
2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10bit G component in bits 10..19, and a 10-bit R component in bits 0..9.

A2B10G10R10_UIntPack32

A four-component, 32-bit packed unsigned integer format that has a 2-bit
A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G
component in bits 10..19, and a 10-bit R component in bits 0..9.

A2B10G10R10_SIntPack32

A four-component, 32-bit packed signed integer format that has a 2-bit A
component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G
component in bits 10..19, and a 10-bit R component in bits 0..9.

A2R10G10B10_UNormPack32

A four-component, 32-bit packed unsigned normalized format that has a
2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10bit G component in bits 10..19, and a 10-bit B component in bits 0..9.

A2R10G10B10_UIntPack32

A four-component, 32-bit packed unsigned integer format that has a 2-bit
A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G
component in bits 10..19, and a 10-bit B component in bits 0..9.

A2R10G10B10_SIntPack32

A four-component, 32-bit packed signed integer format that has a 2-bit A
component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G
component in bits 10..19, and a 10-bit B component in bits 0..9.

A2R10G10B10_XRSRGBPack32

A four-component, 32-bit packed unsigned normalized format that has a
2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10bit G component in bits 10..19, and a 10-bit B component in bits 0..9. The
components are gamma encoded and their values range from -0.5271 to
1.66894. The alpha component is clamped to either 0.0 or 1.0 on
sampling, rendering, and writing operations.

A2R10G10B10_XRUNormPack32

A four-component, 32-bit packed unsigned normalized format that has a
2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10bit G component in bits 10..19, and a 10-bit B component in bits 0..9. The
components are linearly encoded and their values range from -0.752941
to 1.25098 (pre-expansion). The alpha component is clamped to either 0.0
or 1.0 on sampling, rendering, and writing operations.

R10G10B10_XRSRGBPack32

A four-component, 32-bit packed unsigned normalized format that has a

10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and
a 10-bit B component in bits 0..9. The components are gamma encoded
and their values range from -0.5271 to 1.66894. The alpha component is
clamped to either 0.0 or 1.0 on sampling, rendering, and writing
operations.
R10G10B10_XRUNormPack32

A four-component, 32-bit packed unsigned normalized format that has a
10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and
a 10-bit B component in bits 0..9. The components are linearly encoded
and their values range from -0.752941 to 1.25098 (pre-expansion).

A10R10G10B10_XRSRGBPack32

A four-component, 64-bit packed unsigned normalized format that has a
10-bit A component in bits 30..39, a 10-bit R component in bits 20..29, a
10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
The components are gamma encoded and their values range from
-0.5271 to 1.66894. The alpha component is clamped to either 0.0 or 1.0
on sampling, rendering, and writing operations.

A10R10G10B10_XRUNormPack32

A four-component, 64-bit packed unsigned normalized format that has a
10-bit A component in bits 30..39, a 10-bit R component in bits 20..29, a
10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
The components are linearly encoded and their values range from
-0.752941 to 1.25098 (pre-expansion). The alpha component is clamped
to either 0.0 or 1.0 on sampling, rendering, and writing operations.

D16_UNorm

A one-component, 16-bit unsigned normalized format that has a single
16-bit depth component.

D24_UNorm

A two-component, 32-bit format that has 24 unsigned normalized bits in
the depth component and, optionally: 8 bits that are unused.

D24_UNorm_S8_UInt

A two-component, 32-bit packed format that has 8 unsigned integer bits
in the stencil component, and 24 unsigned normalized bits in the depth
component.

D32_SFloat

A one-component, 32-bit signed oating-point format that has 32-bits in
the depth component.

D32_SFloat_S8_Uint

A two-component format that has 32 signed oat bits in the depth
component and 8 unsigned integer bits in the stencil component. There
are optionally: 24-bits that are unused.

S8_Uint

A one-component, 8-bit unsigned integer format that has 8-bits in the
stencil component.

RGBA_DXT1_SRGB

A three-component, block-compressed format. Each 64-bit compressed
texel block encodes a 4×4 rectangle of unsigned normalized RGB texel
data with sRGB nonlinear encoding. This format has a 1 bit alpha channel.

RGBA_DXT1_UNorm

A three-component, block-compressed format. Each 64-bit compressed

texel block encodes a 4×4 rectangle of unsigned normalized RGB texel
data. This format has a 1 bit alpha channel.
RGBA_DXT3_SRGB

A four-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 64 bits encoding alpha values followed by
64 bits encoding RGB values with sRGB nonlinear encoding.

RGBA_DXT3_UNorm

A four-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 64 bits encoding alpha values followed by
64 bits encoding RGB values.

RGBA_DXT5_SRGB

A four-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 64 bits encoding alpha values followed by
64 bits encoding RGB values with sRGB nonlinear encoding.

RGBA_DXT5_UNorm

A four-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 64 bits encoding alpha values followed by
64 bits encoding RGB values.

R_BC4_UNorm

A one-component, block-compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
red texel data.

R_BC4_SNorm

A one-component, block-compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of signed normalized red
texel data.

RG_BC5_UNorm

A two-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RG texel data with the rst 64 bits encoding red values followed by 64 bits
encoding green values.

RG_BC5_SNorm

A two-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of signed normalized RG
texel data with the rst 64 bits encoding red values followed by 64 bits
encoding green values.

RGB_BC6H_UFloat

A three-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned oatingpoint RGB texel data.

RGB_BC6H_SFloat

A three-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of signed oating-point
RGB texel data.

RGBA_BC7_SRGB

A four-component, block-compressed format where each 128-bit

compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with sRGB nonlinear encoding applied to the RGB
components.
RGBA_BC7_UNorm

A four-component, block-compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data.

RGB_PVRTC_2Bpp_SRGB

A three-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 8×4 rectangle of unsigned normalized
RGB texel data with sRGB nonlinear encoding. This format has no alpha
and is considered opaque.

RGB_PVRTC_2Bpp_UNorm

A three-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 8×4 rectangle of unsigned normalized
RGB texel data. This format has no alpha and is considered opaque.

RGB_PVRTC_4Bpp_SRGB

A three-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data with sRGB nonlinear encoding. This format has no alpha
and is considered opaque.

RGB_PVRTC_4Bpp_UNorm

A three-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data. This format has no alpha and is considered opaque.

RGBA_PVRTC_2Bpp_SRGB

A four-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 8×4 rectangle of unsigned normalized
RGBA texel data with the rst 32 bits encoding alpha values followed by
32 bits encoding RGB values with sRGB nonlinear encoding applied.

RGBA_PVRTC_2Bpp_UNorm

A four-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 8×4 rectangle of unsigned normalized
RGBA texel data with the rst 32 bits encoding alpha values followed by
32 bits encoding RGB values.

RGBA_PVRTC_4Bpp_SRGB

A four-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 32 bits encoding alpha values followed by
32 bits encoding RGB values with sRGB nonlinear encoding applied.

RGBA_PVRTC_4Bpp_UNorm

A four-component, PVRTC compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 32 bits encoding alpha values followed by
32 bits encoding RGB values.

RGB_ETC_UNorm

A three-component, ETC compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data. This format has no alpha and is considered opaque.

RGB_ETC2_SRGB

A three-component, ETC2 compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data with sRGB nonlinear encoding. This format has no alpha
and is considered opaque.

RGB_ETC2_UNorm

A three-component, ETC2 compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data. This format has no alpha and is considered opaque.

RGB_A1_ETC2_SRGB

A four-component, ETC2 compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha.

RGB_A1_ETC2_UNorm

A four-component, ETC2 compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGB texel data, and provides 1 bit of alpha.

RGBA_ETC2_SRGB

A four-component, ETC2 compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 64 bits encoding alpha values followed by
64 bits encoding RGB values with sRGB nonlinear encoding applied.

RGBA_ETC2_UNorm

A four-component, ETC2 compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with the rst 64 bits encoding alpha values followed by
64 bits encoding RGB values.

R_EAC_UNorm

A one-component, ETC2 compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
red texel data.

R_EAC_SNorm

A one-component, ETC2 compressed format where each 64-bit
compressed texel block encodes a 4×4 rectangle of signed normalized red
texel data.

RG_EAC_UNorm

A two-component, ETC2 compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RG texel data with the rst 64 bits encoding red values followed by 64 bits
encoding green values.

RG_EAC_SNorm

A two-component, ETC2 compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of signed normalized RG
texel data with the rst 64 bits encoding red values followed by 64 bits
encoding green values.

RGBA_ASTC4X4_SRGB

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data with sRGB nonlinear encoding applied to the RGB
components.

RGBA_ASTC4X4_UNorm

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 4×4 rectangle of unsigned normalized
RGBA texel data.

RGBA_ASTC5X5_SRGB

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 5×5 rectangle of unsigned normalized
RGBA texel data with sRGB nonlinear encoding applied to the RGB
components.

RGBA_ASTC5X5_UNorm

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 5×5 rectangle of unsigned normalized
RGBA texel data.

RGBA_ASTC6X6_SRGB

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 6×6 rectangle of unsigned normalized
RGBA texel data with sRGB nonlinear encoding applied to the RGB
components.

RGBA_ASTC6X6_UNorm

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 6×6 rectangle of unsigned normalized
RGBA texel data.

RGBA_ASTC8X8_SRGB

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes an 8×8 rectangle of unsigned normalized
RGBA texel data with sRGB nonlinear encoding applied to the RGB
components.

RGBA_ASTC8X8_UNorm

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes an 8×8 rectangle of unsigned normalized
RGBA texel data.

RGBA_ASTC10X10_SRGB

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 10×10 rectangle of unsigned
normalized RGBA texel data with sRGB nonlinear encoding applied to the
RGB components.

RGBA_ASTC10X10_UNorm

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 10×10 rectangle of unsigned
normalized RGBA texel data.

RGBA_ASTC12X12_SRGB

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 12×12 rectangle of unsigned
normalized RGBA texel data with sRGB nonlinear encoding applied to the
RGB components.

RGBA_ASTC12X12_UNorm

A four-component, ASTC compressed format where each 128-bit
compressed texel block encodes a 12×12 rectangle of unsigned
normalized RGBA texel data.

Leave feedback

Description
Visible re ection probes sorting options.
See Also: CullingParameters.re ectionProbeSortOptions.

Properties
None

Do not sort re ection probes.

Importance

Sort probes by importance.

Size

Sort probes from largest to smallest.

ImportanceThenSize

Sort probes by importance, then by size.

Leave feedback

Description
What kind of per-object data to setup during rendering.
At minimum, object transformation matrices are set up per-object, but extra data (e.g. lightmaps, light probes
etc.) can be set up by combining RendererCon guration ags.
See Also: DrawRendererSettings, RenderLoop.DrawRenderers.

Properties
None

Do not setup any particular per-object data besides the
transformation matrix.

PerObjectLightProbe

Setup per-object light probe SH data.

PerObjectRe ectionProbes

Setup per-object re ection probe data.

PerObjectLightProbeProxyVolume

Setup per-object light probe proxy volume data.

PerObjectLightmaps

Setup per-object lightmaps.

ProvideLightIndices

Setup per-object light indices.

PerObjectMotionVectors

Setup per-object motion vectors.

PerObjectOcclusionProbe

Setup per-object occlusion probe data.

PerObjectOcclusionProbeProxyVolume

Setup per-object occlusion probe proxy volume data (occlusion in
alpha channels).

PerObjectShadowMask

Setup per-object shadowmask.

Leave feedback

Description
Speci es which parts of the render state that is overriden.
In order to override multiple parts of the render state, the desired values should be logically OR'd together.
See Also: RenderStateBlock.

Properties
Nothing

No render states are overridden.

Blend

When set, the blend state is overridden.

Raster

When set, the raster state is overridden.

Depth

When set, the depth state is overridden.

Stencil

When set, the stencil state and reference value is overridden.

Everything

When set, all render states are overridden.

Leave feedback

Description
How to sort objects during rendering.
Control the way Unity sorts objects before drawing them by using and combining these ags.
The basic ags are:
- SortingLayer,
- RenderQueue,
- BackToFront,
- QuantizedFrontToBack,
- OptimizeStateChanges,
- CanvasOrder.
Multiple ags, when combined, are applied in the above order.
Some commonly-used sorting combinations are provided for convenience. Use CommonOpaque for opaque
objects. This combination of ags includes optimization for reducing draw state changes and draws roughly frontto-back to reduce drawing over the same pixels many times. Use CommonTransparent for transparent objects,
which need to be sorted from back to front before being drawn for them all to be visible.
See Also: DrawRendererSettings.sorting, RenderLoop.DrawRenderers.

Properties
None

Do not sort objects.

SortingLayer

Sort by renderer sorting layer.

RenderQueue

Sort by material render queue.

BackToFront

Sort objects back to front.

QuantizedFrontToBack

Sort objects in rough front-to-back buckets.

OptimizeStateChanges

Sort objects to reduce draw state changes.

CanvasOrder

Sort renderers taking canvas order into account.

RendererPriority

Sorts objects by renderer priority.

CommonOpaque

Typical sorting for opaque objects.

CommonTransparent

Typical sorting for transparencies.

Leave feedback

Description
Flags for VisibleLight.
See Also: VisibleLight. ags, CullResults.visibleLights.

Properties
None

No ags are set.

IntersectsNearPlane

Light intersects near clipping plane.

IntersectsFarPlane

Light intersects far clipping plane.

Leave feedback

Description
Describes the information about the edge and how to tessellate it.

Properties
end

The maximum angle to be considered within this range.

order

The render order of the edges that belong in this range.

sprites

The list of Sprites that are associated with this range.

start

The minimum angle to be considered within this range.

Leave feedback

Description
A collection of APIs that facilitate pixel perfect rendering of sprite-based renderers.

Static Properties
pixelSnapSpacing

To achieve a pixel perfect render, Sprites must be displaced to discrete positions at
render time. This value de nes the minimum distance between these positions. This
doesn’t a ect the GameObject's transform position.

Leave feedback

Description
Data that describes the important points of the shape.

Properties
leftTangent

The position of the left tangent in local space.

mode

The various modes of the tangent handles. They could be continuous or broken.

position

The position of this point in the object's local space.

rightTangent

The position of the right tangent point in the local space.

Leave feedback

Description
A struct that holds a rich set of information that describes the bind pose of this Sprite.
Most importantly this struct describes the hierarchy and various other spatial relationships between the bones.

Properties
length

The length of the bone. This is important for the leaf bones to describe their length
without needing another bone as the terminal bone.

name

The name of the bone. This is useful when recreating bone hierarchy at editor or runtime.
You can also use this as a way of resolving the bone path when a Sprite is bound to a
more complex or richer hierarchy.

parentId

The ID of the parent of this bone.

position

The position in local space of this bone.

rotation

The rotation of this bone in local space.

Leave feedback

Description
A list of methods designed for reading and writing to the rich internal data of a Sprite.
It is now possible to read and write to all the channels of the VertexAttribute, BoneWeight, BindPose and the
SpriteBones of a Sprite.

Static Methods
GetBindPoses

Returns an array of BindPoses.

GetBones

Returns a list of SpriteBone in this Sprite.

GetBoneWeights

Returns a list of BoneWeight that corresponds to each and every vertice in this Sprite.

GetIndices

Returns a list of indices. This is the same as Sprite.triangle.

GetVertexAttribute

Retrieves a strided accessor to the internal vertex attributes.

GetVertexCount

Returns the number of vertices in this Sprite.

HasVertexAttribute

Checks if a speci c channel exists for this Sprite.

SetBindPoses

Sets the bind poses for this Sprite.

SetBones

Sets the SpriteBones for this Sprite.

SetBoneWeights

Sets the BoneWeight for this Sprite. The length of the input array must match the
number of vertices.

SetIndices

Set the indices for this Sprite. This is the same as Sprite.triangle.

SetVertexAttribute

Sets a speci c channel of the VertexAttribute.

SetVertexCount

Sets the vertex count. This resizes the internal bu er. It also preserves any
con gurations of VertexAttributes.

Leave feedback

Description
A list of methods that allow the caller to override what the SpriteRenderer renders.
This feature is used mainly in the Sprite Animation feature. The SpriteSkin component gets the deformable bu er
and deforms it using the skin weights and bones. After the deformation is complete, the Sprite Renderer uses it to
render the Sprite instead of the Sprite's original mesh.

Static Methods
DeactivateDeformableBu er

Stop using the deformable bu er to render the Sprite and use the original
mesh instead.

GetDeformableVertices

Returns an array of vertices to be deformed by the caller.

UpdateDeformableBu er

Provides the JobHandle that updates the deform bu er to the SpriteRenderer.

Leave feedback

Description
Additional data about the shape's control point. This is useful during tessellation of the shape.

Properties
bevelCuto

The threshold of the angle that decides if it should be tessellated as a curve or a corner.

bevelSize

The radius of the curve to be tessellated.

corner

True will indicate that this point should be tessellated as a corner or a continuous line
otherwise.

height

The height of the tessellated edge.

spriteIndex

The Sprite to be used for a particular edge.

Leave feedback

Description
Input parameters for the SpriteShape tessellator.

Properties
adaptiveUV

If enabled, the tessellator will adapt the size of the quads based on the height of the edge.

angleThreshold

The threshold of the angle that indicates whether it is a corner or not.

bevelCuto

The threshold of the angle that decides if it should be tessellated as a curve or a corner.

bevelSize

The radius of the curve to be tessellated.

borderPivot

The local displacement of the Sprite when tessellated.

carpet

If true, the Shape will be tessellated as a closed form.

llScale

The scale to be used to calculate the UVs of the ll texture.

llTexture

The texture to be used for the ll of the SpriteShape.

smartSprite

If enabled the tessellator will consider creating corners based on the various input
parameters.

splineDetail

The tessellation quality of the input Spline that determines the complexity of the mesh.

spriteBorders

The borders to be used for calculating the uv of the edges based on the border info found
in Sprites.

transform

The world space transform of the game object used for calculating the UVs of the ll
texture.

Leave feedback

Description
Renders SpriteShapes de ned through the SpriteShapeUtility.GenerateSpriteShape API.

Inherited Members
Properties
gameObject

The game object this component is attached to. A component is always
attached to a game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the
user?

name

The name of the object.

allowOcclusionWhenDynamic

Controls if dynamic occlusion culling should be performed for this
renderer.

bounds

The bounding volume of the renderer (Read Only).

enabled

Makes the rendered 3D object visible if enabled.

isPartOfStaticBatch

Has this renderer been statically batched with any other renderers?

isVisible

Is this renderer visible in any camera? (Read Only)

lightmapIndex

The index of the baked lightmap applied to this renderer.

lightmapScaleO set

The UV scale & o set used for a lightmap.

lightProbeProxyVolumeOverride

If set, the Renderer will use the Light Probe Proxy Volume component
attached to the source GameObject.

lightProbeUsage

The light probe interpolation type.

localToWorldMatrix

Matrix that transforms a point from local space into world space (Read
Only).

material

Returns the rst instantiated Material assigned to the renderer.

materials

Returns all the instantiated materials of this object.

motionVectorGenerationMode

Speci es the mode for motion vector rendering.

probeAnchor

If set, Renderer will use this Transform's position to nd the light or

re ection probe.
realtimeLightmapIndex

The index of the realtime lightmap applied to this renderer.

realtimeLightmapScaleO set

The UV scale & o set used for a realtime lightmap.

receiveShadows

Does this object receive shadows?

re ectionProbeUsage

Should re ection probes be used for this Renderer?

rendererPriority

This value sorts renderers by priority. Lower values are rendered rst and
higher values are rendered last.

renderingLayerMask

Determines which rendering layer this renderer lives on.

shadowCastingMode

Does this object cast shadows?

sharedMaterial

The shared material of this object.

sharedMaterials

All the shared materials of this object.

sortingLayerID

Unique ID of the Renderer's sorting layer.

sortingLayerName

Name of the Renderer's sorting layer.

sortingOrder

Renderer's order within a sorting layer.

worldToLocalMatrix

Matrix that transforms a point from world space into local space (Read
Only).

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

GetClosestRe ectionProbes

Returns an array of closest re ection probes with weights, weight shows how
much in uence the probe has on the renderer, this value is also used when
blending between re ection probes occur.

GetMaterials

Returns all the instantiated materials of this object.

GetPropertyBlock

Get per-Renderer or per-Material property block.

GetSharedMaterials

Returns all the shared materials of this object.

HasPropertyBlock

Returns true if the Renderer has a material property block attached via
SetPropertyBlock.

SetPropertyBlock

Lets you set or clear per-renderer or per-material parameter overrides.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
OnBecameInvisible

OnBecameInvisible is called when the object is no longer visible by any camera.

OnBecameVisible

OnBecameVisible is called when the object became visible by any camera.

Leave feedback

Description
A static class that helps tessellate a SpriteShape mesh.

Static Methods
Generate

Generate a mesh based on input parameters.

GenerateSpriteShape

Generate a mesh based on input parameters.

Leave feedback

Description
This enumeration contains values to control how an element is aligned in its parent during the layout phase.
The cross axis of a container is perpendicular to the primary axis on which children are laid out, that is, its ex
direction.

Properties
Auto

Default value (currently FlexStart).

FlexStart

Items are aligned at the beginning on the cross axis.

Center

Items are centered on the cross axis.

FlexEnd

Items are aligned at the end on the cross axis.

Stretch

Stretches items on the cross axis.

Leave feedback

Description
This enumeration de nes values used to control in which direction a container will place its children during
layout.

Properties
Column

Vertical layout.

ColumnReverse

Vertical layout in reverse order.

Row

Horizontal layout.

RowReverse

Horizontal layout in reverse order.

Leave feedback

Description
This enumeration contains values to control how children are justi ed during layout.
The main axis of a container is the primary axis on which children are laid out, that is, its ex direction.

Properties
FlexStart

Items are justi ed towards the beginning of the main axis.

Center

Items are centered.

FlexEnd

Items are justi ed towards the end of the layout direction.

SpaceBetween

Items are evenly distributed in the line; rst item is at the beginning of the line, last item is
at the end.

SpaceAround

Items are evenly distributed in the line with extra space on each end of the line.

Leave feedback

Description
This enumeration contains values to control how an element is positioned in its parent container.

Properties
Relative

The element is positioned in relation to its default box as calculated by layout.

Absolute

The element is positioned in relation to its parent box and does not contribute to the
layout anymore.

Leave feedback

Description
This enumeration contains values to specify whether or not an element is visible.

Properties
Visible

The element is drawn normally (default).

Hidden

The picking and rendering of this element is skipped. It still takes space in the layout.

Leave feedback

Description
This enumeration contains values to control how elements are placed in a container if not enough space is
available.

Properties
NoWrap

All elements are placed on the same line.

Wrap

Elements are placed over multiple lines.

WrapReverse

Elements are placed over multiple lines with new lines occuring in the reverse order set in
the container.

Leave feedback

Description
This generic structure encodes a value type that can come from USS or be speci ed programmatically.
A StyleValue struct wraps value types such as an integer or a color along with some metadata for the
application of USS at runtime.

Static Properties
nil

This represents the default value for a StyleValue of the according generic type.

Properties
value

The actual value of the StyleValue.

Constructors
StyleValue_1

This constructor can be used to speci ed an alternate default value but it is
recommended to use StyleValue.nil.

Public Methods
GetSpeci edValueOrDefault

Utility function to be used when reading custom styles values and provide a
default value in one step.

Static Methods
Create

Creates a StyleValue of the according generic type directly from a value.

Leave feedback

Description
This interface exposes methods to read custom style properties applied from USS les to visual elements.

Public Methods
ApplyCustomProperty

Read a style property value into the speci ed StyleValue.

Leave feedback

Description
Event sent after an element is added to an element that is a descendent of a panel.

Constructors
AttachToPanelEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool
of reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

destinationPanel

In the case of AttachToPanelEvent, the panel to which the event target
element is now attached. In the case of DetachFromPanelEvent, the panel
to which the event target element will be attached.

originPanel

In the case of AttachToPanelEvent, the panel to which the event target
element was attached. In the case of DetachFromPanelEvent, the panel
from which the event target element is detached.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this

function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent immediately after an element has lost focus. This event trickles down, it does not bubble up, and it
cannot be cancelled.

Constructors
BlurEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

direction

Direction of the focus change.

relatedTarget

For FocusOut and Blur events, contains the element that gains the focus.
For FocusIn and Focus events, contains the element that loses the focus.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes the event with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Styled visual element to match the IMGUI Box Style.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods

HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of

its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.
GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods

OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback
Implements interfaces:IEventHandler

Description
Interface for classes capable of having callbacks to handle events.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase have
been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown phase, are
attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already been
registered for the same phase (either TrickleDown or BubbleUp) then this method
has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Leave feedback
Implements interfaces:IChangeEvent

Description
Sends an event when a value in a eld changes.

Properties
newValue

The new value.

previousValue

The value before the change occured.

Constructors
ChangeEvent_1

Constructor.

Protected Methods
Init

Sets the event to its initial state.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this function
instead of creating new events. Events obtained from this method should be released
back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since

not all events are generated by IMGUI.
isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback
Implements interfaces:ICommandEvent

Description
Base class for command events.

Properties
commandName

Name of the command.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this function
instead of creating new events. Events obtained from this method should be released
back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
The event sent when clicking the right mouse button.

Constructors
ContextClickEvent

Constructor.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the

TrickleDown phase.
actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Use this class to display a contextual menu.

Public Methods
DisplayMenu

Displays the contextual menu.

DisplayMenuIfEventMatches

Checks if the event triggers the display of the contextual menu. This method
also displays the menu.

Leave feedback

Description
Manipulator that displays a contextual menu when the user clicks the right mouse button or presses the menu
key on the keyboard.

Constructors
ContextualMenuManipulator

Constructor.

Protected Methods
RegisterCallbacksOnTarget

Register the event callbacks on the manipulator target.

UnregisterCallbacksFromTarget

Unregister the event callbacks from the manipulator target.

Inherited Members
Properties
target

The element that handles the interaction.

Leave feedback

Description
The event sent when a contextual menu requires menu items.

Properties
menu

The menu to populate.

triggerEvent

The event that triggered the ContextualMenuPopulateEvent.

Constructors
ContextualMenuPopulateEvent

Constructor.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Retrieves an event from the event pool. Use this method to retrieve a mouse event and
initialize the event, instead of creating a new mouse event. Events obtained from this
method should be released back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods

Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
This class is used during UXML template instantiation.

Leave feedback

Description
Script interface for VisualElement cursor style property IStyle.cursor.

Properties
hotspot

The o set from the top left of the texture to use as the target point (must be within the
bounds of the cursor).

texture

The texture to use for the cursor style. To use a texture as a cursor, import the texture
with "Read/Write enabled" in the texture importer (or using the "Cursor" defaults).

Leave feedback

Description
Event sent just before an element is detach from its parent, if the parent is the descendant of a panel.

Constructors
DetachFromPanelEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a
pool of reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

destinationPanel

In the case of AttachToPanelEvent, the panel to which the event target
element is now attached. In the case of DetachFromPanelEvent, the panel
to which the event target element will be attached.

originPanel

In the case of AttachToPanelEvent, the panel to which the event target
element was attached. In the case of DetachFromPanelEvent, the panel
from which the event target element is detached.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this

function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback
Implements interfaces:IDragAndDropEvent

Description
Base class for drag and drop events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Use the DragEnterEvent class to manage events that occur when dragging enters an element or one of its
descendants. The DragEnterEvent is cancellable, it does not trickle down, and it does not bubble up.

Constructors
DragEnterEvent

Constructor. Avoid renewing events. Instead, use GetPooled() to get an event from a pool
of reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from

executing on the current target.
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
The event sent to a dragged element when the drag and drop process ends.

Constructors
DragExitedEvent

Constructor.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements

along the propagation path.
timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Use the DragLeaveEvent class to manage events sent when dragging leaves an element or one of its descendants.
The DragLeaveEvent is cancellable, it does not trickle down, and it does not bubble up.

Constructors
DragLeaveEvent

Constructor. Avoid renewing events. Instead, use GetPooled() to get an event from a pool
of reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from

executing on the current target.
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
The event sent to an element when another element is dragged and dropped on the element.

Constructors
DragPerformEvent

Constructor.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the

TrickleDown phase.
actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
The event sent when the element being dragged enters a possible drop target.

Constructors
DragUpdatedEvent

Constructor.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the

TrickleDown phase.
actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
The base class for all UIElements events.

Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Protected Methods
Init

Resets all event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

Leave feedback

Description
Generic base class for events, implementing event pooling and automatic registration to the event type system.

Public Methods
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Static Methods
RegisterEventType

Registers an event class to the event type system.

Leave feedback

Description
The event sent when an element should execute a command.

Constructors
ExecuteCommandEvent

Constructor.

Inherited Members
Properties
commandName

Name of the command.

bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets the event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Base class for objects that can get the focus.
The focus is used to designate an element that will receive keyboard events.

Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

Public Methods
Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Inherited Members
Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase have
been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown phase, are
attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already been
registered for the same phase (either TrickleDown or BubbleUp) then this method
has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Leave feedback

Description
Base class for de ning in which direction the focus moves in a focus ring.
Focus ring implementations can move the focus in various direction; they can derive from this class to formalize
the various ways the focus can change from one element to the other.

Static Properties
lastValue

Last value for the direction de ned by this class.

none

The null direction. This is usually used when the focus stays on the same element.

unspeci ed

Focus came from an unspeci ed direction, for example after a mouse down.

Operators
int

The underlying integer value for this direction.

Leave feedback

Description
Class in charge of managing the focus inside a Panel.
Each Panel should have an instance of this class. The instance holds the currently focused element and is
responsible for changing it.

Properties
focusedElement

The currently focused element.

Constructors
FocusController

Constructor.

Public Methods
SwitchFocusOnEvent

Ask the controller to change the focus according to the event. The focus controller will
use its focus ring to choose the next element to be focused.

Leave feedback

Description
Event sent immediately after an element has gained focus. This event trickles down, it does not bubble up, and it
cannot be cancelled.

Constructors
FocusEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

direction

Direction of the focus change.

relatedTarget

For FocusOut and Blur events, contains the element that gains the focus.
For FocusIn and Focus events, contains the element that loses the focus.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes the event with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback
Implements interfaces:IFocusEvent

Description
Base class for focus related events.

Properties
direction

Direction of the focus change.

relatedTarget

For FocusOut and Blur events, contains the element that gains the focus. For FocusIn and
Focus events, contains the element that loses the focus.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes the event with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Event sent immediately before an element gains focus. This event trickles down and bubbles up. This event
cannot be cancelled.

Constructors
FocusInEvent

Constructor.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,

this target does not change when the event is sent to other elements
along the propagation path.
timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

direction

Direction of the focus change.

relatedTarget

For FocusOut and Blur events, contains the element that gains the focus.
For FocusIn and Focus events, contains the element that loses the focus.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes the event with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent immediately before an element loses focus. This event trickles down and bubbles up. This event
cannot be cancelled.

Constructors
FocusOutEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

direction

Direction of the focus change.

relatedTarget

For FocusOut and Blur events, contains the element that gains the focus.
For FocusIn and Focus events, contains the element that loses the focus.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes the event with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent after layout calculations, when the position or the dimension of an element changes. This event cannot
be cancelled, it does not trickle down, and it does not bubble up.

Properties
newRect

The new dimensions of the element.

oldRect

The old dimensions of the element.

Constructors
GeometryChangedEvent

Constructor.

Protected Methods
Init

Resets the event values to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes the event with the speci ed values. Use
this method instead of instancing new events. Use Dispose() to release events back to the
event pool.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since

not all events are generated by IMGUI.
isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
A VisualElement representing a source texture.

Properties
image

The source texture of the Image element.

sourceRect

The source rectangle inside the texture relative to the top left corner.

uv

The base texture coordinates of the Image relative to the bottom left corner.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside

the VisualTree hierarchy
GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
Class used to send a IMGUI event that has no equivalent UIElements event.

Constructors
IMGUIEvent

Constructor. Use GetPooled() to get an event from a pool of reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this function
instead of creating new events. Events obtained from this method should be released
back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed

to the current target local coordinates.
pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Sends an event when text from a TextField changes.

Properties
newData

The new text.

previousData

The text before the change occured.

Constructors
InputEvent

Constructor.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this function
instead of creating new events. Events obtained from this method should be released
back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback
Implements interfaces:IKeyboardEvent

Description
Base class for keyboard events.

Properties
actionKey

Returns true if the platform speci c action key is pressed. This key is Command on macOS
and Control otherwise.

altKey

Returns true if the Alt key is pressed.

character

The character.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

keyCode

The key code.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift, Windows/Command).

shiftKey

Returns true if the Shift key is pressed.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets a keyboard event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event

cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.
ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Event sent when a key is pressed on the keyboard. This event trickles down and bubbles up. This event is
cancellable.

Constructors
KeyDownEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

character

The character.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

keyCode

The key code.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets a keyboard event from the event pool and initializes it with the given values. Use
this function instead of creating new events. Events obtained from this method should
be released back to the pool using Dispose().

Leave feedback

Description
Event sent when a key is released on the keyboard. This event trickles down and bubbles up. This event is
cancellable.

Constructors
KeyUpEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

character

The character.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

keyCode

The key code.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets a keyboard event from the event pool and initializes it with the given values. Use
this function instead of creating new events. Events obtained from this method should
be released back to the pool using Dispose().

Leave feedback

Description
A vertically scrollable area that only creates visual elements for visible items while allowing the binding of many
more items. As the user scrolls, visual elements are recycled and re-bound to new data items.

Properties
bindItem

Callback for binding a data item to the visual element.

itemHeight

ListView requires all visual elements to have the same height so that it can calculate a
sensible scroller size. This property must be set for the list view to function.

itemsSource

The items data source. This property must be set for the list view to function.

makeItem

Callback for constructing the VisualElement that will serve as the template for each
recycled and re-bound element in the list. This property must be set for the list view to
function.

selectedIndex

Currently selected item index in the items source. If multiple items are selected, this will
return the rst selected item's index.

selectedItem

The currently selected item from the items source. If multiple items are selected, this will
return the rst selected item.

selectionType

Controls the selection state, whether: selections are disabled, there is only one selectable
item, or if there are multiple selectable items.

Public Methods
Refresh

Clear, recreate all visible visual elements, and rebind all items. This should be called
whenever the items source changes.

ScrollTo

Scroll to a speci c visual element.

ScrollToItem

Scroll so that a speci c item index from the items source is visible.

Events
onItemChosen

Callback for when an item is chosen (double-click). This is di erent from just a
selection.

onSelectionChanged

Callback for a selection change.

Inherited Members

Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
Used by manipulators to match events against their requirements.

using UnityEditor;
using UnityEngine;
using UnityEngine.Experimental.UIElements;

public class ClickableTest
{
public void CreateClickable()
{
var clickable = new Clickable(() => { Debug.Log("Clicked!"); });
clickable.activators.Add(new ManipulatorActivationFilter { button = Mous
clickable.activators.Add(new ManipulatorActivationFilter { button = Mous
}
}

Properties
button

The button that activates the manipulation.

clickCount

Number of mouse clicks required to activate the manipulator.

modi ers

Any modi er keys (ie. ctrl, alt, ...) that are needed to activate the manipulation.

Public Methods
Matches

Returns true if the current mouse event satis es the activation requirements.

Leave feedback

Description
Class that manages capturing mouse events.

Static Methods
CaptureMouse

Assigns an event handler to capture mouse events.

HasMouseCapture

Checks if the event handler is capturing the mouse.

IsMouseCaptured

Checks if there is a handler capturing the mouse.

ReleaseMouse

Stops an event handler from capturing the mouse.

Leave feedback

Description
Event sent after a handler starts capturing the mouse.

Constructors
MouseCaptureEvent

Constructor.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the

TrickleDown phase.
relatedTarget

In the case of a MouseCaptureEvent, this property is the IEventHandler
that loses the capture. In the case of a MouseCaptureOutEvent, this
property is the IEventHandler that gains the capture.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Retrieves an event from the event pool. Use this method to retrieve a mouse event and
initialize the event, instead of creating a new mouse event. Events obtained from this
method should be released back to the pool using Dispose().

Leave feedback
Implements interfaces:IMouseCaptureEvent

Description
Event sent when the handler capturing the mouse changes.

Properties
relatedTarget

In the case of a MouseCaptureEvent, this property is the IEventHandler that loses the
capture. In the case of a MouseCaptureOutEvent, this property is the IEventHandler that
gains the capture.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Retrieves an event from the event pool. Use this method to retrieve a mouse event and
initialize the event, instead of creating a new mouse event. Events obtained from this
method should be released back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Event sent before a handler stops capturing the mouse.

Constructors
MouseCaptureOutEvent

Constructor.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags
imguiEvent

Flags for the event.
The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the

TrickleDown phase.
relatedTarget

In the case of a MouseCaptureEvent, this property is the IEventHandler
that loses the capture. In the case of a MouseCaptureOutEvent, this
property is the IEventHandler that gains the capture.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Retrieves an event from the event pool. Use this method to retrieve a mouse event and
initialize the event, instead of creating a new mouse event. Events obtained from this
method should be released back to the pool using Dispose().

Leave feedback

Description
Mouse down event.

Constructors
MouseDownEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent when the mouse pointer enters an element or one of its descendent elements. The event is
cancellable, it does not trickle down, and it does not bubble up.

Constructors
MouseEnterEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from

executing on the current target.
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent when the mouse pointer enters a window. The event is cancellable, it does not trickle down, and it
does not bubble up.

Constructors
MouseEnterWindowEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a
pool of reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from

executing on the current target.
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback
Implements interfaces:IMouseEvent

Description
The base class for mouse events.

Properties
actionKey

Returns true if the platform speci c action key is pressed. This key is Command on
macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the propagation
path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift, Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event and the
current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this function
instead of creating new events. Events obtained from this method should be released
back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event

handlers from executing on the current target.
StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Event sent when the mouse pointer exits an element and all its descendent elements. The event is cancellable, it
does not trickle down, and it does not bubble up.

Constructors
MouseLeaveEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from

executing on the current target.
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent when the mouse pointer exits a window. The event is cancellable, it does not trickle down, and it does
not bubble up.

Constructors
MouseLeaveWindowEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from
a pool of reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from

executing on the current target.
Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Mouse move event.

Constructors
MouseMoveEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent when the mouse pointer exits an element. The event trickles down, it bubbles up, and it is cancellable.

Constructors
MouseOutEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Event sent when the mouse pointer enters an element. The event trickles down, it bubbles up, and it is
cancellable.

Constructors
MouseOverEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Mouse up event.

Constructors
MouseUpEvent

Constructor. Avoid newing events. Instead, use GetPooled() to get an event from a pool of
reusable events.

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets the event members to their initial values.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

Leave feedback

Description
Styled visual element that matches the EditorGUILayout.Popup IMGUI element.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

text

The text associated with the element.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

MeasureTextSize

Computes the size needed to display a text string based on element style
values such as font, font-size, word-wrap, and so on.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the

class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
A button that executes an action repeatedly while it is pressed.

Constructors
RepeatButton

Constructor.

Public Methods
SetAction

Set the action that should be executed when the button is pressed.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

text

The text associated with the element.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

MeasureTextSize

Computes the size needed to display a text string based on element style
values such as font, font-size, word-wrap, and so on.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
Experimental.UIElements.Slider is a controller allowing the selection of a value from a range (min, max, value).

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
value

The value associated with the eld.

direction

This is the actual property to contain the direction of the slider.

highValue

This is the maximum value that the slider encodes.

lowValue

This is the minimum value that the slider encodes.

pageSize

This is a generic page size used to change the value when clicking in the slider.

range

This is the range from the minimum value to the maximum value of the slider.

value

The actual value of the slider.

binding

Binding object that will be updated.

bindingPath

Path of the target property to be bound.

canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
SetValueWithoutNotify

Allow to set a value without being of the change, if any.

AdjustDragElement

Method used to adjust the dragelement. Mainly used in a scroller.

HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's

contentContainer
RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
Template Container.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
binding

Binding object that will be updated.

bindingPath

Path of the target property to be bound.

canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this

VisualElement.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the

class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
A text eld is a rectangular area where the user can edit a string.

Properties
isPasswordField

Set this to true to mask the characters and false if otherwise.

multiline

Set this to true to allow multiple lines in the text eld and false if otherwise.

value

The string currently being exposed by the eld.

Constructors
TextField

Creates a new text eld.

Public Methods
OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or persistence
key have changed (VisualElement is properly parented).

SelectRange

Selects text in the text eld between cursorIndex and selectionIndex.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
value

The value associated with the eld.

binding

Binding object that will be updated.

bindingPath

Path of the target property to be bound.

canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that
the element can not be focused.

cursorColor

Color of the cursor.

cursorIndex

The current cursor position index in the text input eld.

doubleClickSelectsWord

Controls whether double clicking selects the word under the mouse pointer or not.

isDelayed

If set to true, the value property is not updated until either the user presses Enter
or the text eld loses focus.

isPasswordField

Returns true if the eld is used to edit a password.

maskChar

The character used for masking in a password eld.

maxLength

Maximum number of characters for the eld.

selectIndex

The current selection position index in the text input eld.

selectionColor

Background color of selected text.

tripleClickSelectsLine

Controls whether triple clicking selects the entire line under the mouse pointer or
not.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom
level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a
small amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods

SetValueWithoutNotify

Allow to set a value without being of the change, if any.

HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

SelectAll

Selects all the text.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst

VisualElement of this type
GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods

BuildContextualMenu

Add menu items to the text eld contextual menu.

OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback
Implements interfaces:IEventHandler

Description
Abstract base class used for all text-based elds.

Properties
cursorColor

Color of the cursor.

cursorIndex

The current cursor position index in the text input eld.

doubleClickSelectsWord

Controls whether double clicking selects the word under the mouse pointer or not.

isDelayed

If set to true, the value property is not updated until either the user presses Enter
or the text eld loses focus.

isPasswordField

Returns true if the eld is used to edit a password.

maskChar

The character used for masking in a password eld.

maxLength

Maximum number of characters for the eld.

selectIndex

The current selection position index in the text input eld.

selectionColor

Background color of selected text.

tripleClickSelectsLine

Controls whether triple clicking selects the entire line under the mouse pointer or
not.

Constructors
TextInputFieldBase_1

Constructor.

Public Methods
SelectAll

Selects all the text.

Protected Methods
BuildContextualMenu

Add menu items to the text eld contextual menu.

Inherited Members

Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
value

The value associated with the eld.

binding

Binding object that will be updated.

bindingPath

Path of the target property to be bound.

canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
SetValueWithoutNotify

Allow to set a value without being of the change, if any.

HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of

its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.
GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods

OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
This is the Toggle eld.

Properties
text

Optional text after the toggle.

Inherited Members
Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
value

The value associated with the eld.

binding

Binding object that will be updated.

bindingPath

Path of the target property to be bound.

canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
SetValueWithoutNotify

Allow to set a value without being of the change, if any.

HandleEvent

Handle an event, most often by executing the callbacks associated with
the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase
have been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown
phase, are attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already
been registered for the same phase (either TrickleDown or BubbleUp)
then this method has no e ect.

SendEvent

Sends an event to the event handler.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Leave feedback

Description
UQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a
complex hierarchy.

Leave feedback

Description
Utility Object that contructs a set of selection rules to be ran on a root visual element.

Constructors
UQuery.QueryBuilder_1

Initializes a QueryBuilder.

Public Methods
Active

Selects all elements that are active.

AtIndex

Convenience overload, shorthand for Build().AtIndex().

Build

Compiles the selection rules into a QueryState object.

Checked

Selects all elements that are checked.

Children

Selects all direct child elements of elements matching the previous rules.

Class

Selects all elements with the given class. Not to be confused with Type (see OfType<>()).

Descendents

Selects all elements that are descendants of currently matching ancestors.

Enabled

Selects all elements that are enabled.

First

Convenience overload, shorthand for Build().First().

Focused

Selects all elements that are enabled.

ForEach

Convenience overload, shorthand for Build().ForEach().

Hovered

Selects all elements that are hovered.

Last

Convenience overload, shorthand for Build().Last().

Name

Selects element with this name.

NotActive

Selects all elements that are not active.

NotChecked

Selects all elements that npot checked.

NotEnabled

Selects all elements that are not enabled.

NotFocused

Selects all elements that don't currently own the focus.

NotHovered

Selects all elements that are not hovered.

NotSelected

Selects all elements that are not selected.

NotVisible

Selects all elements that are not visible.

OfType

Selects all elements of the speci ed Type (eg: Label, Button, ScrollView, etc).

Selected

Selects all elements that are selected.

ToList

Convenience method. shorthand for Build().ToList.

Visible

Selects all elements that are visible.

Where

Selects all elements satifying the predicate.

Leave feedback

Description
Query object containing all the selection rules. Can be saved and rerun later without re-allocating memory.

Public Methods
AtIndex

Selects the n th element matching all the criteria, or null if not enough elements were
found.

First

The rst element matching all the criteria, or null if none was found.

ForEach

Invokes function on all elements matching the query.

Last

The last element matching all the criteria, or null if none was found.

RebuildOn

Creates a new QueryState with the same selection rules, applied on another
VisualElement.

ToList

Returns a list containing elements satisfying selection rules.

Leave feedback

Description
UQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a
complex hierarchy.

Static Methods
Q

Convenience overload, shorthand for Query.Build().First().

Query

Initializes a QueryBuilder with the speci ed selection rules.

Leave feedback

Description
Base class for describing an XML attribute.

Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
An enum to describe attribute use.

Properties
None

There is no restriction on the use of this attribute with the element.

Optional

The attribute is optional for the element.

Prohibited

The attribute should not appear for the element.

Required

The attribute must appear in the element tag.

Leave feedback

Description
Describes a XML bool attribute.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlBoolAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Describe an allowed child element for an element.

Properties
elementName

The name of the allowed child element.

elementNamespace

The namespace name of the allowed child element.

Constructors
UxmlChildElementDescription

Constructor.

Leave feedback

Description
Describes a XML attribute representing a Color as a string.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlColorAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Describes a XML double attribute.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlDoubleAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Describes a XML attribute representing an enum as a string.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlEnumAttributeDescription_1

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Restricts the value of an attribute to be taken from a list of values.

Properties
values

The list of values the attribute can take.

Constructors
UxmlEnumeration

Constructor.

Public Methods
Equals

Indicates whether the current UxmlEnumeration object is equal to another object of the
same type.

Inherited Members

Leave feedback

Description
UxmlFactory specialization for classes that derive from VisualElement and that shares its traits,
VisualElementTraits.

Constructors
UxmlFactory_1

Constructor.

Inherited Members
Properties
canHaveAnyAttribute

Returns UxmlTraits.canHaveAnyAttribute (where UxmlTraits is the
argument for T1).

substituteForTypeName

Returns an empty string if T0 is not VisualElement; otherwise, returns
"VisualElement".

substituteForTypeNamespace

Returns the namespace for substituteForTypeName.

substituteForTypeQuali edName

Returns the fully quali ed name for substituteForTypeName.

uxmlAttributesDescription

Returns an empty enumerable.

uxmlChildElementsDescription

Returns an empty enumerable.

uxmlName

Returns the type name of T0.

uxmlNamespace

Returns the namespace name of T0.

uxmlQuali edName

Returns the typefully quali ed name of T0.

Public Methods
AcceptsAttributeBag

Returns true.

Create

Instantiate an object of type T0 and initialize it by calling T1 UxmlTraits.Init method.

Leave feedback
Implements interfaces:IUxmlFactory

Description
Generic base class for UXML factories, which instantiate a VisualElement using the data read from a UXML le.
T0 The type of the element that will be instantiated. It must derive from VisualElement.
T1 The traits of the element that will be instantiated. It must derive from UxmlTraits.

Properties
canHaveAnyAttribute

Returns UxmlTraits.canHaveAnyAttribute (where UxmlTraits is the
argument for T1).

substituteForTypeName

Returns an empty string if T0 is not VisualElement; otherwise, returns
"VisualElement".

substituteForTypeNamespace

Returns the namespace for substituteForTypeName.

substituteForTypeQuali edName

Returns the fully quali ed name for substituteForTypeName.

uxmlAttributesDescription

Returns an empty enumerable.

uxmlChildElementsDescription

Returns an empty enumerable.

uxmlName

Returns the type name of T0.

uxmlNamespace

Returns the namespace name of T0.

uxmlQuali edName

Returns the typefully quali ed name of T0.

Public Methods
AcceptsAttributeBag

Returns true.

Create

Instantiate an object of type T0 and initialize it by calling T1 UxmlTraits.Init method.

Leave feedback

Description
Describes a XML float attribute.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlFloatAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Describes a XML int attribute.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlIntAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Describes a XML long attribute.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlLongAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Factory for the root UXML element.
This factory does not create any VisualElement. It exists solely for the purpose of schema generation.

Properties
substituteForTypeName

Returns the empty string, as the root element can not appear anywhere
else bit at the root of the document.

substituteForTypeNamespace

Returns the empty string, as the root element can not appear anywhere
else bit at the root of the document.

substituteForTypeQuali edName

Returns the empty string, as the root element can not appear anywhere
else bit at the root of the document.

uxmlName

Returns "UXML".

uxmlQuali edName

Returns the quali ed name for this element.

Constructors
UxmlRootElementFactory

Constructor.

Public Methods
Create

Returns null.

Inherited Members
Properties
canHaveAnyAttribute

Returns UxmlTraits.canHaveAnyAttribute (where UxmlTraits is the
argument for T1).

substituteForTypeName

Returns an empty string if T0 is not VisualElement; otherwise, returns
"VisualElement".

substituteForTypeNamespace

Returns the namespace for substituteForTypeName.

substituteForTypeQuali edName

Returns the fully quali ed name for substituteForTypeName.

uxmlAttributesDescription

Returns an empty enumerable.

uxmlChildElementsDescription

Returns an empty enumerable.

uxmlName

Returns the type name of T0.

uxmlNamespace

Returns the namespace name of T0.

uxmlQuali edName

Returns the typefully quali ed name of T0.

Public Methods
AcceptsAttributeBag

Returns true.

Leave feedback

Description
UxmlTraits for the UXML root element.

Properties
uxmlChildElementsDescription

Returns an enumerable containing
UxmlChildElementDescription(typeof(VisualElement)), since the root element
can contain VisualElements.

Constructors
UxmlRootElementTraits

Constructor.

Inherited Members
Properties
canHaveAnyAttribute

Must return true if the UXML element attributes are not restricted to the
values enumerated by UxmlTraits.uxmlAttributesDescription.

uxmlAttributesDescription

Describes the UXML attributes expected by the element. The attributes
enumerated here will appear in the UXML schema.

uxmlChildElementsDescription

Describes the types of element that can appear as children of this element in
a UXML le.

Public Methods
Init

Initialize a VisualElement instance with values from the UXML element attributes.

Leave feedback

Description
Describes a XML string attribute.

Properties
defaultValue

The default value for the attribute.

defaultValueAsString

The default value for the attribute, as a string.

Constructors
UxmlStringAttributeDescription

Constructor.

Public Methods
GetValueFromBag

Retrieves the value of this attribute from the attribute bag. Returns it if it is found,
otherwise return defaultValue.

Inherited Members
Properties
defaultValueAsString

The default value for the attribute, as a string.

name

The attribute name.

obsoleteNames

A list of obsolete names for this attribute.

restriction

Restrictions on the possible values of the attribute.

type

Attribute type.

typeNamespace

Attribute namespace.

use

Whether the attribute is optional, required or prohibited.

Protected Methods
GetValueFromBag

Get the attribute value from the attribute bag.

Leave feedback

Description
Describes a VisualElement derived class for the parsing of UXML les and the generation of UXML schema
de nition.
UxmlTraits describes the UXML attributes and children elements of a class deriving from VisualElement. It is used
by UxmlFactory to map UXML attributes to the C# class properties when reading UXML documents. It is also used
to generate UXML schema de nitions.

Properties
canHaveAnyAttribute

Must return true if the UXML element attributes are not restricted to the
values enumerated by UxmlTraits.uxmlAttributesDescription.

uxmlAttributesDescription

Describes the UXML attributes expected by the element. The attributes
enumerated here will appear in the UXML schema.

uxmlChildElementsDescription

Describes the types of element that can appear as children of this element in
a UXML le.

Public Methods
Init

Initialize a VisualElement instance with values from the UXML element attributes.

Leave feedback

Description
Base class to restricts the value of an attribute.

Public Methods
Equals

Indicates whether the current UxmlTypeRestriction object is equal to another object of the
same type.

Leave feedback

Description
Restricts the value of an attribute to be within the speci ed bounds.

Properties
excludeMax

True if the bounds exclude max.

excludeMin

True if the bounds exclude min.

max

The maximum value for the attribute.

min

The minimum value for the attribute.

Constructors
UxmlValueBounds

Constructor.

Public Methods
Equals

Indicates whether the current UxmlValueBounds object is equal to another object of the
same type.

Inherited Members

Leave feedback

Description
Restricts the value of an attribute to match a regular expression.

Properties
regex

The regular expression that should be matched by the value.

Constructors
UxmlValueMatches

Constructor.

Public Methods
Equals

Indicates whether the current UxmlValueMatches object is equal to another object of the
same type.

Inherited Members

Leave feedback

Description
The event sent to probe which elements accepts a command.

Constructors
ValidateCommandEvent

Constructor.

Inherited Members
Properties
commandName

Name of the command.

bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Protected Methods
Init

Resets the event members to their initial values.

Init

Resets all event members to their initial values.

Init

Resets all event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this
function instead of creating new events. Events obtained from this method should be
released back to the pool using Dispose().

RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback
Implements interfaces:IStyle, ITransform, IUIElementDataWatch, IVisualElementScheduler

Description
Base class for objects that are part of the UIElements visual tree.
VisualElement contains several features that are common to all controls in UIElements, such as layout, styling and
event handling. Several other classes derive from it to implement custom rendering and de ne behaviour for
controls.

Static Properties
defaultFocusIndex

The default focus index for newly created elements.

Properties
childCount

Number of child elements in this object's contentContainer

clippingOptions

Should this element clip painting to its boundaries.

contentContainer

child elements are added to this element, usually this

dataWatch

Access to this element data watch interface.

enabledInHierarchy

Returns true if the VisualElement is enabled in its own hierarchy.

enabledSelf

Returns true if the VisualElement is enabled locally.

persistenceKey

Used for view data persistence (ie. tree expanded states, scroll position, zoom level).

schedule

Retrieves this VisualElement's IVisualElementScheduler

shadow

Access to this element physical hierarchy

style

Reference to the style object of this element.

this[int]

Access to this element physical hierarchy

tooltip

Text to display inside an information box after the user hovers the element for a small
amount of time.

userData

This property can be used to associate application-speci c user data with this
VisualElement.

Public Methods
Add

Add an element to this element's contentContainer

AddStyleSheetPath

Adds this stylesheet le to this element list of applied styles

BringToFront

Brings this element to the end of its parent children list. The element will
be visually in front of any overlapping sibling elements.

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

Contains

Returns true if the element is a direct child of this VisualElement

ElementAt

Retrieves the child element at position

EnableInClassList

Enables or disables the class with the given name.

FindAncestorUserData

Searchs up the hierachy of this VisualElement and retrieves stored
userData, if any is found.

FindCommonAncestor

Finds the lowest commont ancestor between two VisualElements inside
the VisualTree hierarchy

GetEnumerator

Allows to iterate into this elements children

GetFirstAncestorOfType

Walks up the hierarchy, starting from this element's parent, and returns
the rst VisualElement of this type

GetFirstOfType

Walks up the hierarchy, starting from this element, and returns the rst
VisualElement of this type

GetFullHierarchicalPersistenceKey

Combine this VisualElement's VisualElement.persistenceKey with those of
its parents to create a more unique key for use with
VisualElement.GetOrCreatePersistentData.

GetOrCreatePersistentData

Takes a reference to an existing persisted object and a key and returns
the object either lled with the persisted state or as-is.

HasStyleSheetPath

Checks if this stylesheet le is in this element list of applied styles

IndexOf

Retrieves the child index of the speci ed VisualElement.

Insert

Insert an element into this element's contentContainer

MarkDirtyRepaint

Triggers a repaint of the VisualElement on the next frame.

OnPersistentDataReady

Called when the persistent data is accessible and/or when the data or
persistence key have changed (VisualElement is properly parented).

OverwriteFromPersistedData

Overwrite object from the persistent data store.

PlaceBehind

Places this element right before the sibling element in their parent
children list. If the element and the sibling position overlap, the element
will be visually behind of its sibling.

PlaceInFront

Places this element right after the sibling element in their parent children
list. If the element and the sibling position overlap, the element will be
visually in front of its sibling.

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's
contentContainer

RemoveFromHierarchy

Removes this element from its parent hierarchy

RemoveStyleSheetPath

Removes this stylesheet le from this element list of applied styles

SavePersistentData

Write persistence data to le.

SendEvent

Sends an event to the event handler.

SendToBack

Sends this element to the beginning of its parent children list. The
element will be visually behind any overlapping sibling elements.

SetEnabled

Changes whether the current VisualElement is enabled or not. When
disabled, a VisualElement does not receive most events.

Sort

Reorders child elements from this VisualElement contentContainer.

ToggleInClassList

Toggles between adding and removing the given class name from the
class list.

Protected Methods
OnStyleResolved

Callback when the styles of an object have changed.

Inherited Members
Properties
canGrabFocus

Return true if the element can be focused.

focusController

Return the focus controller for this element.

focusIndex

An integer used to sort focusables in the focus ring. A negative value means that the
element can not be focused.

Public Methods
HandleEvent

Handle an event, most often by executing the callbacks associated with the event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase have

been attached on this object.
HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown phase, are
attached to this object.

RegisterCallback

Adds an event handler to the instance. If the event handler has already been
registered for the same phase (either TrickleDown or BubbleUp) then this method
has no e ect.

UnregisterCallback

Remove callback from the instance.

Blur

Tell the element to release the focus.

Focus

Attempt to give the focus to this element.

Leave feedback

Description
Hierarchy is a sctuct allowing access to the shadow hierarchy of visual elements

Properties
childCount

Number of child elements in this object's contentContainer

parent

Access the physical parent of this element in the hierarchy

this[int]

Access to this element physical hierarchy

Public Methods
Add

Add an element to this element's contentContainer

Children

Returns the elements from its contentContainer

Clear

Remove all child elements from this element's contentContainer

ElementAt

Retrieves the child element at position

IndexOf

Retrieves the index of the speci ed VisualElement in the Hierarchy.

Insert

Insert an element into this element's contentContainer

Remove

Removes this child from the hierarchy

RemoveAt

Remove the child element located at this position from this element's contentContainer

Sort

Reorders child elements from this VisualElement contentContainer.

Leave feedback

Description
Options to select clipping strategy.

Properties
ClipContents

Will enable clipping. This VisualElement and its children's content will be limited to
this element's bounds.

NoClipping

Will disable clipping and let children VisualElements paint outside its bounds.

ClipAndCacheContents

Enables clipping and renders contents to a cache texture.

Leave feedback

Description
The modes available to measure VisualElement sizes.
This enum value is passed to UIElements.VisualElement.DoMeasure. This lets UI elements indicate their natural
size during the layout algorithm.
See Also:UIElements.VisualElement.MeasureTextSize.

Properties
Unde ned

The element should give its preferred width/height without any constraint.

Exactly

The element should give the width/height that is passed in and derive the opposite site
from this value (for example, calculate text size from a xed width).

AtMost

At Most. The element should give its preferred width/height but no more than the value
passed.

Leave feedback

Description
VisualElementExtensions is a set of extension methods useful for VisualElement.

Static Methods
AddManipulator

Add a manipulator associated to a VisualElement.

RemoveManipulator

Remove a manipulator associated to a VisualElement.

StretchToParentWidth

The given VisualElement's left and right edges will be aligned with the corresponding
edges of the parent element.

Leave feedback

Description
De ne focus change directions for the VisualElementFocusRing.

Static Properties
lastValue

Last value for the direction de ned by this class.

left

The focus is moving to the left.

right

The focus is moving to the right.

Inherited Members
Static Properties
lastValue

Last value for the direction de ned by this class.

none

The null direction. This is usually used when the focus stays on the same element.

unspeci ed

Focus came from an unspeci ed direction, for example after a mouse down.

Operators
int

The underlying integer value for this direction.

Leave feedback
Implements interfaces:IFocusRing

Description
Implementation of a linear focus ring. Elements are sorted according to their focusIndex.

Properties
defaultFocusOrder

The focus order for elements having 0 has a focusIndex.

Constructors
VisualElementFocusRing

Constructor.

Public Methods
GetFocusChangeDirection

Get the direction of the focus change for the given event. For example, when the
Tab key is pressed, focus should be given to the element to the right in the focus
ring.

GetNextFocusable

Get the next element in the given direction.

Leave feedback

Description
Ordering of elements in the focus ring.

Properties
ChildOrder

Order elements using a depth- rst pre-order traversal of the element tree.

PositionXY

Order elements according to their position, rst by X, then by Y.

PositionYX

Order elements according to their position, rst by Y, then by X.

Leave feedback

Description
Mouse wheel event.

Properties
delta

The amount of scrolling applied with the mouse wheel.

Constructors
WheelEvent

Constructor. Use GetPooled() to get an event from a pool of reusable events.

Protected Methods
Init

Resets the event members to their initial values.

Static Methods
GetPooled

Gets an event from the event pool and initializes it with the given values. Use this function
instead of creating new events. Events obtained from this method should be released
back to the pool using Dispose().

Inherited Members
Properties
bubbles

Whether this event type bubbles up in the event propagation path.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

dispatch

Whether the event is being dispatched to a visual element. An event
cannot be redispatched while it being dispatched. If you need to
recursively dispatch an event, it is recommended that you use a copy of
the event.

ags

Flags for the event.

imguiEvent

The IMGUIEvent at the source of this event. The source can be null since
not all events are generated by IMGUI.

isDefaultPrevented

Return true if the default actions should not be executed for this event.

isImmediatePropagationStopped

Whether StopImmediatePropagation() was called for this event.

isPropagationStopped

Whether StopPropagation() was called for this event.

originalMousePosition

The original mouse position of the IMGUI event, before it is transformed
to the current target local coordinates.

pooled

Whether the event is allocated from a pool of events.

propagationPhase

The current propagation phase.

target

The target visual element that received this event. Unlike currentTarget,
this target does not change when the event is sent to other elements
along the propagation path.

timestamp

The time when the event was created.

tricklesDown

Whether this event is sent down the event propagation path during the
TrickleDown phase.

actionKey

Returns true if the platform speci c action key is pressed. This key is
Command on macOS and Control otherwise.

altKey

Returns true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is
center.

clickCount

Number of clicks.

commandKey

Returns true if the Windows/Command key is pressed.

ctrlKey

Returns true if the Control key is pressed.

currentTarget

The current target of the event. The current target is the element in the
propagation path for which event handlers are currently being executed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flags holding the pressed modi er keys (Alt, Control, Shift,
Windows/Command).

mouseDelta

The di erence of the mouse position between the previous mouse event
and the current mouse event.

mousePosition

The mouse position in the screen coordinate system.

shiftKey

Returns true if the Shift key is pressed.

Public Methods
Dispose

Implementation of IDisposable.

GetEventTypeId

Retrieves the type id for this event instance.

PreventDefault

Whether the default actions are prevented from being executed for this event.

StopImmediatePropagation

Immediately stops the propagation of the event. The event is not sent to other
elements along the propagation path. This method prevents other event
handlers from executing on the current target.

StopPropagation

Stops propagating this event. The event is not sent to other elements along the
propagation path. This method does not prevent other event handlers from
executing on the current target.

Dispose

Implementation of IDispose.

GetEventTypeId

Retrieves the type id for this event instance.

Static Methods
RegisterEventType

Registers an event class to the event type system.

GetPooled

Gets an event from the event pool. Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose().

TypeId

Gets the type id for the event class.

Leave feedback

Description
Base interface for ChangeEvent.

Leave feedback

Description
Interface for Command events.

Properties
commandName

Name of the command.

Leave feedback

Description
Interface for drag and drop events.

Leave feedback

Description
Interface for class capable of handling events.

Public Methods
HandleEvent

Handle an event.

HasBubbleUpHandlers

Return true if event handlers for the event propagation BubbleUp phase have
been attached on this object.

HasTrickleDownHandlers

Returns true if event handlers, for the event propagation TrickleDown phase, are
attached to this object.

SendEvent

Sends an event to the event handler.

Leave feedback

Description
Interface for focus events.

Properties
direction

Direction of the focus change.

relatedTarget

Related target. See implementation for speci c meaning.

Leave feedback

Description
Interface for classes implementing focus rings.

Public Methods
GetFocusChangeDirection

Get the direction of the focus change for the given event. For example, when the
Tab key is pressed, focus should be given to the element to the right.

GetNextFocusable

Get the next element in the given direction.

Leave feedback

Description
Interface for keyboard events.

Properties
actionKey

Returns true if the platform speci c action key is pressed. This key is Command on macOS
and Control otherwise.

altKey

Return true if the Alt key is pressed.

character

The character.

commandKey

Return true if the Windows/Command key is pressed.

ctrlKey

Return true if the Control key is pressed.

keyCode

The key code.

modi ers

Flag set holding the pressed modi er keys (Alt, Control, Shift, Windows/Command).

shiftKey

Return true if the Shift key is pressed.

Leave feedback

Description
Interface for mouse capture events.

Leave feedback

Description
Interface for mouse events.

Properties
actionKey

Returns true if the platform speci c action key is pressed. This key is Command on
macOS and Control otherwise.

altKey

Return true if the Alt key is pressed.

button

Integer representing the pressed mouse button: 0 is left, 1 is right, 2 is center.

clickCount

Number of clicks.

commandKey

Return true if the Windows/Command key is pressed.

ctrlKey

Return true if the Control key is pressed.

localMousePosition

The mouse position in the current target coordinate system.

modi ers

Flag set holding the pressed modi er keys (Alt, Control, Shift, Windows/Command).

mouseDelta

Mouse position di erence between the last mouse event and this one.

mousePosition

The mouse position in the panel coordinate system.

shiftKey

Return true if the Shift key is pressed.

Leave feedback

Description
Interface for controls that hold a value and can notify when it is changed by user input.

Properties
value

The Value held by the control.

Public Methods
OnValueChanged

Registers this callback to receive ChangeEvent when value is changed by user
input.

RemoveOnValueChanged

Unregisters this callback from receiving ChangeEvent when value is changed
by user input.

SetValueWithoutNotify

Set the value and, even if di erent, does not notify registers callbacks with a
ChangeEvent

Leave feedback

Description
Interface for classes implementing UI panels.

Properties
focusController

Return the focus controller for this panel.

Leave feedback

Description
A reference to a scheduled action.

Leave feedback

Description
A scheduler allows you to register actions to be executed at a later point.

Public Methods
Schedule

Add this item to the list of scheduled tasks.

ScheduleForDuration

Schedule this action to be executed later. The item will be automatically unscheduled
after it has ran for the amount of time speci ed with the durationMs parameter.

ScheduleOnce

Schedule this action to be executed later. After the execution, the item will be
automatically unscheduled.

ScheduleUntil

Schedule this action to be executed later. Item will be unscheduled when condition is
met.

Unschedule

Manually unschedules a previously scheduled action.

Leave feedback

Description
This interface provides access to a VisualElement style data.
Reading properties from this object will read from the shared copy of style data, if multiple elements match the
same USS rules. When writing to any of the properties the target element will start owning its own style data and
stop using the shared copy. Writing to a property will mask the value coming from USS with the provided value
however other properties will still match the values from USS.

Properties
alignContent

Alignment of the whole area of children on the cross axis if they span over
multiple lines in this container.

alignItems

Alignment of children on the cross axis of this container.

alignSelf

Similar to align-items, but only for this speci c element.

backgroundColor

Background color to paint in the element's box.

backgroundImage

Background image to paint in the element's box.

backgroundScaleMode

Background image scaling in the element's box.

borderBottomLeftRadius

This is the radius of the bottom-left corner when a rounded rectangle is drawn in
the element's box.

borderBottomRightRadius

This is the radius of the bottom-right corner when a rounded rectangle is drawn
in the element's box.

borderBottomWidth

Space reserved for the bottom edge of the border during the layout phase.

borderColor

Color of the border to paint inside the element's box.

borderLeftWidth

Space reserved for the left edge of the border during the layout phase.

borderRadius

This is the radius of every corner when a rounded rectangle is drawn in the
element's box.

borderRightWidth

Space reserved for the right edge of the border during the layout phase.

borderTopLeftRadius

This is the radius of the top-left corner when a rounded rectangle is drawn in the
element's box.

borderTopRightRadius

This is the radius of the top-right corner when a rounded rectangle is drawn in
the element's box.

borderTopWidth

Space reserved for the top edge of the border during the layout phase.

color

Color to use when drawing the text of an element.

cursor

Mouse cursor to display when the mouse pointer is over an element.

ex

Ration of this element in its parent during the layout phase.

exBasis

Initial main size of a ex item, on the main ex axis. The nal layout mught be
smaller or larger, according to the ex shrinking and growing determined by the
ex property.

exDirection

Direction of the main axis to layout children in a container.

exGrow

Speci es how much the item will grow relative to the rest of the exible items
inside the same container.

exShrink

Speci es how the item will shrink relative to the rest of the exible items inside
the same container.

exWrap

Placement of children over multiple lines if not enough space is available in this
container.

font

Font to draw the element's text.

fontSize

Font size to draw the element's text.

fontStyleAndWeight

Font style and weight (normal, bold, italic) to draw the element's text.

height

Fixed height of an element for the layout.

justifyContent

Justi cation of children on the main axis of this container.

marginBottom

Space reserved for the bottom edge of the margin during the layout phase.

marginLeft

Space reserved for the left edge of the margin during the layout phase.

marginRight

Space reserved for the right edge of the margin during the layout phase.

marginTop

Space reserved for the top edge of the margin during the layout phase.

maxHeight

Maximum height for an element, when it is exible or measures its own size.

maxWidth

Maximum width for an element, when it is exible or measures its own size.

minHeight

Minimum height for an element, when it is exible or measures its own size.

minWidth

Minimum height for an element, when it is exible or measures its own size.

paddingBottom

Space reserved for the bottom edge of the padding during the layout phase.

paddingLeft

Space reserved for the left edge of the padding during the layout phase.

paddingRight

Space reserved for the right edge of the padding during the layout phase.

paddingTop

Space reserved for the top edge of the padding during the layout phase.

positionBottom

Bottom distance from the element's box during layout.

positionLeft

Left distance from the element's box during layout.

positionRight

Right distance from the element's box during layout.

positionTop

Top distance from the element's box during layout.

positionType

Element's positioning in its parent container.

sliceBottom

Size of the 9-slice's bottom edge when painting an element's background image.

sliceLeft

Size of the 9-slice's left edge when painting an element's background image.

sliceRight

Size of the 9-slice's right edge when painting an element's background image.

sliceTop

Size of the 9-slice's top edge when painting an element's background image.

textClipping

Clipping if the text does not t in the element's box.

unityTextAlign

Horizontal and vertical text alignment in the element's box.

visibility

Speci es whether or not an element is visible.

width

Fixed width of an element for the layout.

wordWrap

Word wrapping over multiple lines if not enough space is available to draw the
text of an element.

Leave feedback

Description
This interface provides access to a VisualElement transform data.
Reading properties of this object gives information about the tranform of its VisualElement. It is possible to write
the position, scale and rotation of the transform.

Properties
matrix

Transformation matrix calculated from the position, rotation and scale of the transform
(Read Only).

position

The position of the VisualElement's transform.

rotation

The rotation of the VisualElement's transform stored as a Quaternion.

scale

The scale of the VisualElement's transform.

Leave feedback

Description
Interface allowing access to this elements datawatch.

Public Methods
RegisterWatch

Starts watching an object. When watched, all changes on an object will trigger the callback
to be invoked.

UnregisterWatch

Unregisters a previously watched request.

Leave feedback

Description
An internal reference to a data watch request.

Leave feedback

Description
This type allows UXML attribute value retrieval during the VisualElement instantiation. An instance will be
provided to the factory method - see UXMLFactoryAttribute.

Public Methods
TryGetAttributeValue

Get the value of an attribute as a string.

Leave feedback

Description
Interface for UXML factories. While it is not strictly required, concrete factories should derive from the generic
class UxmlFactory.

Properties
canHaveAnyAttribute

Must return true if the UXML element attributes are not restricted to the
values enumerated by uxmlAttributesDescription.

substituteForTypeName

The type of element for which this element type can substitute for.

substituteForTypeNamespace

The UXML namespace for the type returned by substituteForTypeName.

substituteForTypeQuali edName

The fully quali ed XML name for the type returned by
substituteForTypeName.

uxmlAttributesDescription

Describes the UXML attributes expected by the element. The attributes
enumerated here will appear in the UXML schema.

uxmlChildElementsDescription

Describes the types of element that can appear as children of this element
in a UXML le.

uxmlName

The name of the UXML element read by the factory.

uxmlNamespace

The namespace of the UXML element read by the factory.

uxmlQuali edName

The fully quali ed name of the UXML element read by the factory.

Public Methods
AcceptsAttributeBag

Returns true if the factory accepts the content of the attribute bag.

Create

Instanciate and initialize an object of type T0.

Leave feedback

Description
Represents a scheduled task created with a VisualElement's schedule interface.

Properties
element

Returns the VisualElement this object is associated with.

isActive

Will be true when this item is scheduled. Note that an item's callback will only be executed
when it's VisualElement is attached to a panel.

Public Methods
Every

Repeats this action after a speci ed time.

ExecuteLater

Cancels any previously scheduled execution of this item and re-schedules the item.

ForDuration

After speci ed duration, the item will be automatically unscheduled.

Pause

Removes this item from its VisualElement's scheduler.

Resume

If not already active, will schedule this item on its VisualElement's scheduler.

StartingIn

Adds a delay to the rst invokation.

Until

Item will be unscheduled automatically when speci ed condition is met.

Leave feedback

Description
A scheduler allows you to register actions to be executed at a later point.

Public Methods
Execute

Schedule this action to be executed later.

Leave feedback

Description
Enum which describes the various types of changes that can occur on a VisualElement.

Properties
PersistentData

Persistence key or parent has changed on the current VisualElement.

PersistentDataPath

Persistence key or parent has changed on some child of the current VisualElement.

All

All change types have been agged.

Leave feedback

Description
The propagation phases of an event.
When an element receives an event, the event is propagated along a path built from the elements between the
panel root and the target element. In the TrickleDown phase, the event is sent from the root element to the target
parent element. In the AtTarget phase, the event is sent to the target element. In the BubbleUp phase, the event
is sent from the target parent element to the root element. In the last phase, the DefaultAction phase, the event is
resent to the target element.

Properties
None

The event is not being propagated.

TrickleDown

The event is being sent from the root element to the target parent element.

AtTarget

The event is being sent to the event target.

BubbleUp

The event is being sent to the event target parent element up to the root element.

DefaultAction

The event is being sent to the target element for it to execute its default actions for this
event. Event handlers do not get the events in this phase. Instead, ExecuteDefaultAction is
called on the target.

Leave feedback

Description
Controls how many items can be selected at once.

Properties
None

Selections are disabled.

Single

Only one item is selectable.

Multiple

Multiple items are selectable at once.

Leave feedback
Implements interfaces:IPlayable

Description
An implementation of IPlayable that controls playback of a VideoClip.
NOTE: You can use PlayableExtensions methods with VideoClipPlayable objects.

Static Methods
Create

Creates a VideoClipPlayable in the PlayableGraph.

Leave feedback

Description
Extension methods for the VideoPlayer class.

Static Methods
GetAudioSampleProvider

Return the AudioSampleProvider for the speci ed track, used to receive audio
samples during playback.

Leave feedback

Description
The BaseArmModel class is the base class intended for building "Arm Models" for 3 degrees of freedom (3DOF)
controllers. An arm model is intended to approximate a 6 degrees of freedom input device using only the rotation
of the 3DOF controller input. This is typically achieved by simulating the arm's motion using the rotation, and
acceleration information provided by the device.

Properties
headPoseSource

The head pose that will be used as an input to the arm simulation.

poseSource

The poseSource holds the input source to be used for the 3 degrees of freedom controller
data. It is this input that will be translated to a full 6 DOF pose by the Arm Model
implementation.

Protected Methods
TryGetTrackingDataFromSource

This method is used to allow BaseArmModel specializations to retrieve data
from the XRNode system.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
TryGetPoseFromProvider

This method is the interface point between PoseProviders and the
TrackedPoseDriver. Specializing types will implement this method to provide
pose data back to the attached TrackedPoseDriver. When a PoseProvider is
attached to a TrackedPoseDriver, the TrackedPoseDriver will call this interface
each time the TrackedPoseDriver requests a pose.

BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's
collider (2D physics only).

OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked

and has completed.
OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching
the trigger.

OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
The BasePoseProvider class is a basic implementation of a PoseProvider. A PoseProvider is used to extend the
behavior of the TrackedPoseDriver beyond the devices and endpoints that it can normally track. The PoseProvider
will override the values normally used by the TrackedPoseDriver. One example use for the PoseProvider is to
allow arm models to be attached to the TrackedPoseDriver.

Public Methods
TryGetPoseFromProvider

This method is the interface point between PoseProviders and the
TrackedPoseDriver. Specializing types will implement this method to provide pose
data back to the attached TrackedPoseDriver. When a PoseProvider is attached to
a TrackedPoseDriver, the TrackedPoseDriver will call this interface each time the
TrackedPoseDriver requests a pose.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

runInEditMode

Allow a speci c instance of a MonoBehaviour to run in edit mode (only available in the
editor).

useGUILayout

Disabling this lets you skip the GUI layout phase.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

CancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

Invoke

Invokes the method methodName in time seconds.

InvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every
repeatRate seconds.

IsInvoking

Is any invoke on methodName pending?

StartCoroutine

Starts a coroutine.

StopAllCoroutines

Stops all coroutines running on this behaviour.

StopCoroutine

Stops the rst coroutine named methodName, or the coroutine stored in routine
running on this behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
print

Logs message to the Unity Console (identical to Debug.Log).

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

Awake is called when the script instance is being loaded.

FixedUpdate

This function is called every xed framerate frame, if the
MonoBehaviour is enabled.

LateUpdate

LateUpdate is called every frame, if the Behaviour is enabled.

OnAnimatorIK

Callback for setting up animation IK (inverse kinematics).

OnAnimatorMove

Callback for processing animation movements for modifying root
motion.

OnApplicationFocus

Sent to all GameObjects when the player gets or loses focus.

OnApplicationPause

Sent to all GameObjects when the application pauses.

OnApplicationQuit

Sent to all game objects before the application quits.

OnAudioFilterRead

If OnAudioFilterRead is implemented, Unity will insert a custom lter
into the audio DSP chain.

OnBecameInvisible

OnBecameInvisible is called when the renderer is no longer visible by
any camera.

OnBecameVisible

OnBecameVisible is called when the renderer became visible by any
camera.

OnCollisionEnter

OnCollisionEnter is called when this collider/rigidbody has begun
touching another rigidbody/collider.

OnCollisionEnter2D

Sent when an incoming collider makes contact with this object's collider
(2D physics only).

OnCollisionExit

OnCollisionExit is called when this collider/rigidbody has stopped
touching another rigidbody/collider.

OnCollisionExit2D

Sent when a collider on another object stops touching this object's

collider (2D physics only).
OnCollisionStay

:ref::OnCollisionStay is called once per frame for every
collider/rigidbody that is touching rigidbody/collider.

OnCollisionStay2D

Sent each frame where a collider on another object is touching this
object's collider (2D physics only).

OnConnectedToServer

Called on the client when you have successfully connected to a server.

OnControllerColliderHit

OnControllerColliderHit is called when the controller hits a collider while
performing a Move.

OnDestroy

Destroying the attached Behaviour will result in the game or Scene
receiving OnDestroy.

OnDisable

This function is called when the behaviour becomes disabled.

OnDisconnectedFromServer

Called on the client when the connection was lost or you disconnected
from the server.

OnDrawGizmos

Implement OnDrawGizmos if you want to draw gizmos that are also
pickable and always drawn.

OnDrawGizmosSelected

Implement OnDrawGizmosSelected to draw a gizmo if the object is
selected.

OnEnable

This function is called when the object becomes enabled and active.

OnFailedToConnect

Called on the client when a connection attempt fails for some reason.

OnFailedToConnectToMasterServer

Called on clients or servers when there is a problem connecting to the
MasterServer.

OnGUI

OnGUI is called for rendering and handling GUI events.

OnJointBreak

Called when a joint attached to the same game object broke.

OnJointBreak2D

Called when a Joint2D attached to the same game object breaks.

OnMasterServerEvent

Called on clients or servers when reporting events from the
MasterServer.

OnMouseDown

OnMouseDown is called when the user has pressed the mouse button
while over the GUIElement or Collider.

OnMouseDrag

OnMouseDrag is called when the user has clicked on a GUIElement or
Collider and is still holding down the mouse.

OnMouseEnter

Called when the mouse enters the GUIElement or Collider.

OnMouseExit

Called when the mouse is not any longer over the GUIElement or
Collider.

OnMouseOver

Called every frame while the mouse is over the GUIElement or Collider.

OnMouseUp

OnMouseUp is called when the user has released the mouse button.

OnMouseUpAsButton

OnMouseUpAsButton is only called when the mouse is released over
the same GUIElement or Collider as it was pressed.

OnNetworkInstantiate

Called on objects which have been network instantiated with
Network.Instantiate.

OnParticleCollision

OnParticleCollision is called when a particle hits a Collider.

OnParticleSystemStopped

OnParticleSystemStopped is called when all particles in the system have
died, and no new particles will be born. New particles cease to be
created either after Stop is called, or when the duration property of a
non-looping system has been exceeded.

OnParticleTrigger

OnParticleTrigger is called when any particles in a particle system meet
the conditions in the trigger module.

OnPlayerConnected

Called on the server whenever a new player has successfully connected.

OnPlayerDisconnected

Called on the server whenever a player disconnected from the server.

OnPostRender

OnPostRender is called after a camera nished rendering the Scene.

OnPreCull

OnPreCull is called before a camera culls the Scene.

OnPreRender

OnPreRender is called before a camera starts rendering the Scene.

OnRenderImage

OnRenderImage is called after all rendering is complete to render
image.

OnRenderObject

OnRenderObject is called after camera has rendered the Scene.

OnSerializeNetworkView

Used to customize synchronization of variables in a script watched by a
network view.

OnServerInitialized

Called on the server whenever a Network.InitializeServer was invoked
and has completed.

OnTransformChildrenChanged

This function is called when the list of children of the transform of the
GameObject has changed.

OnTransformParentChanged

This function is called when the parent property of the transform of the
GameObject has changed.

OnTriggerEnter

OnTriggerEnter is called when the Collider other enters the trigger.

OnTriggerEnter2D

Sent when another object enters a trigger collider attached to this
object (2D physics only).

OnTriggerExit

OnTriggerExit is called when the Collider other has stopped touching

the trigger.
OnTriggerExit2D

Sent when another object leaves a trigger collider attached to this
object (2D physics only).

OnTriggerStay

OnTriggerStay is called once per physics update for every Collider other
that is touching the trigger.

OnTriggerStay2D

Sent each frame where another object is within a trigger collider
attached to this object (2D physics only).

OnValidate

This function is called when the script is loaded or a value is changed in
the inspector (Called in the editor only).

OnWillRenderObject

OnWillRenderObject is called for each camera if the object is visible and
not a UI element.

Reset

Reset to default values.

Start

Start is called on the frame when a script is enabled just before any of
the Update methods are called the rst time.

Update

Update is called every frame, if the MonoBehaviour is enabled.

Leave feedback

Description
Structure describing a bounded plane representing a real-world surface.
Unlike a Plane, which is in nite, a BoundedPlane has a size and a more detailed shape. A BoundedPlane can
change from frame to frame (see XRPlaneSubsystem.PlaneUpdated). Typically, this means the current
understanding of the plane has changed, rather than the real-world geometry. This can happen as the device
explores the physical space and is able to perceive more detail.

Properties
Alignment

The alignment of the plane, e.g., horizontal or vertical.

Center

Center point of the plane in device space.

Height

Current height of the plane.

Id

A session-unique identi er for the plane.

Normal

Normal vector of the plane in device space.

Plane

Returns the in nite Plane associated with this BoundedPlane.

Pose

Pose of the plane in device space.

Size

Current size of the plane.

SubsumedById

A session-unique identi er for the BoundedPlane that subsumed this plane.

Width

Current width of the plane.

Public Methods
GetCorners

Outputs four points, in device space, representing the four corners of the plane. The
corners are in clockwise order.

TryGetBoundary

Try to retrieve a list of positions in device space describing current plane boundary.

Leave feedback

Description
Structure containing data passed during Frame Received Event.

Properties
CameraSubsystem

Reference to the XRCameraSubsystem associated with this event.

Leave feedback

Description
Contains data supplied to a XRPlaneSubsystem.PlaneAdded event.
See Also: XRPlaneSubsystem, XRPlaneSubsystem.PlaneAdded

Properties
Plane

The BoundedPlane that was added.

PlaneSubsystem

A reference to the PlaneSubsystem object from which the event originated.

Leave feedback

Description
Contains data supplied to a XRPlaneSubsystem.PlaneRemoved event.
See Also: XRPlaneSubsystem, XRPlaneSubsystem.PlaneRemoved

Properties
Plane

The BoundedPlane that was removed.

PlaneSubsystem

A reference to the XRPlaneSubsystem object from which the event originated.

Leave feedback

Description
Contains data supplied to a XRPlaneSubsystem.PlaneUpdated event.
See Also: XRPlaneSubsystem, XRPlaneSubsystem.PlaneUpdated

Properties
Plane

The BoundedPlane that was updated.

PlaneSubsystem

A reference to the XRPlaneSubsystem object from which the event originated.

Leave feedback

Description
Contains data supplied to a XRDepth.PointCloudUpdated event.
See Also: XRDepth, XRDepth.PointCloudUpdated

Properties
DepthSubsystem

A reference to the XRDepthSubsystem object from which the event originated.

Leave feedback

Description
Describes the transform data of a real-world point.
To track and stabilize around important points in the real world, add a ReferencePoint at the point of interest, and
respond to updates to that ReferencePoint. Each frame, each ReferencePoint may have its position and rotation
updated (see Environment.ReferencePointUpdated) as the device gains a more thorough understanding of where
that point is in Unity space.

Properties
Id

ID for the reference point that is unique across the session.

Pose

The pose (position and rotation) of the reference point. Respond to changes in this pose
to correct for changes in the device's understanding of where this point is in the real
world.

TrackingState

The TrackingState of the reference point.

Leave feedback

Description
Data to be passed to the user when the device corrects its understanding of the world enough that the
ReferencePoint's position or rotation has changed.

Properties
PreviousPose

The previous Pose of the ReferencePoint, prior to this event.

PreviousTrackingState

The previous TrackingState of the ReferencePoint, prior to this event.

ReferencePoint

The reference point that has the value of its position, rotation, or both changed
enough through the device correcting its understanding of where this point should
be located in device space.

Leave feedback

Description
Structure de ning Tracking State Changed event arguments passed when tracking state changes.

Properties
NewState

New Tracking State.

SessionSubsystem

Reference to the XRSessionSubsystem object associated with the event.

Leave feedback

Description
A session-unique identi er for trackables in the environment, e.g., planes and feature points.
Ids are generally unique to a particular XRSessionSubsystem, but multiple sessions may produce identical ids for
di erent trackables.

Static Properties
InvalidId

Represents an invalid id.

Public Methods
ToString

Generates a nicely formatted version of the id.

Leave feedback

Description
Provides access to a device's camera.
The XRCameraSubsystem links a Unity Camera to a device camera for video overlay (pass-thru rendering). It also
allows developers to query for environmental light estimation, when available.

Properties
Camera

Set current Camera component within the app to be used by this
XRCameraInstance.

LastUpdatedFrame

The frame during which the camera subsystem was last successfully updated.

LightEstimationRequested

True if the XRCameraSubsystem should try to provide light estimation.

Material

Set current Material to be used while rendering to the render target.

Public Methods
GetTextures

Fills the provided texturesOut with the texture(s) associated with the
XRCameraSubsystem.

TryGetAverageBrightness

Provides brightness for the whole image as an average of all pixels'
brightness.

TryGetAverageColorTemperature

Provides color temperature for the whole image as an average of all
pixels' color temperature.

TryGetDisplayMatrix

Provides display matrix de ning how texture is being rendered on the
screen.

TryGetProjectionMatrix

Provides projection matrix used by camera subsystem.

TryGetShaderName

Provides shader name used by Camera subsystem to render texture.

TryGetTimestamp

Provides timestamp.

Events
FrameReceived

Event raised when a new camera frame is received.

Inherited Members

Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Class providing information about XRCameraSubsystem registration.

Properties
ProvidesAverageBrightness

Speci es if current subsystem is allowed to provide average brightness.

ProvidesAverageColorTemperature

Speci es if current subsystem is allowed to provide average camera
temperature.

ProvidesDisplayMatrix

Speci es if current subsystem is allowed to provide display matrix.

ProvidesProjectionMatrix

Speci es if current subsystem is allowed to provide projection matrix.

ProvidesTimestamp

Speci es if current subsystem is allowed to provide timestamp.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
Provides access to depth data of the physical environment, such as a point cloud.

Properties
LastUpdatedFrame

The frame during which the point cloud was last updated.

Public Methods
GetCon dence

Retrieves the con dence values for each point in the point cloud.

GetPoints

Retrieves the point cloud points.

Events
PointCloudUpdated

Raised once during each frame in which the point cloud is updated.

Inherited Members
Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Class providing information about XRDepthSubsystem registration.

Properties
SupportsFeaturePoints

When true, XRDepthSubsystem will provide list of feature points detected so far.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
XRInputSubsystem Instance is used to enable and disable the inputs coming from a speci c plugin.
Starting up an XRInputSubsystem Instance will cause that plugin to start feeding input device data to the following
InputTracking systems: InputTracking.GetLocalPosition and InputTracking.GetLocalRotation. Calling the Stop or
Shutdown functions will disable polling any input device data for that plugin.

Inherited Members
Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Information about an Input subsystem.

Properties
disablesLegacyInput

When true, will suppress legacy support for Daydream, Oculus, OpenVR, and Windows
MR built directly into the Unity runtime from generating input. This is useful when
adding an XRInputSubsystem that supports these devices.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
Provides methods, events, and properties that provides information about planes detected in the environment.

Properties
LastUpdatedFrame

The frame during which the planes were last updated.

Public Methods
GetAllPlanes

Get all the BoundedPlanes currently tracked by the system.

TryGetPlane

Get a BoundedPlane by TrackableId

TryGetPlaneBoundary

Try to retrieve a list of positions in device space describing the current plane
boundary.

Events
PlaneAdded

Raised for each BoundedPlane that has been added in the current frame.

PlaneRemoved

Raised for each BoundedPlane that has been removed in the current frame.

PlaneUpdated

Raised for each plane that has been updated in the current frame.

Inherited Members
Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Class providing information about XRPlaneSubsystem registration.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
Structure describing the result of a XRRaycastSubsystem.Raycast hit.
See Also: XRRaycastSubsystem, BoundedPlane, TrackableType, TrackableId

Properties
Distance

The distance, in meters, from the screen to the hit's XRRaycastSubsystemHit.Position.

HitType

The TrackableType(s) that were hit.

Pose

The position and rotation of the hit result in device space where the ray hit the trackable.

TrackableId

The TrackableId of the trackable that was hit by the raycast.

Leave feedback

Description
Provides methods and properties that allow for querying portions of the physical environment that are near a
provided speci ed ray. These trackables include planes and depth data.

Public Methods
Raycast

Casts a ray from a screen point against selected trackables (e.g., planes and feature
points).

Inherited Members
Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Class providing information about XRRaycastSubsystem registration.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
Provides methods and properties that allow for querying, creating, and removing of reference points. These
reference points are cues to the XRSessionSubsystem that indicate areas of interest in the environment which
helps assure that tracking of these points remains accurate.

Properties
LastUpdatedFrame

The frame during which the reference points were last updated.

Public Methods
GetAllReferencePoints

Retrieves all ReferencePoints added by calls to
XRReferencePointSubsystem.TryAddReferencePoint.

TryAddReferencePoint

Attempt to add a ReferencePoint that gets tracked by the device.

TryGetReferencePoint

Attempt to retrieve a ReferencePoint.

TryRemoveReferencePoint

Attempt to remove a ReferencePoint getting tracked by the device.

Events
ReferencePointUpdated

Raised each frame for each ReferencePoint that had the values of its position,
rotation, or both changed enough by the device correcting its understanding of
where the point should be located in Unity space.

Inherited Members
Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Class providing information about XRReferencePointSubsystem registration.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
A collection of methods and properties used to interact with and con gure an XR session.

Properties
LastUpdatedFrame

The frame during which the tracking state was last updated.

TrackingState

Get current tracking status of the device.

Events
TrackingStateChanged

Raised when the TrackingState changes.

Inherited Members
Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Class providing information about XRSessionSubsystem registration.

Inherited Members
Properties
id

A unique string that identi es the subsystem that this Descriptor can create.

Leave feedback

Description
Describes current plane alignment in mixed reality space.

Properties
Horizontal

Plane has horizontal alignment.

Vertical

Plane has vertical alignment.

NonAxis

Plane is not alligned along cardinal (X, Y or Z) axis.

Leave feedback

Description
A trackable is feature in the physical environment that a device is able to track, such as a plane.
TrackableType may be used as a ag and passed to methods like XRRaycastSubsystem.Raycast to specify
di erent types of trackables to raycast against.

Properties
None

No trackable.

PlaneWithinPolygon

The boundary of a BoundedPlane

PlaneWithinBounds

Within the BoundedPlane.Size of a BoundedPlane

PlaneWithinIn nity

The in nite plane of a BoundedPlane

PlaneEstimated

An estimated plane.

Planes

Any of the plane types.

FeaturePoint

A feature point.

All

All trackables (planes and point cloud)

Leave feedback

Description
Current tracking state of the device.
Tracking refers to the ability of the device to know its position and orientation in space. Covering the device's
sensors, for example, may cause it to lose tracking.

Properties
Unknown

Tracking state is unknown.

Tracking

Tracking is currently working.

Unavailable

Tracking is not available.

Leave feedback
Implements interfaces:ISubsystem

Description
A Subsystem is initialized from a SubsystemDescriptor for a given Subsystem (Example, Input, Environment,
Display, etc.) and provides an interface to interact with that given Subsystem until it is Destroyed. After a
Subsystem is created it can be Started or Stopped to turn on and o functionality (and preserve performance).
The base type for Subsystem only exposes this functionality; this class is designed to be a base class for derived
classes that expose more functionality speci c to a given Subsystem.
Note: initializing a second Subsystem from the same SubsystemDescriptor will return a reference to the existing
Subsystem as only one Subsystem is currently allowed for a single Subsystem provider.

Public Methods
Destroy

Destroys this instance of a subsystem.

Start

Starts an instance of a subsystem.

Stop

Stops an instance of a subsystem.

Leave feedback

Description
Gives access to subsystems which provide additional functionality through plugins.
Provides the ability to query for SubsystemDescriptors which enumerate features. Given an SubsystemDescriptor,
you can create an Subsystem to utilize the subsystem.

Static Methods
GetInstances

Returns active Subsystems of a speci c instance type.

GetSubsystemDescriptors

Returns a list of SubsystemDescriptors which describe additional functionality
that can be enabled.

Leave feedback
Obsolete

Description
ADBannerView is a wrapper around the ADBannerView class found in the Apple iAd framework and is only
available on iOS.
It provides a view that displays banner advertisements to the user.
iOS.ADBannerView class is obsolete. Apple iAD service discontinued.

Leave feedback
Obsolete

Description
Speci es how banner should be layed out on screen.
Please note that Traditional Banner and Rect Banner (introduced in ios6) use di erent enum values. If you use
"wrong" enum value for current ad type: for Traditional Banner Top* and Center* will be considered Top, and
Bottom* will be considered Bottom* for Rect Banner Top will be considered TopLeft and Bottom - BottomLeft.

Leave feedback
Obsolete

Description
The type of the banner view.
Please check availability of banner type with ADBannerView.IsAvailable. Traditional banner is always available,
though.

Leave feedback
Obsolete

Description
ADInterstitialAd is a wrapper around the ADInterstitialAd class found in the Apple iAd framework and is only
available on iPad.
It provides full-screen advertisements that your iPad application can display to the user.
Please note that this class is a thin wrapper around the iOS native iAD class, so care should be taken when
creating/destroying instances of it frequently. If you need to show ads frequently, instead of constantly destroying
and recreating the object you should manually call ReloadAd, or create an auto-reloading ADInterstitialAd.
iOS.ADInterstitialAd class is obsolete. Apple iAD service discontinued.

Leave feedback

Description
Interface into iOS speci c functionality.

Static Properties
advertisingIdenti er

Advertising ID.

advertisingTrackingEnabled

Is advertising tracking enabled.

deferSystemGesturesMode

Defer system gestures until the second swipe on speci c edges.

generation

The generation of the device. (Read Only)

hideHomeButton

Speci es whether the home button should be hidden in the iOS build of this
application.

systemVersion

iOS version.

vendorIdenti er

Vendor ID.

Static Methods
RequestStoreReview

Request App Store rating and review from the user.

ResetNoBackupFlag

Reset "no backup" le ag: le will be synced with iCloud/iTunes backup and can be
deleted by OS in low storage situations.

SetNoBackupFlag

Set le ag to be excluded from iCloud/iTunes backup.

Leave feedback

Description
iOS.LocalNoti cation is a wrapper around the UILocalNoti cation class found in the Apple UIKit framework and is
only available on iPhone/iPad/iPod Touch.
It represents noti cations that an application can schedule for presentation to its user at speci c dates and times.
The operating system is responsible for delivering the noti cation at the speci ed time. Local noti cations are
similar to remote noti cations but are scheduled and delivered locally and do not require connection with remote
servers.
Local noti cations are scheduled and handled using Noti cationServices class.

Static Properties
defaultSoundName

The default system sound. (Read Only)

Properties
alertAction

The title of the action button or slider.

alertBody

The message displayed in the noti cation alert.

alertLaunchImage

Identi es the image used as the launch image when the user taps the action
button.

alertTitle

A short description of the reason for the alert.

applicationIconBadgeNumber

The number to display as the application's icon badge.

reDate

The date and time when the system should deliver the noti cation.

hasAction

A boolean value that controls whether the alert action is visible or not.

repeatCalendar

The calendar type (Gregorian, Chinese, etc) to use for rescheduling the
noti cation.

repeatInterval

The calendar interval at which to reschedule the noti cation.

soundName

The name of the sound le to play when an alert is displayed.

timeZone

The time zone of the noti cation's re date.

userInfo

A dictionary for passing custom information to the noti ed application.

Constructors

LocalNoti cation

Creates a new local noti cation.

Leave feedback

Description
Noti cationServices is only available on iPhone/iPad/iPod Touch.
It is used for scheduling, registering and handling noti cations.

Static Properties
deviceToken

Device token received from Apple Push Service after calling
Noti cationServices.RegisterForRemoteNoti cationTypes. (Read Only)

enabledNoti cationTypes

Enabled local and remote noti cation types.

localNoti cationCount

The number of received local noti cations. (Read Only)

localNoti cations

The list of objects representing received local noti cations. (Read Only)

registrationError

Returns an error that might occur on registration for remote noti cations via
Noti cationServices.RegisterForRemoteNoti cationTypes. (Read Only)

remoteNoti cationCount

The number of received remote noti cations. (Read Only)

remoteNoti cations

The list of objects representing received remote noti cations. (Read Only)

scheduledLocalNoti cations

All currently scheduled local noti cations.

Static Methods
CancelAllLocalNoti cations

Cancels the delivery of all scheduled local noti cations.

CancelLocalNoti cation

Cancels the delivery of the speci ed scheduled local noti cation.

ClearLocalNoti cations

Discards of all received local noti cations.

ClearRemoteNoti cations

Discards of all received remote noti cations.

GetLocalNoti cation

Returns an object representing a speci c local noti cation. (Read Only)

GetRemoteNoti cation

Returns an object representing a speci c remote noti cation. (Read Only)

PresentLocalNoti cationNow

Presents a local noti cation immediately.

RegisterForNoti cations

Register to receive local and remote noti cations of the speci ed types
from a provider via Apple Push Service.

ScheduleLocalNoti cation

Schedules a local noti cation.

UnregisterForRemoteNoti cations

Unregister for remote noti cations.

Leave feedback

Description
On Demand Resources API.
See Also: OnDemandResources.PreloadAsync and OnDemandResourcesRequest.

Static Properties
enabled

Indicates whether player was built with "Use On Demand Resources" player setting
enabled.

Static Methods
PreloadAsync

Creates an On Demand Resources (ODR) request.

Leave feedback

Description
Represents a request for On Demand Resources (ODR). It's an AsyncOperation and can be yielded in a coroutine.
NOTE: only available on iOS.
Creating an OnDemandResourcesRequest is equivalent to calling
NSBundleResourceRequest.beginAccessingResourcesWithCompletionHandler . The request will keep the on
demand resource alive until either Dispose() is called or the request object is collected by a garbage collector,
which is the equivalent of calling NSBundleResourceRequest.endAccessingResources .

using
using
using
using

UnityEngine;
UnityEngine.iOS;
System;
System.Collections;

public static class Loader
{
public static IEnumerator LoadAsset(string resourceName)
{
// Create the request
var request = OnDemandResources.PreloadAsync(new string[] { "Asset's ODR

// Wait until request is completed
yield return request;

// Check for errors
if (request.error != null)
throw new Exception("ODR request failed: " + request.error);

// Get path to the resource and use it
var path = request.GetResourcePath(resourceName);
Debug.Log(path);

// Call Dispose() when resource is no longer needed.
request.Dispose();
}
}

Properties
error

Returns an error after operation is complete.

loadingPriority

Sets the priority for request.

Public Methods
Dispose

Release all resources kept alive by On Demand Resources (ODR) request.

GetResourcePath

Gets le system's path to the resource available in On Demand Resources (ODR) request.

Inherited Members
Properties
allowSceneActivation

Allow Scenes to be activated as soon as it is ready.

isDone

Has the operation nished? (Read Only)

priority

Priority lets you tweak in which order async operation calls will be performed.

progress

What's the operation's progress. (Read Only)

Events
completed

Event that is invoked upon operation completion. An event handler that is registered in
the same frame as the call that creates it will be invoked next frame, even if the operation
is able to complete synchronously. If a handler is registered after the operation has
completed and has already invoked the complete event, the handler will be called
synchronously.

Leave feedback

Description
RemoteNoti cation is only available on iPhone/iPad/iPod Touch.
Remote noti cations are sent by an application's remote server (its provider) to Apple Push Noti cation service
which pushes the noti cation to devices on which the application is installed.
Remote noti cations are registered for and handled using Noti cationServices class.

Properties
alertBody

The message displayed in the noti cation alert. (Read Only)

alertTitle

A short description of the reason for the alert. (Read Only)

applicationIconBadgeNumber

The number to display as the application's icon badge. (Read Only)

hasAction

A boolean value that controls whether the alert action is visible or not. (Read
Only)

soundName

The name of the sound le to play when an alert is displayed. (Read Only)

userInfo

A dictionary for passing custom information to the noti ed application. (Read
Only)

Leave feedback

Description
ActivityIndicator Style (iOS Speci c).

Properties
DontShow

Do not show ActivityIndicator.

WhiteLarge

The large white style of indicator (UIActivityIndicatorViewStyleWhiteLarge).

White

The standard white style of indicator (UIActivityIndicatorViewStyleWhite).

Gray

The standard gray style of indicator (UIActivityIndicatorViewStyleGray).

Leave feedback

Description
Specify calendar types.

Properties
GregorianCalendar

Identi es the Gregorian calendar.

BuddhistCalendar

Identi es the Buddhist calendar.

ChineseCalendar

Identi es the Chinese calendar.

HebrewCalendar

Identi es the Hebrew calendar.

IslamicCalendar

Identi es the Islamic calendar.

IslamicCivilCalendar

Identi es the Islamic civil calendar.

JapaneseCalendar

Identi es the Japanese calendar.

RepublicOfChinaCalendar

Identi es the Republic of China (Taiwan) calendar.

PersianCalendar

Identi es the Persian calendar.

IndianCalendar

Identi es the Indian calendar.

ISO8601Calendar

Identi es the ISO8601.

Leave feedback

Description
Specify calendrical units.

Properties
Era

Speci es the era unit.

Year

Speci es the year unit.

Month

Speci es the month unit.

Day

Speci es the day unit.

Hour

Speci es the hour unit.

Minute

Speci es the minute unit.

Second

Speci es the second unit.

Week

Speci es the week unit.

Weekday

Speci es the weekday unit.

WeekdayOrdinal

Speci es the ordinal weekday unit.

Quarter

Speci es the quarter of the calendar.

Leave feedback

Description
iOS device generation.

Properties
iPhone

iPhone, rst generation.

iPhone3G

iPhone, second generation.

iPhone3GS

iPhone, third generation.

iPodTouch1Gen

iPod Touch, rst generation.

iPodTouch2Gen

iPod Touch, second generation.

iPodTouch3Gen

iPod Touch, third generation.

iPad1Gen

iPad, rst generation.

iPhone4

iPhone, fourth generation.

iPodTouch4Gen

iPod Touch, fourth generation.

iPad2Gen

iPad, second generation.

iPhone4S

iPhone, fth generation.

iPad3Gen

iPad, third generation.

iPhone5

iPhone5.

iPodTouch5Gen

iPod Touch, fth generation.

iPadMini1Gen

iPadMini, rst generation.

iPad4Gen

iPad, fourth generation.

iPhone5C

iPhone 5C.

iPhone5S

iPhone 5S.

iPadAir1

iPad Air.

iPadMini2Gen

iPadMini Retina, second generation.

iPhone6

iPhone 6.

iPhone6Plus

iPhone 6 plus.

iPadMini3Gen

iPad Mini 3.

iPadAir2

iPad Air 2.

iPhone6S

iPhone 6S.

iPhone6SPlus

iPhone 6S Plus.

iPadPro1Gen

iPad Pro 12.9", rst generation.

iPadMini4Gen

iPad Mini, fourth generation.

iPhoneSE1Gen

iPhone SE, rst generation.

iPadPro10Inch1Gen

iPad Pro 9.7", rst generation.

iPhone7

iPhone 7.

iPhone7Plus

iPhone 7 Plus.

iPodTouch6Gen

iPod Touch, sixth generation.

iPad5Gen

iPad Air, fth generation.

iPadPro2Gen

iPad Pro 12.9", second generation.

iPadPro10Inch2Gen

iPad Pro 10.5", second generation 10" iPad.

iPhone8

iPhone 8.

iPhone8Plus

iPhone 8 Plus.

iPhoneX

iPhone X.

iPhoneXS

iPhone XS.

iPhoneXSMax

iPhone XSMax.

iPhoneXR

iPhone XR.

iPhoneUnknown

Yet unknown iPhone.

iPadUnknown

Yet unknown iPad.

iPodTouchUnknown

Yet unknown iPod Touch.

Leave feedback

Description
Speci es local and remote noti cation types.

Properties
None

No noti cation types speci ed.

Badge

Noti cation is a badge shown above the application's icon.

Sound

Noti cation is an alert sound.

Alert

Noti cation is an alert message.

Leave feedback

Description
Bit-mask used to control the deferring of system gestures on iOS.
On iPhone X the home button is implemented as a system gesture (swipe up from the lower edge of the screen).
Other gestures are implemented as swipes from other screen edges. Note, this may interfere with games that use
swipes as an interaction method. This bit-mask speci es which screen edge gestures the system defers to the
second swipe. If deferring is enabled on a speci c screen edge, the rst swipe is ignored and provides a way to
reduce unwanted interactions with the App. Note that iOS Human interface guidelines do not recommend
enabling this behavior as it may confuse users.

Properties
None

Disables gesture deferring on all edges.

TopEdge

Identi es top screen edge.

LeftEdge

Identi es left screen edge.

BottomEdge

Identi es bottom screen edge.

RightEdge

Identi es right screen edge.

All

Identi es all screen edges.

Leave feedback

Description
Extension methods for IJobParallelForTransform.

Static Methods
Schedule

Schedule.

Leave feedback

Description
Position, rotation and scale of an object.

Properties
localPosition

The position of the transform relative to the parent.

localRotation

The rotation of the transform relative to the parent transform's rotation.

localScale

The scale of the transform relative to the parent.

position

The position of the transform in world space.

rotation

The rotation of the transform in world space stored as a Quaternion.

Leave feedback

Description
TransformAccessArray.

Properties
capacity

Returns array capacity.

isCreated

isCreated.

length

Length.

this[int]

Array indexer.

Constructors
TransformAccessArray

Constructor.

Public Methods
Add

Add.

Dispose

Dispose.

RemoveAtSwapBack

Remove item at index.

SetTransforms

Set transforms.

Static Methods
Allocate

Allocate.

Leave feedback

Description
IJobParallelForTransform.

Public Methods
Execute

Execute.

Leave feedback
Obsolete

Description
Details about a UNET MatchMaker match.
This is a data object that represents the data returned from NetworkMatch.CreateMatch and
NetworkMatch.JoinMatch.

Leave feedback
Obsolete

Description
A class describing the match information as a snapshot at the time the request was processed on the
MatchMaker.
The information in this class is part of the data list returned when listing open matches through MatchMaker. It
describes the instantaneous state at the time the request was handled.

Leave feedback
Obsolete

Description
A class describing one member of a match and what direct connect information other clients have supplied.
A "MatchInfoDirectConnectSnapshot" instance contains mostly optional data which a connection can supply when
it creates or joins a match. That info is then returned in these results so that other clients can directly connect to
that client instead of going through the internet via a relay server.

Leave feedback
Obsolete

Description
A component for communicating with the Unity Multiplayer Matchmaking service.
This class aggregates all the supported JSON calls into functions that are callable for games that wish to interact
with the MatchMaker service.
The example code below shows how to use NetworkMatch API.

using
using
using
using

UnityEngine;
UnityEngine.Networking;
UnityEngine.Networking.Match;
System.Collections.Generic;

public class SimpleMatchMaker : MonoBehaviour
{
void Start()
{
NetworkManager.singleton.StartMatchMaker();
}

//call this method to request a match to be created on the server
public void CreateInternetMatch(string matchName)
{
NetworkManager.singleton.matchMaker.CreateMatch(matchName, 4, true, "",
}

//this method is called when your request for creating a match is returned
private void OnInternetMatchCreate(bool success, string extendedInfo, MatchI
{
if (success)
{
//Debug.Log("Create match succeeded");

MatchInfo hostInfo = matchInfo;
NetworkServer.Listen(hostInfo, 9000);

NetworkManager.singleton.StartHost(hostInfo);
}
else
{
Debug.LogError("Create match failed");
}
}

//call this method to find a match through the matchmaker
public void FindInternetMatch(string matchName)
{
NetworkManager.singleton.matchMaker.ListMatches(0, 10, matchName, true,
}

//this method is called when a list of matches is returned
private void OnInternetMatchList(bool success, string extendedInfo, List
{
}

public SyncListPOW m_pows = new SyncListPOW();
}

Make sure your struct members are non-static public members.
We allow the following types to be used in your struct;
• Basic type (byte, int, oat, string, UInt64, etc)
• Built-in Unity math type (Vector3, Quaternion, etc),
• Arrays of basic types
• Other structs containing allowable types
• NetworkIdentity
• NetworkInstanceId
• NetworkHash128
• GameObject with a NetworkIdentity component attached.
Serialization methods will be auto-generated for this new class.

Inherited Members
Public Methods
HandleMsg

Internal function used for remote list operations.

Leave feedback
Obsolete

Description
A list of unsigned integers that will be synchronized from server to clients.

Inherited Members
Public Methods
HandleMsg

Internal function used for remote list operations.

Leave feedback

Description
The UnityWebRequest object is used to communicate with web servers.
UnityWebRequests handle the ow of HTTP communication with web servers. Other objects - speci cally
DownloadHandler and UploadHandler - govern downloading and uploading data, respectively.
A set of static functions are provided for convenience; these return UnityWebRequest objects properly con gured
for many common use cases. See: Get, Post, Put, GetTexture.
Note: Most properties on the UnityWebRequest object cannot be altered once the UnityWebRequest has begun
communicating with a remote server by calling the Send method.

Static Properties
kHttpVerbCREATE

The string "CREATE", commonly used as the verb for an HTTP CREATE request.

kHttpVerbDELETE

The string "DELETE", commonly used as the verb for an HTTP DELETE request.

kHttpVerbGET

The string "GET", commonly used as the verb for an HTTP GET request.

kHttpVerbHEAD

The string "HEAD", commonly used as the verb for an HTTP HEAD request.

kHttpVerbPOST

The string "POST", commonly used as the verb for an HTTP POST request.

kHttpVerbPUT

The string "PUT", commonly used as the verb for an HTTP PUT request.

Properties
certi cateHandler

Holds a reference to a Certi cateHandler object, which manages
certi cate validation for this UnityWebRequest.

chunkedTransfer

Indicates whether the UnityWebRequest system should employ the
HTTP/1.1 chunked-transfer encoding method.

disposeCerti cateHandlerOnDispose

If true, any Certi cateHandler attached to this UnityWebRequest will
have Certi cateHandler.Dispose called automatically when
UnityWebRequest.Dispose is called.

disposeDownloadHandlerOnDispose

If true, any DownloadHandler attached to this UnityWebRequest will
have DownloadHandler.Dispose called automatically when
UnityWebRequest.Dispose is called.

disposeUploadHandlerOnDispose

If true, any UploadHandler attached to this UnityWebRequest will have
UploadHandler.Dispose called automatically when
UnityWebRequest.Dispose is called.

downloadedBytes

Returns the number of bytes of body data the system has downloaded
from the remote server. (Read Only)

downloadHandler

Holds a reference to a DownloadHandler object, which manages body
data received from the remote server by this UnityWebRequest.

downloadProgress

Returns a oating-point value between 0.0 and 1.0, indicating the
progress of downloading body data from the server. (Read Only)

error

A human-readable string describing any system errors encountered by
this UnityWebRequest object while handling HTTP requests or
responses. (Read Only)

isDone

Returns true after the UnityWebRequest has nished communicating
with the remote server. (Read Only)

isHttpError

Returns true after this UnityWebRequest receives an HTTP response
code indicating an error. (Read Only)

isModi able

Returns true while a UnityWebRequest’s con guration properties can
be altered. (Read Only)

isNetworkError

Returns true after this UnityWebRequest encounters a system error.
(Read Only)

method

De nes the HTTP verb used by this UnityWebRequest, such as GET or
POST.

redirectLimit

Indicates the number of redirects which this UnityWebRequest will
follow before halting with a “Redirect Limit Exceeded” system error.

responseCode

The numeric HTTP response code returned by the server, such as 200,
404 or 500. (Read Only)

timeout

Sets UnityWebRequest to attempt to abort after the number of
seconds in timeout have passed.

uploadedBytes

Returns the number of bytes of body data the system has uploaded to
the remote server. (Read Only)

uploadHandler

Holds a reference to the UploadHandler object which manages body
data to be uploaded to the remote server.

uploadProgress

Returns a oating-point value between 0.0 and 1.0, indicating the
progress of uploading body data to the server.

uri

De nes the target URI for the UnityWebRequest to communicate with.

url

De nes the target URL for the UnityWebRequest to communicate with.

useHttpContinue

Determines whether this UnityWebRequest will include Expect: 100Continue in its outgoing request headers. (Default: true).

Constructors
UnityWebRequest

Creates a UnityWebRequest with the default options and no attached DownloadHandler
or UploadHandler. Default method is GET.

Public Methods
Abort

If in progress, halts the UnityWebRequest as soon as possible.

Dispose

Signals that this UnityWebRequest is no longer being used, and should clean up any
resources it is using.

GetRequestHeader

Retrieves the value of a custom request header.

GetResponseHeader

Retrieves the value of a response header from the latest HTTP response received.

GetResponseHeaders

Retrieves a dictionary containing all the response headers received by this
UnityWebRequest in the latest HTTP response.

SendWebRequest

Begin communicating with the remote server.

SetRequestHeader

Set a HTTP request header to a custom value.

Static Methods
ClearCookieCache

Clears stored cookies from the cache.

Delete

Creates a UnityWebRequest con gured for HTTP DELETE.

EscapeURL

Escapes characters in a string to ensure they are URL-friendly.

GenerateBoundary

Generate a random 40-byte array for use as a multipart form boundary.

Get

Creates a UnityWebRequest con gured for HTTP GET.

Head

Creates a UnityWebRequest con gured to send a HTTP HEAD request.

Post

Creates a UnityWebRequest con gured to send form data to a server via HTTP POST.

Put

Creates a UnityWebRequest con gured to upload raw data to a remote server via
HTTP PUT.

SerializeFormSections

Converts a List of IMultipartFormSection objects into a byte array containing raw
multipart form data.

SerializeSimpleForm

Serialize a dictionary of strings into a byte array containing URL-encoded UTF8
characters.

UnEscapeURL

Converts URL-friendly escape sequences back to normal text.

Leave feedback

Description
Helpers for downloading asset bundles using UnityWebRequest.

Static Methods
GetAssetBundle

Creates a UnityWebRequest optimized for downloading a Unity Asset Bundle via HTTP
GET.

Leave feedback

Description
Asynchronous operation object returned from UnityWebRequest.SendWebRequest().
You can yield until it continues, register an event handler with AsyncOperation.completed, or manually check
whether it's done (AsyncOperation.isDone) or progress (AsyncOperation.progress).

Properties
webRequest

Returns the associated UnityWebRequest that created the operation.

Inherited Members
Properties
allowSceneActivation

Allow Scenes to be activated as soon as it is ready.

isDone

Has the operation nished? (Read Only)

priority

Priority lets you tweak in which order async operation calls will be performed.

progress

What's the operation's progress. (Read Only)

Events
completed

Event that is invoked upon operation completion. An event handler that is registered in
the same frame as the call that creates it will be invoked next frame, even if the operation
is able to complete synchronously. If a handler is registered after the operation has
completed and has already invoked the complete event, the handler will be called
synchronously.

Leave feedback

Description
Helpers for downloading multimedia les using UnityWebRequest.

Static Methods
GetAudioClip

Create a UnityWebRequest to download an audio clip via HTTP GET and create an
AudioClip based on the retrieved data.

Leave feedback

Description
Helpers for downloading image les into Textures using UnityWebRequest.

Static Methods
GetTexture

Create a UnityWebRequest intended to download an image via HTTP GET and create a
Texture based on the retrieved data.

Leave feedback

Description
Helper object for UnityWebRequests. Manages the bu ering and transmission of body data during HTTP
requests.
When attached to a UnityWebRequest, an UploadHandler object handles all information regarding the bu ering
and transmission of body data during an HTTP request. By placing data in an UploadHandler and attaching it to a
UnityWebRequest, the UnityWebRequest is implicitly instructed to transmit the UploadHandler's data to the
remote server. The data will always be delivered as HTTP request body data.
UploadHandler is a base class and cannot be directly instantiated. Currently, only one type of UploadHandler is
available: UploadHandlerRaw.
See Also: UnityWebRequest, UploadHandlerRaw.

Properties
contentType

Determines the default Content-Type header which will be transmitted with the outbound
HTTP request.

data

The raw data which will be transmitted to the remote server as body data. (Read Only)

progress

Returns the proportion of data uploaded to the remote server compared to the total
amount of data to upload. (Read Only)

Public Methods
Dispose

Signals that this UploadHandler is no longer being used, and should clean up any
resources it is using.

Leave feedback

Description
A specialized UploadHandler that reads data from a given le and sends raw bytes to the server as the request
body.
You can use it to send a large amount of data to the server with a low memory footprint.

using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public class UHFileSample : MonoBehaviour
{
void Start()
{
StartCoroutine(UploadFileData());
}

IEnumerator UploadFileData()
{
using (var uwr = new UnityWebRequest("http://yourwebsite.com/upload", Un
{
uwr.uploadHandler = new UploadHandlerFile("/path/to/file");
yield return uwr.SendWebRequest();
if (uwr.isNetworkError || uwr.isHttpError)
Debug.LogError(uwr.error);
else
{
// file data successfully sent
}
}
}
}

Constructors
UploadHandlerFile

Create a new upload handler to send data from the given le to the server.

Inherited Members

Properties
contentType

Determines the default Content-Type header which will be transmitted with the outbound
HTTP request.

data

The raw data which will be transmitted to the remote server as body data. (Read Only)

progress

Returns the proportion of data uploaded to the remote server compared to the total
amount of data to upload. (Read Only)

Public Methods
Dispose

Signals that this UploadHandler is no longer being used, and should clean up any
resources it is using.

Leave feedback

Description
A general-purpose UploadHandler subclass, using a native-code memory bu er.
This subclass copies input data into a native-code memory bu er at construction time, and transmits that data
verbatim as HTTP request body data.

Constructors
UploadHandlerRaw

General constructor. Contents of the input argument are copied into a native bu er.

Inherited Members
Properties
contentType

Determines the default Content-Type header which will be transmitted with the outbound
HTTP request.

data

The raw data which will be transmitted to the remote server as body data. (Read Only)

progress

Returns the proportion of data uploaded to the remote server compared to the total
amount of data to upload. (Read Only)

Public Methods
Dispose

Signals that this UploadHandler is no longer being used, and should clean up any
resources it is using.

Leave feedback

Description
Networking Utility.

Static Methods
GetAccessTokenForNetwork

Utility function to get this client's access token for a particular network, if it has
been set.

GetSourceID

Utility function to get the client's SourceID for unique identi cation.

SetAccessTokenForNetwork

Utility function that accepts the access token for a network after it's received
from the server.

Leave feedback

Description
An interface for composition of data into multipart forms.
In order to provide a ner level of control for those wishing to generate multipart form data, but without forcing
most users to refer to RFC 2388, Unity provides this simple interface which the UnityWebRequest API can use to
serialize complex data into properly-formatted bytes.
For convenience, the two general types of form sections have been encapsulated into two stock implementations
of IMultipartFormSection. Both stock implementations are simply controlled via their constructors.
IMultipartFormSection implementors are converted into bytes via [UnityWebRequest.SerializeFormSections].
See Also: [MultipartFormDataSection], [MultipartFormFileSection].

Properties
contentType
leName

Returns the value to use in the Content-Type header for this form section.
Returns a string denoting the desired lename of this section on the destination server.

sectionData

Returns the raw binary data contained in this section. Must not return null or a zerolength array.

sectionName

Returns the name of this section, if any.

Leave feedback

Description
An enumeration of the options that can be set on a network channel.

Properties
MaxPendingBu ers

The option to set the number of pending bu ers for a channel.

AllowFragmentation

The option to allow packet fragmentation for a channel.

MaxPacketSize

The option to set the maximum packet size allowed for a channel.

Leave feedback

Description
De nes size of the bu er holding reliable messages, before they will be acknowledged.

Properties
Acks32

Ack bu er can hold 32 messages.

Acks64

Ack bu er can hold 64 messages.

Acks96

Ack bu er can hold 96 messages.

Acks128

Ack bu er can hold 128 messages.

Leave feedback

Description
Possible Networking.NetworkTransport errors.
A group of possible NetworkTransport errors. If an error is returned from a NetworkTransport function, you can
use NetworkError to nd out what type of error occured. Make sure to use NetworkTransport.Receive or similar
to listen for these type of events.

//Create a Button (Create
Create>UI
UI>Button
Button) for the host.

//Attach this Button in the Inspector of your GameObject.

//In Play Mode, click the Button to connect. If the connection works, the detail

using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;

public class Example : MonoBehaviour
{
int m_ServerSocket;

HostTopology m_HostTopology;

//These are the Buttons that start the client and server, and the Button for
//Assure that you assign these in the Inspector before testing
public Button m_ServerButton;

void Start()
{
//Set up the Connection Configuration which holds channel information
ConnectionConfig config = new ConnectionConfig();

//Create a new Host information based on the configuration created, and
m_HostTopology = new HostTopology(config, 20);

//Initialise the NetworkTransport
NetworkTransport.Init();

//Call the ServerButton function when you click the server Button
m_ServerButton.onClick.AddListener(ServerButton);
}

void Update()
{
//These are the variables that are replaced by the incoming message
int outHostId;
int outConnectionId;
int outChannelId;
byte[] buffer = new byte[1024];
int receivedSize;
byte error;

//Set up the Network Transport to receive the incoming message, and deci
NetworkEventType eventType = NetworkTransport.Receive(out outHostId, out

switch (eventType)
{
//Use this case when there is a connection detected
case NetworkEventType.ConnectEvent:
{
//Call the function to deal with the received information
OnConnect(outHostId, outConnectionId, (NetworkError)error);
break;
}

case NetworkEventType.Nothing:
break;

default:
//Output the error
Debug.LogError("Unknown network message type received: " + event
break;
}
}

//This function is called when a connection is detected
void OnConnect(int hostID, int connectionID, NetworkError error)
{
//Output the given information to the console
Debug.Log("OnConnect(hostId = " + hostID + ", connectionId = "
+ connectionID + ", error = " + error.ToString() + ")");
}

void ServerButton()
{
byte error;
//Open the sockets for sending and receiving the messages on port 54321
m_ServerSocket = NetworkTransport.AddHost(m_HostTopology, 54321);
//Connect the "server"
NetworkTransport.Connect(m_ServerSocket, "127.0.0.1", 54321, 0, out erro
//Check for if there is an error
if ((NetworkError)error != NetworkError.Ok)
{
//Output this message in the console with the Network Error
Debug.Log("There was this error : " + (NetworkError)error);
}
//Otherwise if no errors occur, output this message to the console
else Debug.Log("Connected : " + (NetworkError)error);
}
}

Properties
Ok

The operation completed successfully.

WrongHost

The speci ed host not available.

WrongConnection

The speci ed connectionId doesn't exist.

WrongChannel

The speci ed channel doesn't exist.

NoResources

Not enough resources are available to process this request.

BadMessage

Not a data message.

Timeout

Connection timed out.

MessageToLong

The message is too long to t the bu er.

WrongOperation

Operation is not supported.

VersionMismatch

The protocol versions are not compatible. Check your library versions.

CRCMismatch

The Networking.ConnectionCon g does not match the other endpoint.

DNSFailure

The address supplied to connect to was invalid or could not be resolved.

UsageError

This error will occur if any function is called with inappropriate parameter values.

Leave feedback

Description
Event that is returned when calling the Networking.NetworkTransport.Receive and
Networking.NetworkTransport.ReceiveFromHost functions.

Properties
DataEvent

Data event received. Indicating that data was received.

ConnectEvent

Connection event received. Indicating that a new connection was established.

DisconnectEvent

Disconnection event received.

Nothing

No new event was received.

BroadcastEvent

Broadcast discovery event received. To obtain sender connection info and possible
complimentary message from them, call
Networking.NetworkTransport.GetBroadcastConnectionInfo() and
Networking.NetworkTransport.GetBroadcastConnectionMessage() functions.

Leave feedback

Description
Enumeration of methods of where to spawn player objects in multiplayer games.

using UnityEngine;
using UnityEngine.Networking;

public class PlayerSpawnMethodExample : MonoBehaviour
{
void Update()
{
//Press the space key to switch to spawning on a random spawn point
if (Input.GetKeyDown(KeyCode.Space))
{
//Check that the PlayerSpawnMethod is currently RoundRobin
if (NetworkManager.singleton.playerSpawnMethod == PlayerSpawnMethod.
//Switch it to Random spawning if it is
NetworkManager.singleton.playerSpawnMethod = PlayerSpawnMethod.R
//Otherwise switch it to RoundRobin
else NetworkManager.singleton.playerSpawnMethod = PlayerSpawnMethod.
}
}
}

Properties
Random

Spawn players at a randomly chosen starting position.

RoundRobin

Spawn players at the next start position.

Leave feedback

Description
Enumeration of all supported quality of service channel modes.

Properties
Unreliable

There is no guarantee of delivery or ordering.

UnreliableFragmented

There is no guarantee of delivery or ordering, but allowing fragmented
messages with up to 32 fragments per message.

UnreliableSequenced

There is no guarantee of delivery and all unordered messages will be
dropped. Example: VoIP.

Reliable

Each message is guaranteed to be delivered but not guaranteed to be in
order.

ReliableFragmented

Each message is guaranteed to be delivered, also allowing fragmented
messages with up to 32 fragments per message.

ReliableSequenced

Each message is guaranteed to be delivered and in order.

StateUpdate

An unreliable message. Only the last message in the send bu er is sent.
Only the most recent message in the receive bu er will be delivered.

ReliableStateUpdate

A reliable message. Note: Only the last message in the send bu er is sent.
Only the most recent message in the receive bu er will be delivered.

AllCostDelivery

A reliable message that will be re-sent with a high frequency until it is
acknowledged.

UnreliableFragmentedSequenced

There is garantee of ordering, no guarantee of delivery, but allowing
fragmented messages with up to 32 fragments per message.

ReliableFragmentedSequenced

Each message is guaranteed to be delivered in order, also allowing
fragmented messages with up to 32 fragments per message.

Leave feedback

Description
De ne how unet will handle network io operation.

Properties
SelectReactor

Network thread will sleep up to threadawake timeout, or up to receive event on socket
will happened. Awaked thread will try to read up to maxpoolsize packets from socket and
will try update connections ready to send (with xing awaketimeout rate).

FixRateReactor

Network thread will sleep up to threadawake timeout, after that it will try receive up to
maxpoolsize amount of messages and then will try perform send operation for
connection whihc ready to send.

Leave feedback

Description
Enumeration of Networking versions.

Properties
Current

The current UNET version.

Leave feedback
Obsolete

Description
A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run
on clients.
A [Client] method returns immediately if NetworkClient.active is not true, and generates a warning on the
console. This attribute can be put on member functions that are meant to be only called on clients. This would
redundant for [ClientRPC] functions, as being client-only is already enforced for them.

using UnityEngine;
using UnityEngine.Networking;

public class Example : MonoBehaviour
{
[Client]
public void OnClientDisconnected(NetworkConnection conn, NetworkReader reade
{
Debug.Log("Client Disconnected");
//ShutdownGame();
Application.LoadLevel("title");
}
}

Leave feedback
Obsolete

Description
A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run
on clients, but not generate warnings.
This custom attribute is the same as the Client custom attribute, except that it does not generate a warning in the
console if called on a server. This is useful to avoid spamming the console for functions that will be invoked by the
engine, such as Update() or physics callbacks.

using UnityEngine;
using UnityEngine.Networking;

public class Example : MonoBehaviour
{
[ClientCallback]
void OnTriggerEnter2D(Collider2D collider)
{
// make explosion
}
}

This will make the explosion code only run when the trigger is hit on the client.

Leave feedback
Obsolete

Description
This is an attribute that can be put on methods of NetworkBehaviour classes to allow them to be invoked on
clients from a server.
[ClientRPC] functions are called by code on Unity Multiplayer servers, and then invoked on corresponding
GameObjects on clients connected to the server. The arguments to the RPC call are serialized across the network,
so that the client function is invoked with the same values as the function on the server. These functions must
begin with the pre x "Rpc" and cannot be static.

using UnityEngine;
using UnityEngine.Networking;

public class Example : NetworkBehaviour
{
int counter;
[ClientRpc]
public void RpcDoMagic(int extra)
{
Debug.Log("Magic = " + (123 + extra));
}

void Update()
{
counter += 1;

if (counter % 100 == 0 && NetworkServer.active)
{
RpcDoMagic(counter);
}
}
}

The allowed argument types are;
• Basic type (byte, int, oat, string, UInt64, etc)
• Built-in Unity math type (Vector3, Quaternion, etc),
• Arrays of basic types

• Structs containing allowable types
• NetworkIdentity
• NetworkInstanceId
• NetworkHash128
• GameObject with a NetworkIdentity component attached.

Leave feedback
Obsolete

Description
This is an attribute that can be put on methods of NetworkBehaviour classes to allow them to be invoked on the
server by sending a command from a client.
[Command] functions are invoked on the player GameObject associated with a connection. This is set up in
response to the "ready" message, by passing the player GameObject to the NetworkServer.PlayerIsReady()
function. The arguments to the command call are serialized across the network, so that the server function is
invoked with the same values as the function on the client. These functions must begin with the pre x "Cmd" and
cannot be static.

using UnityEngine;
using UnityEngine.Networking;

public class Player : NetworkBehaviour
{
int moveX = 0;
int moveY = 0;
float moveSpeed = 0.2f;
bool isDirty = false;

void Update()
{
if (!isLocalPlayer)
{
return;
}

// input handling for local player only
int oldMoveX = moveX;
int oldMoveY = moveY;

moveX = 0;
moveY = 0;

if (Input.GetKey(KeyCode.LeftArrow))

{
moveX -= 1;
}
if (Input.GetKey(KeyCode.RightArrow))
{
moveX += 1;
}
if (Input.GetKey(KeyCode.UpArrow))
{
moveY += 1;
}
if (Input.GetKey(KeyCode.DownArrow))
{
moveY -= 1;
}
if (moveX != oldMoveX || moveY != oldMoveY)
{
CmdMove(moveX, moveY);
}
}

[Command]
public void
{
moveX =
moveY =
isDirty
}

CmdMove(int x, int y)
x;
y;
= true;

public void FixedUpdate()
{
if (NetworkServer.active)
{
transform.Translate(moveX * moveSpeed, moveY * moveSpeed, 0);
}
}
}

The allowed argument types are;
• Basic type (byte, int, oat, string, UInt64, etc)
• Built-in Unity math type (Vector3, Quaternion, etc),
• Arrays of basic types

• Structs containing allowable types
• NetworkIdentity
• NetworkInstanceId
• NetworkHash128
• GameObject with a NetworkIdentity component attached.

Leave feedback
Obsolete

Description
This attribute is used to con gure the network settings of scripts that are derived from the NetworkBehaviour
base class.

using UnityEngine.Networking;

[NetworkSettings(channel = 1, sendInterval = 0.2f)]
class MyScript : NetworkBehaviour
{
[SyncVar]
int value;
}

Leave feedback
Obsolete

Description
A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run
on servers.
A [Server] method returns immediately if NetworkServer.active is not true, and generates a warning on the
console. This attribute can be put on member functions that are meant to be only called on server. This would be
redundant for Command functions, as being server-only is already enforced for them.

using UnityEngine;
using UnityEngine.Networking;

public class Example : NetworkBehaviour
{
[Server]
public void Explode()
{
NetworkServer.Destroy(gameObject);
}
}

Leave feedback
Obsolete

Description
A Custom Attribute that can be added to member functions of NetworkBehaviour scripts, to make them only run
on servers, but not generate warnings.
This custom attribute is the same as the [Server] custom attribute, except that it does not generate a warning in
the console if called on a client. This is useful to avoid spamming the console for functions that will be invoked by
the engine, such as Update() or physics callbacks.

using UnityEngine;
using UnityEngine.Networking;

public class Example : MonoBehaviour
{
float regenTimer = 0;
int heat = 100;

[ServerCallback]
void Update()
{
// heat dissipates over time
if (Time.time > regenTimer)
{
if (heat > 1)
heat -= 2;

regenTimer = Time.time + 1.0f;
}
}
}

Leave feedback
Obsolete

Description
This is an attribute that can be put on events in NetworkBehaviour classes to allow them to be invoked on client
when the event is called on the server.
[SyncEvent] events are called by user code on UNET servers, and then invoked on corresponding client objects on
clients connected to the server. The arguments to the Event call are serialized across the network, so that the
client event is invoked with the same values as the function on the server. These events must begin with the
pre x "Event".

using UnityEngine;
using UnityEngine.Networking;

public class DamageClass : NetworkBehaviour
{
public delegate void TakeDamageDelegate(int amount, float dir);

[SyncEvent]
public event TakeDamageDelegate EventTakeDamage;

[Command]
public void CmdDoMe(int val)
{
EventTakeDamage(val, 1.0f);
}
}

public class Other : NetworkBehaviour
{
public DamageClass damager;
int health = 100;

void Start()
{
if (NetworkClient.active)
damager.EventTakeDamage += TakeDamage;
}

public void TakeDamage(int amount, float dir)
{
health -= amount;
}
}

SyncEvents allow networked actions to be propagated to other scripts attached to the object. In the example
above, the Other class registers for the TakeDamage event on the DamageClass. When the event happens on the
DamageClass on the server, the TakeDamage() method will be invoked on the Other class on the client object.
This allows modular network aware systems to be created, that can be extended by new scripts that respond to
the events generated by them.

Leave feedback
Obsolete

Description
[SyncVar] is an attribute that can be put on member variables of NetworkBehaviour classes. These variables will
have their values sychronized from the server to clients in the game that are in the ready state.
Setting the value of a [SyncVar] marks it as dirty, so it will be sent to clients at the end of the current frame. Only
simple values can be marked as [SyncVars]. The type of the SyncVar variable cannot be from an external DLL or
assembly.

using UnityEngine;
using UnityEngine.Networking;

public class Ship : NetworkBehaviour
{
[SyncVar]
public int health = 100;

[SyncVar]
public float energy = 100;
}

The allowed SyncVar types are;
• Basic type (byte, int, oat, string, UInt64, etc)
• Built-in Unity math type (Vector3, Quaternion, etc),
• Structs containing allowable types .

Leave feedback
Obsolete

Description
This is an attribute that can be put on methods of NetworkBehaviour classes to allow them to be invoked on
clients from a server. Unlike the ClientRpc attribute, these functions are invoked on one individual target client,
not all of the ready clients.
[TargetRpc] functions are called by user code on the server, and then invoked on the corresponding client object
on the client of the speci ed NetworkConnection. The arguments to the RPC call are serialized across the
network, so that the client function is invoked with the same values as the function on the server. These functions
must begin with the pre x "Target" and cannot be static.
The rst argument to an TargetRpc function must be a NetworkConnection object.

using UnityEngine;
using UnityEngine.Networking;

public class Example : NetworkBehaviour
{
[TargetRpc]
public void TargetDoMagic(NetworkConnection target, int extra)
{
Debug.Log("Magic = " + (123 + extra));
}

[Command]
void CmdTest()
{
TargetDoMagic(connectionToClient, 55);
}
}

The allowed argument types are;
• Basic type (byte, int, oat, string, UInt64, etc)
• Built-in Unity math type (Vector3, Quaternion, etc),
• Arrays of basic types
• Structs containing allowable types
• NetworkIdentity
• NetworkInstanceId

• NetworkHash128
• GameObject with a NetworkIdentity component attached.

Leave feedback

Description
Implements high-level utility methods to simplify use of the Playable API with Animations.

Static Methods
Play

Plays the Playable on the given Animator.

PlayAnimatorController

Creates a PlayableGraph to be played on the given Animator. An
AnimatorControllerPlayable is also created for the given
RuntimeAnimatorController.

PlayClip

Creates a PlayableGraph to be played on the given Animator. An
AnimationClipPlayable is also created for the given AnimationClip.

PlayLayerMixer

Creates a PlayableGraph to be played on the given Animator. An
AnimationLayerMixerPlayable is also created.

PlayMixer

Creates a PlayableGraph to be played on the given Animator. An
AnimationMixerPlayable is also created.

Leave feedback

Description
This structure contains the frame information a Playable receives in Playable.PrepareFrame.

Properties
deltaTime

Time di erence between this frame and the preceding frame.

e ectiveParentDelay

The accumulated delay of the parent Playable during the PlayableGraph traversal.

e ectiveParentSpeed

The accumulated speed of the parent Playable during the PlayableGraph traversal.

e ectiveSpeed

The accumulated speed of the Playable during the PlayableGraph traversal.

e ectiveWeight

The accumulated weight of the Playable during the PlayableGraph traversal.

evaluationType

Indicates the type of evaluation that caused PlayableGraph.PrepareFrame to be
called.

frameId

The current frame identi er.

output

The PlayableOutput that initiated this graph traversal.

seekOccurred

Indicates that the local time was explicitly set.

timeHeld

Indicates the local time did not advance because it has reached the duration and the
extrapolation mode is set to Hold.

timeLooped

Indicates the local time wrapped because it has reached the duration and the
extrapolation mode is set to Loop.

weight

The weight of the current Playable.

Leave feedback

Description
Describes the cause for the evaluation of a PlayableGraph.

Properties
Evaluate

Indicates the graph was updated due to a call to PlayableGraph.Evaluate.

Playback

Indicates the graph was called by the runtime during normal playback due to
PlayableGraph.Play being called.

Leave feedback
Implements interfaces:IPlayable

Description
Playables are customizable runtime objects that can be connected together and are contained in a PlayableGraph
to create complex behaviours.
Playables can be used to create complex and exible data evaluation trees. Playables are nodes that can be
connected together, after which each Playable can set the "weight" or "in uence" of each of its children.
The playables of the same graph are contained in a PlayableGraph. A PlayableGraph can have several outputs,
also called "players", which implement IPlayableOutput. The PlayableOutput takes the result of their source
playable and apply it to an object in the Scene. For instance, the AnimationPlayableOutput is linked to a playable
node in the graph (the "source playable") and to an Animator in the Scene. When the graph is played, the
animation pose resulting of the graph evaluation is applied by the Animator. There are as many PlayableOutputs
as there are di erent playable types: AnimationPlayableOutput, AudioPlayableOutput, TexturePlayableOutput,
ScriptPlayableOutput, etc...
The ScriptPlayable is a special kind of playable. It's main role is to be a "custom" playable. It is a templated
struct where T must derived from PlayableBehaviour. These custom PlayableBehaviours allow to write behaviours
at speci c moments in the graph evaluation (see PlayableBehaviour.PrepareFrame and
PlayableBehaviour.ProcessFrame). A good example of a ScriptPlayable is the TimelinePlayable which is controlling
the Timeline graph. It creates and links together the playables in charge of the tracks and the clips.
When a PlayableGraph is played, each PlayableOutput will be traversed. During this traversal, it will call the
PrepareFrame method on each Playable. This allows the Playable to "prepare itself for the next evaluation". It is
during the PrepareFrame stage that each Playable can modify its children (either by adding new inputs or by
removing some of them). This enables Playable to "spawn" new children branches in the Playable tree at runtime.
This means that Playable trees are not static structures. They can adapt and change over time.
Once the preparation is done, the PlayableOutputs are in charge of processing the result, that's why they are also
called "players". In the case of an AnimationPlayableOutput, the Animator is in charge of processing the graph.
And in the case of a ScriptPlayableOutput, PlayableBehaviour.ProcessFrame will be called on each ScriptPlayable.
Note: You can use the PlayableExtensions methods on any struct implementing IPlayable.
Note: The Manual has detailed documentation about the Playables API.

Static Properties
Null

Returns an invalid Playable.

Leave feedback
Implements interfaces:IPlayableAsset

Description
A base class for assets that can be used to instantiate a Playable at runtime.

Properties
duration

The playback duration in seconds of the instantiated Playable.

outputs

A description of the outputs of the instantiated Playable.

Public Methods
CreatePlayable

Implement this method to have your asset inject playables into the given graph.

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

CreateInstance

Creates an instance of a scriptable object.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Messages
Awake

This function is called when the ScriptableObject script is started.

OnDestroy

This function is called when the scriptable object will be destroyed.

OnDisable

This function is called when the scriptable object goes out of scope.

OnEnable

This function is called when the object is loaded.

Leave feedback
Implements interfaces:IPlayableBehaviour

Description
PlayableBehaviour is the base class from which every custom playable script derives.
A PlayableBehaviour can be used to add user-de ned behaviour to a PlayableGraph.
A PlayableBehaviour must be part of a branch of a PlayableGraph that is connected to an output to be active.
In the following example, two AnimationClip are controlled by two AnimationClipPlayable, which are blended by a
AnimationMixerPlayable. A custom BlenderPlayableBehaviour is modifying the inputs weigth of the
AnimationMixerPlayable every frame.

using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Playables;

public class BlenderPlayableBehaviour : PlayableBehaviour
{
public AnimationMixerPlayable mixerPlayable;

public override void PrepareFrame(Playable playable, FrameData info)
{
float blend = Mathf.PingPong((float)playable.GetTime(), 1.0f);

mixerPlayable.SetInputWeight(0, blend);
mixerPlayable.SetInputWeight(1, 1.0f - blend);

base.PrepareFrame(playable, info);
}
}

public class PlayableBehaviourSample : MonoBehaviour
{
PlayableGraph m_Graph;
public AnimationClip clipA;
public AnimationClip clipB;

// Use this for initialization
void Start()
{
// Create the PlayableGraph.
m_Graph = PlayableGraph.Create();

// Add an AnimationPlayableOutput to the graph.
var animOutput = AnimationPlayableOutput.Create(m_Graph, "AnimationOutpu

// Add an AnimationMixerPlayable to the graph.
var mixerPlayable = AnimationMixerPlayable.Create(m_Graph, 2, false);

// Add two AnimationClipPlayable to the graph.
var clipPlayableA = AnimationClipPlayable.Create(m_Graph, clipA);
var clipPlayableB = AnimationClipPlayable.Create(m_Graph, clipB);

// Add a custom PlayableBehaviour to the graph.
// This behavior will change the weights of the mixer dynamically.
var blenderPlayable = ScriptPlayable.Create(m_
blenderPlayable.GetBehaviour().mixerPlayable = mixerPlayable;

// Create the topology, connect the AnimationClipPlayable to the
// AnimationMixerPlayable. Also add the BlenderPlayableBehaviour.
m_Graph.Connect(clipPlayableA, 0, mixerPlayable, 0);
m_Graph.Connect(clipPlayableB, 0, mixerPlayable, 1);
m_Graph.Connect(mixerPlayable, 0, blenderPlayable, 0);

// Use the ScriptPlayable as the source for the AnimationPlayableOutput.
// Since it's a ScriptPlayable, also set the source input port to make t
// passthrough to the AnimationMixerPlayable.
animOutput.SetSourcePlayable(blenderPlayable);
animOutput.SetSourceInputPort(0);

// Play the graph.
m_Graph.Play();
}

private void OnDestroy()
{
// Destroy the graph once done with it.
m_Graph.Destroy();
}
}

Public Methods
OnBehaviourDelay

This function is called when the Playable play state is changed to PlayState.Delayed.

OnBehaviourPause

This function is called when the Playable play state is changed to PlayState.Paused.

OnBehaviourPlay

This function is called when the Playable play state is changed to PlayState.Playing.

OnGraphStart

This function is called when the PlayableGraph that owns this PlayableBehaviour starts.

OnGraphStop

This function is called when the PlayableGraph that owns this PlayableBehaviour stops.

OnPlayableCreate

This function is called when the Playable that owns the PlayableBehaviour is created.

OnPlayableDestroy

This function is called when the Playable that owns the PlayableBehaviour is destroyed.

PrepareData

This function is called during the PrepareData phase of the PlayableGraph.

PrepareFrame

This function is called during the PrepareFrame phase of the PlayableGraph.

ProcessFrame

This function is called during the ProcessFrame phase of the PlayableGraph.

Leave feedback

Description
Struct that holds information regarding an output of a PlayableAsset.
PlayableAssets specify the type of outputs it supports using PlayableBindings.
Do not create PlayableBinding objects directly. Use the provided built-in methods to create the corresponding
PlayableOutput. For example, to create a PlayableBinding for an AnimationPlayableOutput, use
AnimationPlayableBinding.Create. To create a PlayableBinding for a ScriptPlayableOutput, use
ScriptPlayableBinding.Create.

Static Properties
DefaultDuration

The default duration used when a PlayableOutput has no xed duration.

None

A constant to represent a PlayableAsset has no bindings.

Properties
outputTargetType

The type of target required by the PlayableOutput for this PlayableBinding.

sourceObject

A reference to a UnityEngine.Object that acts a key for this binding.

streamName

The name of the output or input stream.

Leave feedback
Implements interfaces:IExposedPropertyTable

Description
Instantiates a PlayableAsset and controls playback of Playable objects.

Properties
duration

The duration of the Playable in seconds.

extrapolationMode

Controls how the time is incremented when it goes beyond the duration of the playable.

initialTime

The time at which the Playable should start when rst played.

playableAsset

The PlayableAsset that is used to instantiate a playable for playback.

playableGraph

The PlayableGraph created by the PlayableDirector.

playOnAwake

Whether the playable asset will start playing back as soon as the component awakes.

state

The current playing state of the component. (Read Only)

time

The component's current time. This value is incremented according to the
PlayableDirector.timeUpdateMode when it is playing. You can also change this value
manually.

timeUpdateMode

Controls how time is incremented when playing back.

Public Methods
ClearGenericBinding

Clears the binding of a reference object.

ClearReferenceValue

Clears an exposed reference value.

DeferredEvaluate

Tells the PlayableDirector to evaluate it's PlayableGraph on the next update.

Evaluate

Evaluates the currently playing Playable at the current time.

GetGenericBinding

Returns a binding to a reference object.

GetReferenceValue

Retreives an ExposedReference binding.

Pause

Pauses playback of the currently running playable.

Play

Instatiates a Playable using the provided PlayableAsset and starts playback.

RebindPlayableGraphOutputs

Rebinds each PlayableOutput of the PlayableGraph.

RebuildGraph

Discards the existing PlayableGraph and creates a new instance.

Resume

Resume playing a paused playable.

SetGenericBinding

Sets the binding of a reference object from a PlayableBinding.

SetReferenceValue

Sets an ExposedReference value.

Stop

Stops playback of the current Playable and destroys the corresponding graph.

Events
paused

Event that is raised when a PlayableDirector component has paused.

played

Event that is raised when a PlayableDirector component has begun playing.

stopped

Event that is raised when a PlayableDirector component has stopped.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
Extensions for all the types that implements IPlayable.
Extension methods are static methods that can be called as if they were instance methods on the extended type.

using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Playables;

public class ExamplePlayableBehaviour : PlayableBehaviour
{
void Start()
{
PlayableGraph graph = PlayableGraph.Create();
AnimationMixerPlayable mixer = AnimationMixerPlayable.Create(graph, 1);

// Calling method PlayableExtensions.SetDuration on AnimationMixerPlayab
mixer.SetDuration(10);

// The line above is the same as calling directly PlayableExtensions.Set
PlayableExtensions.SetDuration(mixer, 10);
}
}

Static Methods
AddInput

Create a new input port and connect it to the output port of the given Playable.

ConnectInput

Connect the output port of a Playable to one of the input ports.

Destroy

Destroys the current Playable.

DisconnectInput

Disconnect the input port of a Playable.

GetDelay

Returns the delay of the playable.

GetDuration

Returns the duration of the Playable.

GetGraph

Returns the PlayableGraph that owns this Playable. A Playable can only be used in the

graph that was used to create it.
GetInput

Returns the Playable connected at the given input port index.

GetInputCount

Returns the number of inputs supported by the Playable.

GetInputWeight

Returns the weight of the Playable connected at the given input port index.

GetLeadTime

Returns the Playable lead time in seconds.

GetOutput

Returns the Playable connected at the given output port index.

GetOutputCount

Returns the number of outputs supported by the Playable.

GetPlayState

Returns the current PlayState of the Playable.

GetPreviousTime

Returns the previous local time of the Playable.

GetPropagateSetTime

Returns the time propagation behavior of this Playable.

GetSpeed

Returns the speed multiplier that is applied to the the current Playable.

GetTime

Returns the current local time of the Playable.

GetTraversalMode

Returns the propagation mode for the multi-output playable.

IsDelayed

Returns whether or not the Playable has a delay.

IsDone

Returns a ag indicating that a playable has completed its operation.

IsNull

Returns true if the Playable is null, false otherwise.

IsValid

Returns the vality of the current Playable.

Pause

Tells to pause the Playable.

Play

Starts to play the Playable.

SetDelay

Set a delay until the playable starts.

SetDone

Changes a ag indicating that a playable has completed its operation.

SetDuration

Changes the duration of the Playable.

SetInputCount

Changes the number of inputs supported by the Playable.

SetInputWeight

Changes the weight of the Playable connected to the current Playable.

SetLeadTime

Sets the Playable lead time in seconds.

SetOutputCount

Changes the number of outputs supported by the Playable.

SetPropagateSetTime

Changes the time propagation behavior of this Playable.

SetSpeed

Changes the speed multiplier that is applied to the the current Playable.

SetTime

Changes the current local time of the Playable.

SetTraversalMode

Sets the propagation mode of PrepareFrame and ProcessFrame for the multi-output
playable.

Leave feedback

Description
Use the PlayableGraph to manage Playable creations and destructions.
The PlayableGraph is also the link to di erent systems, through structs that implement IPlayableOutput. For
example, AnimationPlayableOutput or AudioPlayableOutput.

Public Methods
Connect

Connects two Playable instances.

Destroy

Destroys the graph.

DestroyOutput

Destroys the PlayableOutput.

DestroyPlayable

Destroys the Playable.

DestroySubgraph

Destroys the Playable and all its inputs, recursively.

Disconnect

Disconnects the Playable. The connections determine the topology of the
PlayableGraph and how it is evaluated.

Evaluate

Evaluates all the PlayableOutputs in the graph, and updates all the connected
Playables in the graph.

GetEditorName

Returns the name of the PlayableGraph.

GetOutput

Get PlayableOutput at the given index in the graph.

GetOutputByType

Get PlayableOutput of the requested type at the given index in the graph.

GetOutputCount

Returns the number of PlayableOutput in the graph.

GetOutputCountByType

Get the number of PlayableOutput of the requested type in the graph.

GetPlayableCount

Returns the number of Playable owned by the Graph.

GetResolver

Returns the table used by the graph to resolve ExposedReferences.

GetRootPlayable

Returns the Playable with no output connections at the given index.

GetRootPlayableCount

Returns the number of Playable owned by the Graph that have no connected
outputs.

GetTimeUpdateMode

Returns how time is incremented when playing back.

IsDone

Indicates that a graph has completed its operations.

IsPlaying

Indicates that a graph is presently running.

IsValid

Returns true if the PlayableGraph has been properly constructed using
PlayableGraph.CreateGraph and is not deleted.

Play

Plays the graph.

SetResolver

Changes the table used by the graph to resolve ExposedReferences.

SetTimeUpdateMode

Changes how time is incremented when playing back.

Stop

Stops the graph, if it is playing.

Static Methods
Create

Creates a PlayableGraph.

Leave feedback
Implements interfaces:IPlayableOutput

Description
See: IPlayableOutput.

Static Properties
Null

Returns an invalid PlayableOutput.

Leave feedback

Description
Extensions for all the types that implements IPlayableOutput.
Extension methods are static methods that can be called as if they were instance methods on the extended type.

using UnityEngine;
using UnityEngine.Playables;

public class ExamplePlayableBehaviour : PlayableBehaviour
{
void Start()
{
PlayableGraph graph = PlayableGraph.Create();
ScriptPlayableOutput scriptOutput = ScriptPlayableOutput.Create(graph, "

// Calling method PlayableExtensions.SetWeight on ScriptPlayableOutput a
scriptOutput.SetWeight(10);

// The line above is the same as calling directly PlayableExtensions.Set
PlayableOutputExtensions.SetWeight(scriptOutput, 10);
}
}

Static Methods
AddNoti cationReceiver

Registers a new receiver that listens for noti cations.

GetNoti cationReceivers

Retrieves the list of noti cation receivers currently registered on the output.

GetSourceOutputPort

Returns the source playable's output connection index.

GetSourcePlayable

Returns the source playable.

GetUserData

Returns the opaque user data. This is the same value as the last last argument
of ProcessFrame.

GetWeight

Returns the weight of the connection from the PlayableOutput to the source
playable.

IsOutputNull

Returns true if the PlayableOutput is null, false otherwise.

IsOutputValid
PushNoti cation

Queues a noti cation to be sent through the Playable system.

RemoveNoti cationReceiver

Unregisters a receiver on the output.

SetReferenceObject

Sets the bound object to a new value. Used to associate an output to an object
(Track asset in case of Timeline).

SetSourceOutputPort

Sets the source playable's output connection index. For playables with multiple
outputs, this determines which sub-branch of the source playable generates
this output.

SetSourcePlayable

Sets which playable that computes the output and which sub-tree index.

SetUserData

Sets the opaque user data. This same data is passed as the last argument to
ProcessFrame.

SetWeight

Sets the weight of the connection from the PlayableOutput to the source
playable.

Leave feedback
Implements interfaces:IPlayable

Description
A IPlayable implementation that contains a PlayableBehaviour for the PlayableGraph. PlayableBehaviour can be
used to write custom Playable that implement their own PrepareFrame callback.
A branch of a PlayableGraph must be connected to an output to be evaluated.
NOTE: You can use PlayableExtensions methods with ScriptPlayable objects.

Leave feedback

Description
A PlayableBinding that contains information representing a ScriptingPlayableOutput.

Static Methods
Create

Creates a PlayableBinding that contains information representing a ScriptPlayableOutput.

Leave feedback
Implements interfaces:IPlayableOutput

Description
A IPlayableOutput implementation that contains a script output for the a PlayableGraph.
A branch of a PlayableGraph must be connected to an output to be evaluated.
NOTE: You can use PlayableOutputExtensions methods with ScriptPlayableOutput objects.

Static Properties
Null

Returns an invalid ScriptPlayableOutput.

Static Methods
Create

Creates a new ScriptPlayableOutput in the associated PlayableGraph.

Leave feedback

Description
Interface implemented by all C# Playable implementations.
NOTE: You can use PlayableExtensions methods with all objects that implement IPlayable.

Leave feedback

Description
Interface that permits a class to inject playables into a graph.

Properties
duration

Duration in seconds.

outputs

A description of the PlayableOutputs generated by this asset.

Public Methods
CreatePlayable

Implement this method to have your asset inject playables into the given graph.

Leave feedback

Description
Interface implemented by all C# Playable Behaviour implementations.

Leave feedback

Description
Interface implemented by all C# Playable output implementations.
NOTE: You can use PlayableOutputExtensions methods with all objects that implement IPlayableOutput.

Leave feedback
Obsolete

Description
Describes the type of information that ows in and out of a Playable. This also speci es that this Playable is
connectable to others of the same type.

Leave feedback

Description
De nes what time source is used to update a Director graph.

Properties
DSPClock

Update is based on DSP (Digital Sound Processing) clock. Use this for graphs that need
to be synchronized with Audio.

GameTime

Update is based on Time.time. Use this for graphs that need to be synchronized on
gameplay, and that need to be paused when the game is paused.

UnscaledGameTime

Update is based on Time.unscaledTime. Use this for graphs that need to be updated
even when gameplay is paused. Example: Menus transitions need to be updated even
when the game is paused.

Manual

Update mode is manual. You need to manually call PlayableGraph.Evaluate with your
own deltaTime. This can be useful for graphs that are completely disconnected from
the rest of the game. For example, localized bullet time.

Leave feedback

Description
Wrap mode for Playables.

Properties
Hold

Hold the last frame when the playable time reaches it's duration.

Loop

Loop back to zero time and continue playing.

None

Do not keep playing when the time reaches the duration.

Leave feedback

Description
Traversal mode for Playables.

Properties
Mix

Causes the Playable to prepare and process it's inputs when demanded by an output.

Passthrough

Causes the Playable to act as a passthrough for PrepareFrame and ProcessFrame. If the
PlayableOutput being processed is connected to the n-th input port of the Playable, the
Playable only propagates the n-th output port. Use this enum value in conjunction with
PlayableOutput SetSourceOutputPort.

Leave feedback

Description
Status of a Playable.

Properties
Paused

The Playable has been paused. Its local time will not advance.

Playing

The Playable is currently Playing.

Delayed

The Playable has been delayed, using PlayableExtensions.SetDelay. It will not start until
the delay is entirely consumed.

Leave feedback

Description
Custom CPU Pro ler label used for pro ling arbitrary code blocks.
Use CustomSampler to measure execution time of script code blocks. Produced information is displayed in the
CPU Pro ler and can be captured with Recorder.
Using CustomSampler is more e cient than using Pro ler.BeginSample to pro le your code. This is because
CustomSamplers that have been created in advance have very low Begin call overhead compared to
Pro ler.BeginSample.

using UnityEngine;
using UnityEngine.Profiling;

public class ExampleClass : MonoBehaviour
{
CustomSampler sampler;
void Start()
{
sampler = CustomSampler.Create("MyCustomSampler");
}

void Update()
{
sampler.Begin();
// do something that takes a lot of time
sampler.End();
}
}

CustomSampler.Begin is conditionally compiled away using ConditionalAttribute. Thus it will have zero overhead,
when it is deployed in non-Development Build.
See Also: Sampler, CustomSampler.Create, CustomSampler.Begin.

Public Methods
Begin

Begin pro ling a piece of code with a custom label de ned by this instance of
CustomSampler.

End

End pro ling a piece of code with a custom label.

Static Methods
Create

Creates a new CustomSampler for pro ling parts of your code.

Inherited Members
Properties
isValid

Returns true if Sampler is valid. (Read Only)

name

Sampler name. (Read Only)

Public Methods
GetRecorder

Returns Recorder associated with the Sampler.

Static Methods
Get

Returns Sampler object for the speci c CPU Pro ler label.

GetNames

Returns number and names of all registered Pro ler labels.

Leave feedback

Description
Controls the Pro ler from script.
You can add custom Pro ler sections in your scripts with Pro ler.BeginSample and Pro ler.EndSample.
On standalone platforms, you can save all pro ling information to a le, which allows you to inspect it later. To do
this, you must specify a Pro ler.logFile and set both Pro ler.enabled and Pro ler.enableBinaryLog to true.
Because use of the Pro ler negatively a ects the performance of your app, most of the Pro ler API functionality is
only available when "Development Build" is enabled. This means you must enable "Developer Build" if you want
to use pro ler API methods in your built app. Disabling "Development Build" makes your app run faster, but
prevents you from using most of the Pro ler API methods.
The exception to this are the Pro ler API methods relating to memory usage. Because Unity manages most of its
system memory at run-time, it can provide that information with no performance penalty, therefore those
methods are available even if "Development Build" is not enabled. This applies to all memory-related Pro ler API
methods except Pro ler.GetAllocatedMemoryForGraphicsDriver and Pro ler.GetRuntimeMemorySizeLong, since
they require extra pro ling data only available in development builds.

Static Properties
areaCount

The number of Pro ler Areas that you can pro le.

enableBinaryLog

Enables the logging of pro ling data to a le.

enabled

Enables the Pro ler.

logFile

Speci es the le to use when writing pro ling data.

maxUsedMemory

Sets the maximum amount of memory that Pro ler uses for bu ering data. This
property is expressed in bytes.

usedHeapSizeLong

Returns the number of bytes that Unity has allocated. This does not include bytes
allocated by external libraries or drivers.

Static Methods
AddFramesFromFile

Displays the recorded pro le data in the pro ler.

BeginSample

Begin pro ling a piece of code with a custom label.

BeginThreadPro ling

Enables pro ling on the thread from which you call this method.

EndSample

Ends the current pro ling sample.

EndThreadPro ling

Frees the internal resources used by the Pro ler for the thread.

GetAllocatedMemoryForGraphicsDriver

Returns the amount of allocated memory for the graphics driver, in
bytes.Only available in development players and editor.

GetAreaEnabled

Returns whether or not a given Pro lerArea is currently enabled.

GetMonoHeapSizeLong

Returns the size of the reserved space for managed-memory.

GetMonoUsedSizeLong

The allocated managed-memory for live objects and non-collected
objects.

GetRuntimeMemorySizeLong

Gathers the native-memory used by a Unity object.

GetTempAllocatorSize

Returns the size of the temp allocator.

GetTotalAllocatedMemoryLong

The total memory allocated by the internal allocators in Unity. Unity
reserves large pools of memory from the system. This function
returns the amount of used memory in those pools.

GetTotalReservedMemoryLong

The total memory Unity has reserved.

GetTotalUnusedReservedMemoryLong

Unity allocates memory in pools for usage when unity needs to
allocate memory. This function returns the amount of unused
memory in these pools.

SetAreaEnabled

Enable or disable a given Pro lerArea.

SetTempAllocatorRequestedSize

Sets the size of the temp allocator.

Leave feedback

Description
Records pro ling data produced by a speci c Sampler.
Recorder accumulates elapsed time of every Begin/End pair during a frame. Once enabled it sums delta time
between Begin and End samples produced by a Sampler. Use elapsedNanoseconds to get the accumulated time
for the previous frame.

using UnityEngine;
using UnityEngine.Profiling;

public class ExampleClass : MonoBehaviour
{
Recorder behaviourUpdateRecorder;
void Start()
{
behaviourUpdateRecorder = Recorder.Get("BehaviourUpdate");
behaviourUpdateRecorder.enabled = true;
}

void Update()
{
if (behaviourUpdateRecorder.isValid)
Debug.Log("BehaviourUpdate time: " + behaviourUpdateRecorder.elapsed
}
}

Note: A Recorder collects data regardless of the Pro ler state. When a Recorder is enabled, data is accumulated
every time its Sampler is hit. This information is equivalent to the one you can see in Hierarchy view in the Pro ler
Window.
At the moment Samplers are available only in the Editor and Development Players. Use Recorder.isValid to verify
if Recorder can collect the data.
Recorder supports only internal static Pro ler labels and labels generated by CustomSampler. Dynamic internal
labels produced by scripting method calls and labels produced by Pro ler.BeginSample are not supported.
See Also: Sampler, Recorder.isValid, Recorder.elapsedNanoseconds.

Properties

elapsedNanoseconds

Accumulated time of Begin/End pairs for the previous frame in nanoseconds. (Read
Only)

enabled

Enables recording.

isValid

Returns true if Recorder is valid and can collect data. (Read Only)

sampleBlockCount

Number of time Begin/End pairs was called during the previous frame. (Read Only)

Public Methods
CollectFromAllThreads

Con gures the recorder to collect samples from all threads.

FilterToCurrentThread

Con gures the recorder to only collect data from the current thread.

Static Methods
Get

Use this function to get a Recorder for the speci c Pro ler label.

Leave feedback

Description
Provides control over a CPU Pro ler label.
Sampler is a counter which produces timings information you can see in CPU Pro ler. Use this class to get
information about built-in or custom Pro ler label.
See Also: Sampler.Get, CustomSampler, CPU Usage Pro ler.

Properties
isValid

Returns true if Sampler is valid. (Read Only)

name

Sampler name. (Read Only)

Public Methods
GetRecorder

Returns Recorder associated with the Sampler.

Static Methods
Get

Returns Sampler object for the speci c CPU Pro ler label.

GetNames

Returns number and names of all registered Pro ler labels.

Leave feedback
Implements interfaces:IPurchasingModule

Description
Helper base class for IAP Modules.
In addition to providing helper methods, use of an abstract class such as this allows addition of
IPurchasingModule methods without breaking compatibility with existing plugins.

Public Methods
Con gure

Called when your module is loaded by Unity.

Protected Methods
BindCon guration

Bind a store-speci c con guration type to a concrete instance.

BindExtension

Bind a store-speci c extension type to a concrete instance.

RegisterStore

Register a store implementation along with its name.

Leave feedback
Implements interfaces:IStore

Description
Extension point for purchasing plugins.
An abstract class is provided so that methods can be added to the IStore without breaking binary compatibility
with existing plugins.
See Also: IStore.

Public Methods
FinishTransaction

Called when Unity IAP has nished processing a purchase.

Initialize

Called when Unity IAP is initializing.

Purchase

Called when a user wants to buy the speci ed Product.

RetrieveProducts

Fetch product metadata and purchase state for the set of ProductDe nitions.

Leave feedback

Description
A common format which store subsystems use to describe available products.
Includes purchase state via receipt and transactionId.

Properties
metadata

Localized metadata retrieved from the Store.

receipt

A purchase receipt, if owned. Otherwise null.

storeSpeci cId

The store-speci c ID.

transactionId

The purchase transaction ID, if owned. Otherwise null.

type

The ProductType.

Constructors
ProductDescription

Create a ProductDescription.

Leave feedback

Description
Represents a failed purchase as described by a purchasing service.
Is sent by a store implementation to IAP which forwards this message on to the user.
See Also: IStoreCallback.OnPurchaseFailed.

Properties
message

More information about the purchase failure from Unity IAP or the platform store, if
available.

productId

The store-speci c product ID which failed to purchase.

reason

The reason for the purchase failure.

Constructors
PurchaseFailureDescription

Creates a PurchaseFailureDescription.

Leave feedback

Description
ICatalogProvider can replace or add products to the product con guration at runtime.
When Purchasing is initialized, if the Con gurationBuilder has the useCatalogProvider property set to true, the
ICatalogProvider's FetchProducts method will be called before the initialization is completed.

Public Methods
FetchProducts

ProductDe nitions fetched by this method will add to or replace the set of
ProductDe nitions supplied in the Con gurationBuilder.

Leave feedback

Description
Con gures Unity IAP with one or more store implementations.
Passed into IPurchasingModules during Unity IAP initialization.
See Also: IPurchasingModule.

Public Methods
RegisterCon guration

Informs Unity IAP that extended Con guration is available.

RegisterExtension

Informs Unity IAP that a store extension is available.

RegisterStore

Informs Unity IAP that a store implementation exists, specifying its name.

SetCatalogProvider

Sets the active ICatalogProvider. Calling this method after Purchasing is initialized has
no e ect.

Leave feedback

Description
A Unity IAP con guration of one or more stores.
Store implementations must provide an implementation of this interface. Use IPurchasingModule
implementations with the ConfigurationBuilder to extend Unity IAP's store functionality.

using UnityEngine;

class MyPurchasingModule : IPurchasingModule
{
public void Configure(IPurchasingBinder binder)
{
binder.RegisterStore("MyManufacturerAppStore", InstantiateMyManufacturer
// Our Purchasing service implementation provides the real implementatio
binder.RegisterExtension(new FakeManufacturerEx
}

IStore InstantiateMyManufacturerAppStore()
{
// Check for Manufacturer. "Android" used here for the sake of example.
// In your implementation, return platform-appropriate store instead of
if (Application.platform == RuntimePlatform.Android) { return null; }
else { return null; }
}

IStoreExtension IManufacturerExtensions() { return null; }
}

See Also: AbstractPurchasingModule, IStore, IStoreExtension, Con gurationBuilder.

Public Methods
Con gure

Called when Unity IAP is loading your module. Register stores and associated extensions
using the IPurchasingBinder.

Leave feedback

Description
The public interface of an underlying store system (e.g. Google Play or Apple App Store) typically exposed to Unity
IAP extending its in-app purchasing platform support.
Unity IAP is extensible, supporting registration of store systems through IPurchasingModule implementations
shared with Unity IAP via a ConfigurationBuilder during initialization.
A sample store class:

using
using
using
using
using

System;
System.Collections.ObjectModel;
System.Collections.Generic;
UnityEngine.Purchasing;
UnityEngine.Purchasing.Extension;

// Purchases always succeed at the sample store
internal class SampleStore : IStore
{
public const string Name = "samplestore";
private IStoreCallback m_Biller;
private List m_PurchasedProducts = new List();

public void Initialize(IStoreCallback biller)
{
m_Biller = biller;
}

public void RetrieveProducts(ReadOnlyCollection productDe
{
var products = new List();
foreach (var product in productDefinitions)
{
var metadata = new ProductMetadata("$123.45", "Fake title for " + pr
products.Add(new ProductDescription(product.storeSpecificId, metadat
}
m_Biller.OnProductsRetrieved(products);
}

public void Purchase(ProductDefinition product, string developerPayload)
{
// Keep track of non consumables.
if (product.type != ProductType.Consumable)
{
m_PurchasedProducts.Add(product.storeSpecificId);
}
m_Biller.OnPurchaseSucceeded(product.storeSpecificId, "{ \"this\" : \"is
}

public void FinishTransaction(ProductDefinition product, string transactionI
{
}
}

See Also: AbstractStore, UnityPurchasing.Initialize, IPurchasingModule, Con gurationBuilder.

Public Methods
FinishTransaction

Called by Unity IAP when a transaction has been recorded.

Initialize

Initialize the store.

Purchase

Handle a purchase request from a user.

RetrieveProducts

Fetch the latest product metadata, including purchase receipts, asynchronously with
results returned via IStoreCallback.

Leave feedback

Description
Callback used by store implementations to interact with Unity IAP.

Properties
products

Gets the item with local identi er.

useTransactionLog

Toggle use of Unity IAP's transaction log.

Public Methods
OnProductsRetrieved

Complete setup by providing a list of available products, complete with metadata
and any associated purchase receipts and transaction IDs.

OnPurchaseFailed

Call to indicate to Unity IAP that a purchase failed.

OnPurchaseSucceeded

Inform Unity IAP of a purchase.

OnSetupFailed

Indicate that IAP is unavailable for a speci c reason, such as IAP being disabled in
device settings.

Leave feedback

Description
Common interface for all extended con guration of stores.
Use during Unity IAP con guration by IPurchasingModule before initialization. Bound to store during
IPurchasingModule con guration via ConfigurationBuilder.
Sample store con guration interface (needing implementation), to be instantiated by the time the owning
purchasing module is requested to con gure its stores:

using UnityEngine.Purchasing.Extension;

// Sample store config. Implementation can be used by the user,
// and accessed by the owning purchasing module during store
// instantiation.
public interface ISampleConfiguration : IStoreConfiguration
{
// Request access to sample debugging backend
bool useSampleStoreDebuggingBackend { get; set; }
}

See Also: IPurchasingModule, Con gurationBuilder.

Leave feedback

Description
Builds con gurations for Unity IAP.
Collects products and store-speci c con guration details.
See Also: UnityPurchasing.Initialize.

Properties
products

The products built so far.

useCatalogProvider

If this property is set to true, Purchasing will use the supplied ICatalogProvider to
augment the supplied set of products during initialization.

Public Methods
AddProduct

Add a product with a Unity IAP ID, type and optional set of store-speci c IDs.

AddProducts

Add a collection of ProductDe nitions.

Con gure

Access store-speci c Con guration settings.

Static Methods
Instance

Get an instance of Con gurationBuilder.

Leave feedback

Description
Maps store-speci c product identi ers to one or more store names.
See Also: Con gurationBuilder.AddProduct.

Constructors
IDs

Create a new mapping of store identi ers to store names.

Public Methods
Add

Add a product ID which is supported by a list of store platform names.

GetEnumerator

Enumerator for IDs.

Leave feedback

Description
De nes a reward that is paid to the player when an in-app purchase product is purchased.

Static Properties
MaxDataLength

Represents the maximum allowed length for the data eld on a PayoutDe nition.

MaxSubtypeLength

Represents the maximum allowed length for the subtype eld on a PayoutDe nition.

Properties
data

A eld for user-speci ed data.

quantity

The quantity of this payout.

subtype

The subtype of this payout.

type

The type of this payout.

typeString

A string representation of the type of this payout.

Constructors
PayoutDe nition

Create a PayoutDe nition and de ne the values for the type, subtype, quantity, and data
elds.

Leave feedback

Description
Represents a product that may be purchased as an In-App Purchase.
Here is an example of a sample Store class working with a Product references.

using System;
using UnityEngine;
using UnityEngine.Purchasing;

public class MyStoreClass : MonoBehaviour, IStoreListener
{
static string kProductID100Currency = "virtualcurrency_100";
IStoreController m_StoreController;
void Awake()
{
ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPur
builder.AddProduct(kProductID100Currency, ProductType.Consumable);
UnityPurchasing.Initialize(this, builder);
}

public void PurchaseCurrency()
{
if (m_StoreController != null)
{
// Fetch the currency Product reference from Unity Purchasing
Product product = m_StoreController.products.WithID(kProductID100Cur
if (product != null && product.availableToPurchase)
{
m_StoreController.InitiatePurchase(product);
}
}
}

public void OnInitialized(IStoreController controller, IExtensionProvider ex
{
m_StoreController = controller;
}

public void OnInitializeFailed(InitializationFailureReason error) {}
public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
{
if (String.Equals(e.purchasedProduct.definition.id, kProductID100Currenc
{
Debug.Log("Purchased 100 coins");
}
return PurchaseProcessingResult.Complete;
}

public void OnPurchaseFailed(Product item, PurchaseFailureReason r) {}
}

Properties
availableToPurchase

Determine if this product is available to purchase according to the store subsystem.

de nition

Fundamental immutable product properties.

hasReceipt

Owned Non Consumables and Subscriptions should always have receipts.

metadata

Localized metadata provided by the store system.

receipt

The purchase receipt for this product, if owned. Otherwise null.

transactionID

A unique identi er for this product's transaction, if available. Otherwise null.

Public Methods
Equals

Equality de ned for use in collections.

GetHashCode

GetHashCode de ned for use in collections.

Leave feedback

Description
Provides helper methods to retrieve products by ID.
Supports retrieving by both store-independent and store-speci c product ID. Retrieves products registered with
Unity IAP.

Properties
all

All products.

set

The set of products.

Public Methods
WithID

Get the product with store-independent Unity IAP ID.

WithStoreSpeci cID

Get the product with the store-speci c ID.

Leave feedback

Description
Minimal product de nition, used by apps declaring products for sale.

Properties
enabled

This ag indicates whether a product should be o ered for sale. It is controlled through
the cloud catalog dashboard.

id

Unity IAP product ID. Potentially independent of store IDs.

payout

Access the rst payout on this ProductDe nition. Returns null if there are no payouts
speci ed.

payouts

Access all payouts attached to this ProductDe nition.

storeSpeci cId

The ID this product has on a store.

type

The product type.

Constructors
ProductDe nition

Create a ProductDe nition with di erent Store-independent ID and Store-speci c ID. Use
this when you need to two IDs to be di erent.

Public Methods
Equals

Compares id properties. Requires obj be a ProductDe nition.

GetHashCode

Gets the application-domain-speci c hash code of id.

Leave feedback

Description
Localized information about a product, retrieved from a store.

Properties
isoCurrencyCode

Product currency in ISO 4217 format; e.g. GBP or USD.

localizedDescription

Localized product description as retrieved from the store subsystem; e.g. Apple or
Google.

localizedPrice

Decimal product price denominated in the currency indicated by isoCurrencySymbol.

localizedPriceString

Localized price string.

localizedTitle

Localized product title as retrieved from the store subsystem; e.g. Apple or Google.

Constructors
ProductMetadata

Create a ProductMetadata.

Leave feedback

Description
A purchase that succeeded, including the purchased product along with its purchase receipt.
See Also: IStoreListener.ProcessPurchase.

Properties
purchasedProduct

The Product that was purchased.

Leave feedback

Description
A purchase failed event containing diagnostic data.
Explains the purchase failure.

Properties
message

More information about the purchase failure, if available. Otherwise null.

purchasedProduct

The product that failed to purchase.

reason

The reason for the purchase failure.

Leave feedback

Description
Entry point for Applications using Unity IAP.
Class is available to compiler and runtime when Unity IAP is enabled in Editor's Services window.

Static Methods
ClearTransactionLog

Clears Unity IAP's internal transaction log.

Initialize

Initialize Unity IAP with the speci ed listener and con guration.

Leave feedback

Description
Provides access to store-speci c extended functionality.
Speci c extension's interface type can be associated with a speci c store type via instantiating
IPurchasingModule's IPurchasingBinder.
Sample extension:

using System;
using UnityEngine;
using UnityEngine.Purchasing;

// Extends an implementing store.
public interface ISampleExtension : IStoreExtension
{
// Implemented by associated store.
void RestoreTransactions(Action callback);
}

See Also: IStoreExtension, IPurchasingModule, IPurchasingBinder.

Public Methods
GetExtension

Get the store-speci c extension of speci ed type.

Leave feedback

Description
Used by Applications to control Unity IAP.
See Also: Product for an example usage.

Properties
products

Store products including metadata and purchase receipts.

Public Methods
Con rmPendingPurchase

Con rm a pending purchase.

FetchAdditionalProducts

This method may be used to fetch additional products for purchasing, or to
refresh metadata on existing products.

InitiatePurchase

Initiate a purchase for a speci c product.

Leave feedback

Description
Common interface for all purchasing extensions.

See Also: IExtensionProvider.

Leave feedback

Description
Noti es your Application of purchasing related events.
See Also: Product for an example implementation.

Public Methods
OnInitialized

Called when Unity IAP has retrieved all product metadata and is ready to make
purchases.

OnInitializeFailed

Note that Unity IAP will not call this method if the device is o ine, but continually
attempt initialization until online.

OnPurchaseFailed

Called when a purchase fails.

ProcessPurchase

Called when a purchase succeeds.

Leave feedback

Description
The various reasons Unity IAP initialization can fail.
See Also: IStoreListener.OnInitializeFailed.

Properties
PurchasingUnavailable

In-App Purchases disabled in device settings.

NoProductsAvailable

No products available for purchase.

AppNotKnown

The store reported the app as unknown.

Leave feedback

Description
Speci es the type of a PayoutDe nition.

Properties
Other

Use this for payouts that are not covered by the other values in the PayoutType enum.

Currency

Use this for payouts that grant currency to the player, such as gold or gems.

Resource

Use this for payouts that grant the player a resource like health or food.

Leave feedback

Description
Categories of purchasable product.
See Also: Con gurationBuilder.AddProduct, Con gurationBuilder.AddProducts, and ProductDe nition.type.

Properties
Consumable

Can be purchased repeatedly. Suitable for consumable products such as virtual
currencies.

NonConsumable

Can only be purchased once. Suitable for one-o purchases such as extra levels.

Subscription

Can be purchased repeatedly and restored. Durable but with a nite duration of validity.

Leave feedback

Description
The various reasons a purchase can fail.
See Also: IStoreListener.OnPurchaseFailed.

Properties
PurchasingUnavailable

The system purchasing feature is unavailable.

ExistingPurchasePending

A purchase was already in progress when a new purchase was requested.

ProductUnavailable

The product is not available to purchase on the store.

SignatureInvalid

Signature validation of the purchase's receipt failed.

UserCancelled

The user opted to cancel rather than proceed with the purchase.

PaymentDeclined

There was a problem with the payment.

DuplicateTransaction

A duplicate transaction error when the transaction has already been completed
successfully.

Unknown

A catch-all for unrecognized purchase problems.

Leave feedback

Description
Informs Unity IAP as to whether an Application has nished processing a purchase.
Use to complete or delay completion of acknowledging receipt of purchase.
See Also: IStoreListener.ProcessPurchase.

Properties
Complete

The application has nished processing the purchase.

Pending

The application has not nished processing the purchase, e.g. it is pushing it to a server
asynchronously.

Leave feedback

Description
Allows the asynchronous read back of GPU resources.
This class is used to copy resource data from the GPU to the CPU without any stall (GPU or CPU), but adds a few
frames of latency. See Also: AsyncGPUReadbackRequest.

Static Methods
Request

Triggers a request to asynchronously fetch the data from a GPU resource.

Leave feedback

Description
Represents an asynchronous request for a GPU resource.
Use AsyncGPUReadback.Request to retrieve an asynchronous request for a GPU resource. Pending requests are
automatically updated each frame. The result is accessible only for a single frame once is successfully ful lled and
this request is then disposed of in the following frame. Common uses for this are to query
AsyncGPUReadbackRequest.done each frame (or within a coroutine) and then call
AsyncGPUReadbackRequest.GetData if the AsyncGPUReadbackRequest.hasError is false. You don't have to
manage the request lifetime as this is managed internally. A request that has been disposed of will result in the
AsyncGPUReadbackRequest.hasError property being true. See Also:AsyncGPUReadback.

Properties
depth

When reading data from a ComputeBu er, depth is 1, otherwise, the property takes the
value of the requested depth from the texture.

done

Checks whether the request has been processed.

hasError

This property is true if the request has encountered an error.

height

When reading data from a ComputeBu er, height is 1, otherwise, the property takes the
value of the requested height from the texture.

layerCount

Number of layers in the current request.

layerDataSize

The size in bytes of one layer of the readback data.

width

The width of the requested GPU data.

Public Methods
GetData

Fetches the data of a successful request.

Update

Triggers an update of the request.

WaitForCompletion

Waits for completion of the request.

Leave feedback

Description
List of graphics commands to execute.
Command bu ers hold list of rendering commands ("set render target, draw mesh, ..."). They can be set to
execute at various points during camera rendering (see Camera.AddCommandBu er), light rendering (see
Light.AddCommandBu er) or be executed immediately (see Graphics.ExecuteCommandBu er).
Typically they would be used to extend Unity's rendering pipeline in some custom ways. For example, you could
render some additional objects into deferred rendering g-bu er after all regular objects are done, or do custom
processing of light shadow maps. See command bu ers overview page for more details.
Command bu ers can be created and then executed many times if needed.
See Also: Camera.AddCommandBu er, Light.AddCommandBu er, CameraEvent, LightEvent,
Graphics.ExecuteCommandBu er, command bu ers overview.

Properties
name

Name of this command bu er.

sizeInBytes

Size of this command bu er in bytes (Read Only).

Constructors
CommandBu er

Create a new empty command bu er.

Public Methods
BeginSample

Adds a command to begin pro le sampling.

Blit

Add a "blit into a render texture" command.

Clear

Clear all commands in the bu er.

ClearRandomWriteTargets

Clear random write targets for Shader Model 4.5 level pixel shaders.

ClearRenderTarget

Adds a "clear render target" command.

ConvertTexture

Converts and copies a source texture to a destination texture with a
di erent format or dimensions.

CopyCounterValue

Adds a command to copy ComputeBu er counter value.

CopyTexture

Adds a command to copy a texture into another texture.

CreateGPUFence

Creates a GPUFence which will be passed after the last Blit, Clear,
Draw, Dispatch or Texture Copy command prior to this call has been
completed on the GPU.

DisableScissorRect

Add a command to disable the hardware scissor rectangle.

DisableShaderKeyword

Adds a command to disable global shader keyword.

DispatchCompute

Add a command to execute a ComputeShader.

DrawMesh

Add a "draw mesh" command.

DrawMeshInstanced

Add a "draw mesh with instancing" command.The command will not
immediately fail and throw an exception if Material.enableInstancing is
false, but it will log an error and skips rendering each time the
command is being executed if such a condition is
detected.InvalidOperationException will be thrown if the current
platform doesn't support this API (i.e. if GPU instancing is not
available). See SystemInfo.supportsInstancing.

DrawMeshInstancedIndirect

Add a "draw mesh with indirect instancing" command.

DrawProcedural

Add a "draw procedural geometry" command.

DrawProceduralIndirect

Add a "draw procedural geometry" command.

DrawRenderer

Add a "draw renderer" command.

EnableScissorRect

Add a command to enable the hardware scissor rectangle.

EnableShaderKeyword

Adds a command to enable global shader keyword.

EndSample

Adds a command to begin pro le sampling.

GenerateMips

Generate mipmap levels of a render texture.

GetTemporaryRT

Add a "get a temporary render texture" command.

GetTemporaryRTArray

Add a "get a temporary render texture array" command.

IssuePluginCustomBlit

Send a user-de ned blit event to a native code plugin.

IssuePluginCustomTextureUpdateV2

Send a texture update event to a native code plugin.

IssuePluginEvent

Send a user-de ned event to a native code plugin.

IssuePluginEventAndData

Send a user-de ned event to a native code plugin with custom data.

ReleaseTemporaryRT

Add a "release a temporary render texture" command.

RequestAsyncReadback

Adds an asynchonous GPU readback request command to the
command bu er.

ResolveAntiAliasedSurface

Force an antialiased render texture to be resolved.

SetComputeBu erParam

Adds a command to set an input or output bu er parameter on a
ComputeShader.

SetComputeFloatParam

Adds a command to set a oat parameter on a ComputeShader.

SetComputeFloatParams

Adds a command to set multiple consecutive oat parameters on a
ComputeShader.

SetComputeIntParam

Adds a command to set an integer parameter on a ComputeShader.

SetComputeIntParams

Adds a command to set multiple consecutive integer parameters on a
ComputeShader.

SetComputeMatrixArrayParam

Adds a command to set a matrix array parameter on a
ComputeShader.

SetComputeMatrixParam

Adds a command to set a matrix parameter on a ComputeShader.

SetComputeTextureParam

Adds a command to set a texture parameter on a ComputeShader.

SetComputeVectorArrayParam

Adds a command to set a vector array parameter on a
ComputeShader.

SetComputeVectorParam

Adds a command to set a vector parameter on a ComputeShader.

SetGlobalBu er

Add a "set global shader bu er property" command.

SetGlobalColor

Add a "set global shader color property" command.

SetGlobalDepthBias

Add a command to set global depth bias.

SetGlobalFloat

Add a "set global shader oat property" command.

SetGlobalFloatArray

Add a "set global shader oat array property" command.

SetGlobalInt

Sets the given global integer property for all shaders.

SetGlobalMatrix

Add a "set global shader matrix property" command.

SetGlobalMatrixArray

Add a "set global shader matrix array property" command.

SetGlobalTexture

Add a "set global shader texture property" command, referencing a
RenderTexture.

SetGlobalVector

Add a "set global shader vector property" command.

SetGlobalVectorArray

Add a "set global shader vector array property" command.

SetInvertCulling

Add a "set invert culling" command to the bu er.

SetProjectionMatrix

Add a command to set the projection matrix.

SetRandomWriteTarget

Set random write target for Shader Model 4.5 level pixel shaders.

SetRenderTarget

Add a "set active render target" command.

SetShadowSamplingMode

Add a "set shadow sampling mode" command.

SetViewMatrix

Add a command to set the view matrix.

SetViewport

Add a command to set the rendering viewport.

SetViewProjectionMatrices

Add a command to set the view and projection matrices.

WaitOnGPUFence

Instructs the GPU to wait until the given GPUFence is passed.

Leave feedback

Description
Used to manage synchronisation between tasks on async compute queues and the graphics queue.
Not all platforms support GPU fences. See SystemInfo.supportsGPUFence.
A GPUFence represents a point during GPU processing after a speci c compute shader dispatch or draw call has
completed. It can be used to achieve synchronisation between tasks running on the async compute queues or the
graphics queue by having one or more queues wait until a given fence has passed. This is an important
consideration when working with async compute as which tasks are running at the same time on the graphics
queue and the async compute queues is key to improving GPU performance.
GPUFence's do not need to be used to synchronise where one GPU task is writing to a resource that will be read
as an input by another. These resource dependencies are automatically handled by Unity.
GPUFences should be created via Graphics.CreateGPUFence or CommandBu er.CreateGPUFence attempting to
use a GPUFence that has not been created via one of these functions will result in an exception.
It is possible to create circular dependencies using GPUFences that, if executed, would deadlock the GPU. Unity
will detect such circular dependencies in the Editor and raise exceptions if any exist after calls to
Graphics.CreateGPUFence, Graphics.WaitOnGPUFence, Graphics.ExecuteCommandBu er,
Graphics.ExecuteCommandBu erAsync, ScriptableRenderContext.ExecuteCommandBu er,
ScriptableRenderContext.ExecuteCommandBu erAsync.
See Also: SystemInfo.supportsGPUFence, Graphics.CreateGPUFence, Graphics.WaitOnGPUFence,
CommandBu er.CreateGPUFence, CommandBu er.WaitOnGPUFence, Graphics.ExecuteCommandBu er,
Graphics.ExecuteCommandBu erAsync, ScriptableRenderContext.ExecuteCommandBu er,
ScriptableRenderContext.ExecuteCommandBu erAsync.

Properties
passed

Has the GPUFence passed?Allows for CPU determination of whether the GPU has passed
the point in its processing represented by the GPUFence.

Leave feedback

Description
Script interface for Graphics Settings.

Static Properties
lightsUseColorTemperature

Whether to use a Light's color temperature when calculating the nal
color of that Light."

lightsUseLinearIntensity

If this is true, Light intensity is multiplied against linear color values. If
it is false, gamma color values are used.

renderPipelineAsset

The RenderPipelineAsset that describes how the Scene should be
rendered.

transparencySortAxis

An axis that describes the direction along which the distances of
objects are measured for the purpose of sorting.

transparencySortMode

Transparent object sorting mode.

useScriptableRenderPipelineBatching

Enable/Disable SRP batcher (experimental) at runtime.

Static Methods
GetCustomShader

Get custom shader used instead of a built-in shader.

GetShaderMode

Get built-in shader mode.

HasShaderDe ne

Returns true if shader de ne was set when compiling shaders for current GraphicsTier.

SetCustomShader

Set custom shader to use instead of a built-in shader.

SetShaderMode

Set built-in shader mode.

Inherited Members
Properties
hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators
bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
A collection of ShaderKeyword that represents a speci c platform variant.
See Also: ShaderKeyword, Rendering.ShaderKeywordSetUtility, Shader.EnableKeyword, Shader.EnableKeyword,
multiple variants.

Public Methods
Disable

Disable a speci c shader keyword.

Enable

Enable a speci c shader keyword.

IsEnabled

Check whether a speci c shader keyword is enabled.

Leave feedback

Description
Re ectionProbeBlendInfo contains information required for blending probes.
See Also: Renderer.re ectionProbeUsage.

Properties
probe

Re ection Probe used in blending.

weight

Speci es the weight used in the interpolation between two probes, value varies from 0.0
to 1.0.

Leave feedback

Description
Describes a render target with one or more color bu ers, a depth/stencil bu er and the associated load/storeactions that are applied when the render target is active.
This data structure is similiar to RenderTargetSetup, but relies on a RenderTargetIdenti er to ensure
compatability with CommandBu er.SetRenderTarget.
To render to a speci c mip-level, cubemap face or depth slice the RenderTargetIdenti er should be created
accordingly.
Note: the number of load- and store-actions speci ed for color bu ers must be equal to the number of color
bu ers.
See Also: CommandBu er.

Properties
colorLoadActions

Load actions for color bu ers.

colorRenderTargets

Color bu ers to use as render targets.

colorStoreActions

Store actions for color bu ers.

depthLoadAction

Load action for the depth/stencil bu er.

depthRenderTarget

Depth/stencil bu er to use as render target.

depthStoreAction

Store action for the depth/stencil bu er.

Constructors
RenderTargetBinding

Constructs RenderTargetBinding.

Leave feedback

Description
Identi es a RenderTexture for a CommandBu er.
Render textures can be identi ed in a number of ways, for example a RenderTexture object, or one of built-in
render textures (BuiltinRenderTextureType), or a temporary render texture with a name (that was created using
CommandBu er.GetTemporaryRT).
This struct serves as a way to identify them, and has implcit conversion operators so that in most cases you can
save some typing.
See Also: CommandBu er.

Constructors
RenderTargetIdenti er

Creates a render target identi er.

Leave feedback

Description
Identi er of a speci c code path in a shader.
See Also: ShaderKeywordSet, Rendering.ShaderKeywordSetUtility, Shader.EnableKeyword, multiple variants.

Constructors
ShaderKeyword

Initializes a new instance of the ShaderKeyword class from a shader keyword name.

Public Methods
GetKeywordName

Returns the string name of the keyword.

GetKeywordType

Returns the keyword kind: built-in or user de ned.

IsValid

Returns true if the keyword has been imported by Unity.

Leave feedback

Description
A collection of ShaderKeyword that represents a speci c shader variant.
See Also: ShaderKeyword, Rendering.ShaderKeywordSetUtility, Shader.EnableKeyword, Shader.EnableKeyword,
multiple variants.

Public Methods
Disable

Disable a speci c shader keyword.

Enable

Enable a speci c shader keyword.

GetShaderKeywords

Return an array with all the enabled keywords in the ShaderKeywordSet.

IsEnabled

Check whether a speci c shader keyword is enabled.

Leave feedback

Description
Adding a SortingGroup component to a GameObject will ensure that all Renderers within the GameObject's
descendants will be sorted and rendered together.
A common use case for having a SortingGroup is to create complex 2D characters that are made up of multiple
SpriteRenderers. When several clones of such a character overlap, their individual body parts might not be sorted
properly resulting in a visual glitch where the the body parts interleave. For example, the hands of two characters
might be sorted in front of their bodies, where you would expect one entire character to be drawn in front of the
other character. The SortingGroup component solves this by ensuring the entire branch of the character are
sorted and rendered together.
The descendants of the SortingGroup are sorted using the same SortingLayer and Renderer.sortingOrder.
However, they are only sorted against other descendants of the SortingGroup and not with any renderers outside
of it. This allows you to reuse the same SortingLayers (for example, "Hands", "Torso"...) to sort body parts while
ensuring they never interleave with other clones of the character.
The SortingGroups, together with other renderers, are sorted using the SortingLayer and Renderer.sortingOrder.
Additionally, they can be nested within other SortingGroups. This is useful if you have branches of descendants
that should not be mixed up i.e. the "Left Hand" vs the "Right Hand" hierarchy branches.

.

Properties
sortingLayerID

Unique ID of the Renderer's sorting layer.

sortingLayerName

Name of the Renderer's sorting layer.

sortingOrder

Renderer's order within a sorting layer.

Inherited Members
Properties
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

isActiveAndEnabled

Has the Behaviour had active and enabled called?

gameObject

The game object this component is attached to. A component is always attached to a
game object.

tag

The tag of this game object.

transform

The Transform attached to this GameObject.

hideFlags

Should the object be hidden, saved with the Scene or modi able by the user?

name

The name of the object.

Public Methods
BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game
object or any of its children.

CompareTag

Is this game object tagged with tag ?

GetComponent

Returns the component of Type type if the game object has one attached, null if
it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children
using depth rst search.

GetComponentInParent

Returns the component of Type type in the GameObject or any of its parents.

GetComponents

Returns all components of Type type in the GameObject.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponentsInParent

Returns all components of Type type in the GameObject or any of its parents.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game
object.

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game
object and on every ancestor of the behaviour.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the GameObject.

Static Methods
Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. You are strongly recommended to use Destroy
instead.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new Scene.

FindObjectOfType

Returns the rst active loaded object of Type type.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

Instantiate

Clones the object original and returns the clone.

Operators

bool

Does the object exist?

operator !=

Compares if two objects refer to a di erent object.

operator ==

Compares two object references to see if they refer to the same object.

Leave feedback

Description
Spherical harmonics up to the second order (3 bands, 9 coe cients).
Spherical harmonics (SH) represent a function or signal over directions, and are commonly used in computer
graphics to e ciently evaluate smooth lighting. Unity uses them for Light