I am trying to develop a sort of extension for unity that will help manage in game events. My approach so far has been to try and make a script that will go into the editor folder and use Unity Editor classes. Part of what needs to happen is that I need to generate some scripts to attach to the gameObjects based on Input to the extension gui, however so far I have been unable to find a way to write to any script files for use as assets. I am able to create new blank script files by using:
var EventManager = new GameObject("Event Manager");
EVS = EventManager.AddComponent(MonoBehaviour);
AssetDatabase.CreateAsset(EVS,"Assets/Scripts/EventManagerScript.js");
but I can’t write to them. It feels like there should be an easy way to do this but so far no luck
I was thinking that maybe there was something in UnityEditorInternal that I could use, but I have been unable to find any documentation or even a list of functions for it.