跨脚本调用

All scripts that have static variables or custom functions are registered to the cross-script reference.
This allows you to access these fields/functions using the dot-notation.

Specifications

Example

Let’s say we have two scripts: a.zs and b.zs.

a.zs:

static myVal as string = "myVal";

function makeLine() {
    print("---------------");
}

b.zs

print(scripts.a.myVal);
scripts.a.makeLine();