MLCelestialData.GetComponent(TComponent type)
Returns the component of Type type if the game object has one attached, nil if it doesn't.
Parameters:
Name | Type | Description |
---|---|---|
type | TComponent | The type of Component to retrieve. |
Returns:
type | Description |
---|---|
TComponent | the component of Type type |
Usage
---@type MLCelestialData
local mlcelestialdata;
---@type TComponent
local type;
local val0 = mlcelestialdata.GetComponent(type)
Example
local transform = myComponent.GetComponent(Transform);