I have custom scripts as text files in my project’s assets. These are text files for a custom interpreter, not MonoBehaviour “scripts” per Unity parlance. I can assign the paths to these scripts to MonoBehaviours in the editor, but this path won’t be found at runtime. Can I do something to make these scripts more like other, regular assets instead of putting them in Resources or StreamingAssets?
I just need the text inside of them, although I would like to eventually precompile them into my interpreter’s byte code before “assetifying” them. I just don’t see anything obvious searching for creating a new asset type.
I first thought a ScriptedImporter might do it, but whatever I did isn’t letting me drag-and-drop the script file itself into a MonoBehaviour expecting a ScriptableObject created by my ScriptedImporter. After some more reading, I thought that this isn’t even the right approach.
For now, I’m just settling on loading them as resources, but I figured there was a way to do this.