Adding tags in code and removing assets issue

Hi!

The following issue has been troubling me for quite some time. Check this script:

    var asset = this.app.assets.find('background');
    
    asset.tags.add('Here-is-a-tag!');
    
    this.app.assets.remove(asset);

When run you will get the following error:

  1. Removing the second line that adds the tag, makes the error go away.

  2. Tried removing manually the tag before removing the asset from the registry. No success.

  3. Tried clearing all tags before removing the asset from the registry. No success.

Is this a bug or am I not calling the correct methods?

Thanks!

P.S. Sample project to play with: PlayCanvas | HTML5 Game Engine

1 Like

Seems like a bug on our end, will look into that.

1 Like