Way to get resource without an ID?

Is there a way to get a resource with an ID?

For example, I currently do : this.templateAsset = this.app.assets.get(182392369);

But when then the project gets forked all the IDs changed so this code would not work in forked project.

Is there a better way to get resources?

Look at the API for the find* methods on the asset registry. eg https://api.playcanvas.com/classes/Engine.AssetRegistry.html#find

1 Like

Okay Thanks!