Problem this feature should fix
The current Actor Lua API exposes many hardcoded getters (GetCamera, GetLight, etc.) and GetBehaviour(name), but there is no generic lookup by type. This makes scripts more verbose, less scalable, and harder to write in a data-driven way when the component/behaviour type is only known at runtime.
Expected solution
Add two generic Actor bindings in Lua:
GetComponent(type)
GetBehaviour(type)
Both should resolve from a type identifier and return the matching instance, or nil when not found. Existing explicit getters should remain supported for backward compatibility.
[Related to #689]
Problem this feature should fix
The current
ActorLua API exposes many hardcoded getters (GetCamera,GetLight, etc.) andGetBehaviour(name), but there is no generic lookup by type. This makes scripts more verbose, less scalable, and harder to write in a data-driven way when the component/behaviour type is only known at runtime.Expected solution
Add two generic
Actorbindings in Lua:GetComponent(type)GetBehaviour(type)Both should resolve from a type identifier and return the matching instance, or
nilwhen not found. Existing explicit getters should remain supported for backward compatibility.[Related to #689]