uLua v3.0.0
A Lua Modding Framework for Unity.
uLua.LuaExposeSequencer Class Reference

A sequencing class to control the order in which objects are exposed to Lua. More...

Public Member Functions

void AddExposeInstruction (ExposeTarget exposeTarget, MonoBehaviour targetMonoBehaviour, string luaName, LuaMonoBehaviour luaParent=null, bool enableObjectScript=false)
 Adds an expose instruction to the sequencer. More...
 
void RemoveExposeInstruction (MonoBehaviour targetMonoBehaviour)
 Removes an expose instruction from the sequencer. More...
 

Properties

int Count [get]
 Returns the number of expose instructions in the sequencer.
 

Detailed Description

A sequencing class to control the order in which objects are exposed to Lua.

Member Function Documentation

◆ AddExposeInstruction()

void uLua.LuaExposeSequencer.AddExposeInstruction ( ExposeTarget  exposeTarget,
MonoBehaviour  targetMonoBehaviour,
string  luaName,
LuaMonoBehaviour  luaParent = null,
bool  enableObjectScript = false 
)
inline

Adds an expose instruction to the sequencer.

Parameters
exposeTargetThe target event to expose the MonoBehaviour on.
targetMonoBehaviourThe MonoBehaviour to expose.
luaNameThe Lua name to expose the MonoBehaviour as.
luaParentThe Lua parent of the MonoBehaviour, if any.
enableObjectScriptIf true, the object script will be enabled after exposure.

This method allows you to queue up MonoBehaviours to be exposed to Lua at specific points in the Unity lifecycle. The exposeTarget parameter determines when the MonoBehaviour will be exposed (e.g., Awake, Start, OnEnable, SceneLoaded).

◆ RemoveExposeInstruction()

void uLua.LuaExposeSequencer.RemoveExposeInstruction ( MonoBehaviour  targetMonoBehaviour)
inline

Removes an expose instruction from the sequencer.

Parameters
targetMonoBehaviourThe MonoBehaviour whose expose instruction should be removed.

This method allows you to remove a specific MonoBehaviour's exposure instruction from the sequencer if it is no longer needed or if the MonoBehaviour has been destroyed.