static void CreateMesh() { var mesh = new Mesh(); var path = AssetDatabaseUtility.GenerateUniqueAssetPath("Mesh"); AssetDatabase.CreateAsset(mesh, path); Selection.activeObject = mesh; }
static T CreateAudioContainerSettings <T>(string name, string settingsPath = "") where T : AudioSettingsBase { T settings = ScriptableObject.CreateInstance <T>(); string path = AssetDatabaseUtility.GenerateUniqueAssetPath(name, path: settingsPath); AssetDatabase.CreateAsset(settings, path); Selection.activeObject = settings; return(settings); }