Hello,
I use Angelscript as my go-to scripts in my tools and mini game-engines and I was looking for a way to register statics constants and found this very old post (Angelscript and static method).
For example, if we have a Vector3 class, wouldn't that be nice to Register a Vector3.Up, static constant?
If I understand correctly, the "work around" is to just use globals. So I can ask my user to use the "Up" global variable or, "Vector3Up" or something.
I don't mind doing that, but is there a way to "fake" that it's a static? I'm really just asking for looks.
I would like something like that:
mScriptEngine->RegisterObjectType("Vector3");
mScriptEngine->RegisterGlobalProperty("Vector3", "Up", &SomeGlobalVariable);
And then, in scripts, the user type Vector3.Up to get the global pointer?