Skip to content

Commit

Permalink
Unity6でGraphicsSettings.renderPipelineAssetがObsolete警告を出すのに対応
Browse files Browse the repository at this point in the history
Unity6でGraphicsSettings.renderPipelineAssetがObsoleteになり、次のような警告が出ていました。

```
Assets/VRM/Editor/BuildClass.cs(31,13): warning CS0618: 'GraphicsSettings.renderPipelineAsset' is obsolete: 'renderPipelineAsset has been deprecated. Use defaultRenderPipeline instead (UnityUpgradable) -> defaultRenderPipeline'
```

Unity6以降では、代わりとして推奨されるフィールド defaultRenderPipeline を使うようにしました。
  • Loading branch information
saturday06 committed Jan 29, 2025
1 parent 08517b7 commit dc8b841
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/VRM/Editor/BuildClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ public static void Build()

public static void SwitchBuiltinPipeline()
{
#if UNITY_6000_0_OR_NEWER
UnityEngine.Rendering.GraphicsSettings.defaultRenderPipeline = null;
#else
UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset = null;
#endif
}

public static void BuildWebGL_SimpleViewer()
Expand Down

0 comments on commit dc8b841

Please sign in to comment.