How to access script objects statically? #247
-
Hello! I used |
Beta Was this translation helpful? Give feedback.
Answered by
ClearScriptLib
Mar 23, 2021
Replies: 1 comment 1 reply
-
Hi @Zeon-4, All script objects are instances of var root = (ScriptObject)engine.Script;
var math = (ScriptObject)root.GetProperty("Math");
Console.WriteLine(math.GetProperty("PI")); Good luck! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Zeon8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Zeon-4,
All script objects are instances of
ScriptObject
. You can use that class as an alternative todynamic
:Good luck!