I have added an attribute called words and selected a text file in the editor. However when trying to access the resource by Id it is undefined.
var GameManager = pc.createScript('gameManager');
GameManager.attributes.add('words', { type: 'asset', assetType: 'text', array: false });
// initialize code called once per entity
GameManager.prototype.initialize = function() {
var asset = this.app.assets.get(this.words);
variable ‘asset’ above is undefined. I am preloading the text file so I am not sure why it would be undefined.