requireScript

Require scripts from within scripts.

Overview:

Functions:

API Reference

requireScript()

Returns the value that was returned by the given script. Required scripts are cached per script.

let Result = requireScript("Example.js")

Parameters:

  • relativePath(String) Name or relative path of the script to require.


Example:

Requiring another script
var Result = requireScript("Test.js")
log.info("Test.js returned: "+ Result +" after requiring it")
Test.js
var ThisName = script.Name
return ThisName

Last updated

Was this helpful?