Class InputActionAssetReference
Base class for wrappers generated by the input asset importer.
Inheritance
System.Object
InputActionAssetReference
Namespace: UnityEngine.Experimental.Input
Syntax
public class InputActionAssetReference : ICloneable
Remarks
Has a custom property drawer that allows dropping assets onto the wrapper property.
Constructors
InputActionAssetReference()
Declaration
public InputActionAssetReference()
InputActionAssetReference(InputActionAsset)
Declaration
public InputActionAssetReference(InputActionAsset asset)
Parameters
Type | Name | Description |
---|---|---|
InputActionAsset | asset |
Properties
asset
The asset being referenced.
Declaration
public InputActionAsset asset { get; protected set; }
Property Value
Type | Description |
---|---|
InputActionAsset |
Methods
Clone()
Declaration
public InputActionAssetReference Clone()
Returns
Type | Description |
---|---|
InputActionAssetReference |
Disable()
Declaration
public void Disable()
Enable()
Declaration
public void Enable()
MakePrivateCopyOfActions()
Duplicate the referenced asset and all its action maps and actions.
Declaration
public virtual void MakePrivateCopyOfActions()
Remarks
This method is useful to be able to use the same asset multiple times but configure it differently each time. A common example of this use case is local multiplayer where each player uses the same set of actions supported by the game but each player's actions are configured to respond to just the devices assigned to the specific player.
Operators
Implicit(InputActionAssetReference to InputActionAsset)
Declaration
public static implicit operator InputActionAsset(InputActionAssetReference reference)
Parameters
Type | Name | Description |
---|---|---|
InputActionAssetReference | reference |
Returns
Type | Description |
---|---|
InputActionAsset |