- Home /
Question by
Travis-Bulford · Sep 12, 2013 at 07:13 AM ·
editorassetscustom
Setting TextAsset[] from an Editor
I am building a custom Editor for an Object. That object has a public array of TextAssets. What I want to do it remove the tedious drag one TextAsset at a time process.
My Editor code finds the assets and using
TextAsset ta=(TextAsset)AssetDatabase.LoadMainAssetAtPath(ap);
Then adds each asset to the Script. However when I run the project I get
MissingReferenceException: The object of type 'TextAsset' has been destroyed but you are still trying to access it.
It appears that I am assigning the loaded version of the asset as apposed to a project reference.
Comment
Oh NV$$anonymous$$ looks like I was incorrectly using the editor class.