Skip to content

Add development build with extra safety net #6

@DavidPeicho

Description

@DavidPeicho

Had a great discussion with @rafern about how to check for invalid resource identifiers, such as object ids, texture ids etc... We should definitely provide a development build with some safety such as:

get objectId() {
    if (WL_DEV_BUILD) {
        if (this._objectId === -1) {
            throw new Error('Accessing invalid object');
        }
    }
    returns this._objectId;
}

It's really easy to do. However, we need to find solutions for:

  • Preventing people to deploy the development build. The editor might play a role in there
  • Still allow people without transformer to get this code running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions