Archive 17/01/2023.

Exposing Custom Components to Scripting

Enhex

Are classes deriving from Component are automatically exposed to scripting?
If not what is required to expose them?

rasteron

[quote=“Enhex”]Are classes deriving from Component are automatically exposed to scripting?
If not what is required to expose them?[/quote]

Check out the sources in Urho3D/Script directory. You can also check the smaller classes like Audio API or CivetWeb to get started and how it was exposed as a script.

Enhex

Ok, thanks.

Right now what I have in mind for making an app(game) level API is to derive Script and add a RegisterGameAPI(), like the other global functions with the .cpp files that got static functions for each class type.