format
typescript
Component.toString()class: Component
description
Returns the type alias (component name) of the component.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
string | Type alias |
code example
typescript
let go = new GameObject();
// Add a BoxCollider component to the game object
let com = go.AddComponent<BoxCollider>(BoxCollider);
com.toString();