An interface representation of a MonoBehaviour.
More...
|
bool | enabled [get, set] |
| Enabled Behaviours are Updated, disabled Behaviours are not. More...
|
|
GameObject | gameObject [get] |
| The game object this component is attached to. A component is always attached to a game object. More...
|
|
HideFlags | hideFlags [get, set] |
| Should the object be hidden, saved with the scene or modifiable by the user? More...
|
|
string | name [get, set] |
| The name of the object. More...
|
|
string | tag [get, set] |
| The tag of this game object. More...
|
|
Transform | transform [get] |
| The Transform attached to this GameObject. A component is always attached to a transform. More...
|
|
object | userData [get, set] |
| Additional user data associated with this object. This is unused by default. More...
|
|
Cancels all Invoke calls on this MonoBehaviour.
void CancelInvoke |
( |
string |
methodName | ) |
|
Cancels all Invoke calls with name methodName
on this behaviour.
- Parameters
-
methodName | The method to cancel. |
Returns the instance id of the object.
- Returns
- The instance id of this object.
void Invoke |
( |
string |
methodName, |
|
|
float |
time |
|
) |
| |
Invokes the method methodName
in time
seconds.
- Parameters
-
methodName | The method to invoke. |
time | The amount of time to wait, in seconds, before invoking the method. |
void InvokeRepeating |
( |
string |
methodName, |
|
|
float |
time, |
|
|
float |
repeatRate |
|
) |
| |
Invokes the method methodName in time seconds.
After the first invocation repeats calling that function every repeatRate
seconds.
- Parameters
-
methodName | The method to invoke. |
time | The amount of time to wait, in seconds, before invoking the method. |
repeatRate | The amount of time to wait between repeat calls. |
Is any invoke pending on this MonoBehaviour?
- Returns
true
if the method is invoking, otherwise false
.
bool IsInvoking |
( |
string |
methodName | ) |
|
Is any invoke on methodName pending?
- Parameters
-
methodName | The method to check. |
- Returns
true
if the method is invoking, otherwise false
.
Coroutine StartCoroutine |
( |
IEnumerator |
routine | ) |
|
Starts a coroutine.
- Parameters
-
routine | The coroutine to start. |
- Returns
- StartCoroutine always returns immediately, however you can yield the result. This will wait until the coroutine has finished execution.
Coroutine StartCoroutine |
( |
string |
methodName | ) |
|
Starts a coroutine named methodName.
- Parameters
-
methodName | The method to start. |
- Returns
- StartCoroutine always returns immediately, however you can yield the result. This will wait until the coroutine has finished execution.
Coroutine StartCoroutine |
( |
string |
methodName, |
|
|
object |
value |
|
) |
| |
Starts a coroutine named methodName.
- Parameters
-
methodName | The method to check. |
value | An argument to pass to the method. |
- Returns
- StartCoroutine always returns immediately, however you can yield the result. This will wait until the coroutine has finished execution.
void StopAllCoroutines |
( |
| ) |
|
Stops all coroutines running on this behaviour.
void StopCoroutine |
( |
string |
methodName | ) |
|
Stops all coroutines named methodName running on this behaviour.
- Parameters
-
methodName | The method to stop. |
Returns the name of the game object.
- Returns
- The name of the game object.
Enabled Behaviours are Updated, disabled Behaviours are not.
The game object this component is attached to. A component is always attached to a game object.
Should the object be hidden, saved with the scene or modifiable by the user?
The tag of this game object.
The Transform attached to this GameObject. A component is always attached to a transform.
Additional user data associated with this object. This is unused by default.