MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / execScript

Method execScript

Engine/source/T3D/assets/ScriptAsset.cpp:187–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187bool ScriptAsset::execScript()
188{
189 AssetBase* handle = mpOwningAssetManager->acquireAsset<AssetBase>(getAssetId());
190
191 if (handle)
192 return true;
193
194 if (Torque::FS::IsScriptFile(mScriptPath))
195 {
196 return Con::executeFile(mScriptPath, false, false);
197 }
198 Con::errorf("ScriptAsset:execScript() - Script asset must have a valid file to exec");
199 return false;
200}
201
202DefineEngineMethod(ScriptAsset, execScript, bool, (), ,
203 "Executes the script file.\n"

Callers 1

ScriptAsset.cppFile · 0.80

Calls 3

IsScriptFileFunction · 0.85
executeFileFunction · 0.85
errorfFunction · 0.50

Tested by

no test coverage detected