Await

TEMPLATE NAME: Await
CORE VERSION: 1.0.291
TEMPLATE VERSION: 1.0.0

TEMPLATE DESCRIPTION:

Generic "checklist" scripts for tracking script loading.

Based upon the concepts in Descendent's Framework Architecture, for easy integration and customization with other code.

TEMPLATE ROADMAP:

  • (no current plans)

TEMPLATE VERSION NOTES:

Version 1.0.0

  • First stable release.

ADDITIONAL INFO:

  • Community Content — "Await"
  • Community Project (example) — "Await"

Getting Started

Import

  1. In Community Content, search for "descendent".
  2. Browse to the listing for "Await", and click "Import"; then click "Yes".
  3. In Core Content, under the "Community Content" category, select the "Imported Content > Await" group.
  4. Add the "Await" template to the Hierarchy (in Default Context); then delete the new template instance from the Hierarchy.
    • This step is necessary to import this package’s assets into Project Content.

How-To Guides

Track the Loading of Multiple Scripts

  1. In Project Content, select the "Imported Content > Await > Dependent Scripts" group.
  2. Add the "Await_AwaitGroup" script to the Hierarchy, in Client Context or Server Context (depending on the network context of the scripts that will be tracked).
  3. In the Hierarchy, select the new "Await_AwaitGroup" script instance; then drag itself (from the Hierarchy) into its own "Group" custom property (in the Properties panel).
  4. Add scripts that will be tracked to the Hierarchy, as children of the new "Await_AwaitGroup" script instance.
  5. Configure the new "Await_AwaitGroup" script instance's "Await" custom property, or edit each tracked script, to ensure each tracked script's context has a field with a name that matches the "Await" custom property's value. (See "Await_AwaitGroup" custom properties reference.)

Track the Loading of Another Script

  1. In Project Content, select the "Imported Content > Await > Dependent Scripts" group.
  2. Add the "Await_AwaitOther" script to the Hierarchy, in Client Context or Server Context (depending on the network context of the script that will be tracked).
  3. In the Hierarchy, select the new "Await_AwaitOther" script instance; then drag the script that will be tracked (from the Hierarchy) into the new "Await_AwaitOther" script instance's "Other" custom property (in the Properties panel).
  4. Configure the new "Await_AwaitOther" script instance's "Await" custom property, or edit the tracked script, to ensure the tracked script's context has a field with a name that matches the "Await" custom property's value. (See "Await_AwaitOther" custom properties reference.)

Update

  1. In Project Content, right-click the "Imported Content > Await" group, and select "Download Latest"; then click "Yes"; then click "Continue with save: I accept the risk".

Delete

  1. In Project Content, right-click the "Imported Content > Await" group, and select "Delete Assets"; then, if asked, click "Delete All and Save" each time; then click "Delete All" each time.
  2. In Core Content, under the "Community Content" category, right-click the "Imported Content > Await" group, and select "Delete Assets"; then click "Delete All" each time.

Custom Properties Reference

Await_AwaitGroup

Custom Properties

CoreObjectReference Group

Parent of the scripts that will be tracked by this script instance.

string Await

Field in each tracked script's context that's expected to be assigned a truthy value, once the tracked script has finished loading.
Default: "ready"

float AwaitTimer

Amount of time (in seconds) to wait for each of this script instance's tracked scripts to finish loading, before logging a warning. This script instance will wait forever if the field specified by this script instance's "Await" custom property couldn't be found in a tracked script's context.
Default: 60

string Ready

Field in this script instance's context to set to true, once all of this script instance's tracked scripts have finished loading.
Default: "ready"

string ReadyEvent

Event to broadcast when all of this script instance's tracked scripts have finished loading, with this script instance as the argument. If empty, no event will be broadcast.

Await_AwaitOther

Custom Properties

CoreObjectReference Other

Script that will be tracked by this script instance.

string Await

Field in the tracked script's context that's expected to be assigned a truthy value, once the tracked script has finished loading.
Default: "ready"

float AwaitTimer

Amount of time (in seconds) to wait for this script instance's tracked script to finish loading, before logging a warning. This script instance will wait forever if the field specified by this script instance's "Await" custom property couldn't be found in the tracked script's context.
Default: 60

string Ready

Field in this script instance's context to set to true, once this script instance's tracked script has finished loading.
Default: "ready"

string ReadyEvent

Event to broadcast when this script instance's tracked script has finished loading, with this script instance as the argument. If empty, no event will be broadcast.

Examples

See "Await" by Descendent in Community Projects.