Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Unity provides callbacks during project file generation. Implement OnGeneratedSlnSolution
and OnGeneratedCSProject
methods using an AssetPostprocessor
to modify the project or solution file whenever it's regenerated.
How to customize the Visual Studio project files generated by Visual Studio Tools for Unity.
using System;
using UnityEditor;
using UnityEngine;
public class ProjectFilePostprocessor : AssetPostprocessor
{
public static string OnGeneratedSlnSolution(string path, string content)
{
// TODO: process solution content
return content;
}
public static string OnGeneratedCSProject(string path, string content)
{
// TODO: process project content
return content;
}
}