| name | unity-project-init |
| description | Initialize Unity project and configure URP/Post Processing. Use when starting a new project, setting up URP pipeline, configuring post processing, or creating folder structure. |
| disable-model-invocation | true |
Unity Project Initialization
URP Pipeline Setup
プロジェクト開始時に URP パイプラインが GraphicsSettings にセットされているか確認し、されていなければ設定する。
internal class CommandScript : IRunCommand
{
public void Execute(ExecutionResult result)
{
var guids = AssetDatabase.FindAssets("t:UniversalRenderPipelineAsset");
if (guids.Length == 0)
{
result.LogError("URP Pipeline Asset not found. URP package is installed?");
return;
}
var path = AssetDatabase.GUIDToAssetPath(guids[0]);
var pipelineAsset = AssetDatabase.LoadAssetAtPath<UniversalRenderPipelineAsset>(path);
GraphicsSettings.defaultRenderPipeline = pipelineAsset;
QualitySettings.renderPipeline = pipelineAsset;
result.Log( + pipelineAsset.name + + path);
}
}