I am trying change a prefab from an editor script. The changes seems to work but when I exit unity and return the changes are gone. I used AssetDatabase.SaveAssets() but it did not help.
Any other steps I should be doing?
static void TestPreInit(){
GameObject go = Selection.activeObject;
Debug.Log(go.name);
mmpc = go.GetComponent[of MotionPackControl]();
if(mmpc != null){
mmpc.isPreInit = true;
AssetDatabase.SaveAssets();
}
Debug.Log("done");
}
edit:cleanup code