Commit 5d46f33
[Port] [6000.0] [URP] Make error when trying to use URP api out of URP for volume more explicite
Fix [UUM-91000](https://jira.unity3d.com/browse/UUM-91000). This is indeed a regression but the previously allowed of being able to call this out of URP lifetime was a mistake. One cannot alter the volume for the rendering before the URP pipeline is created.
So the fix for this is mainly to clarify the error message and encouraging user to use the pipeline creation event if they need to.
Before this PR, the error was `NullReferenceException: Object reference not set to an instance of an object` when calling Universal.CameraExtensions.UpdateVolumeStack before URP is created. This happens by calling it in a Start of a Script and entering play mode.
New Error message:
`UpdateVolumeStack must not be called before VolumeManager.instance.Initialize. If you tries calling this from Awake or Start, try instead to use the RenderPipelineManager.activeRenderPipelineCreated callback to be sure your render pipeline is fully initialized before calling this`1 parent f7451bf commit 5d46f33
1 file changed
Lines changed: 8 additions & 0 deletions
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| |||
0 commit comments