Search code examples
c++loadexecute

AngelScript, how to load a script file?


I know how I can bind C++ functions to AngelScript, but in my C++ code, how do I load an .as script file? How can I say in my C++ "Execute myscript.as now!" ?

In the AngelScript API I don't find any function like "LoadScript" or "ExecuteScript". Or do I have to define a path somewhere from where AngelScript loads all scripts and I don't need to tell it the exact files?


Solution

  • Just found it out (in a small side sentence in the docs):

    AngelScript doesn't provide a build in file loading. That's why there is no API function. So the manual loading is indeed the only way.