예제 #1
0
        static void CreateMesh()
        {
            var mesh = new Mesh();
            var path = AssetDatabaseUtility.GenerateUniqueAssetPath("Mesh");

            AssetDatabase.CreateAsset(mesh, path);
            Selection.activeObject = mesh;
        }
예제 #2
0
        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);
        }