ScriptAssetData: {
    loading: boolean;
    loadingType: number;
    scripts: {
        [key: string]: {
            attributes: {
                [key: string]: {
                    array: boolean;
                    assetType: string;
                    color: string;
                    curves: string[];
                    default: any;
                    description: string;
                    enum: { options: { [key: string]: any }; order: string[] };
                    max: number;
                    min: number;
                    placeholder: any;
                    precision: number;
                    schema: { [key: string]: any }[];
                    step: number;
                    title: string;
                    type: string;
                };
            };
            attributesOrder: string[];
        };
    };
}

Represents the data for a Script asset.

Type declaration

  • loading: boolean

    Whether this is a script that defines a custom loading screen.

  • loadingType: number

    This allows you to control when this script will be loaded. The possible values are: 0 (load as a regular Asset), 1 (load before the PlayCanvas engine is loaded), 2 (load right after the PlayCanvas engine has loaded).

  • scripts: {
        [key: string]: {
            attributes: {
                [key: string]: {
                    array: boolean;
                    assetType: string;
                    color: string;
                    curves: string[];
                    default: any;
                    description: string;
                    enum: { options: { [key: string]: any }; order: string[] };
                    max: number;
                    min: number;
                    placeholder: any;
                    precision: number;
                    schema: { [key: string]: any }[];
                    step: number;
                    title: string;
                    type: string;
                };
            };
            attributesOrder: string[];
        };
    }

    Contains all the script data.