JetBrains / JetBrains/resharper-unity
Camera events on SRP
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
In the built-in renderpipeline we can add some functions related to rendering to a `Monobehaviour` that will be fired. Rider knows about these events.
However, when using URP, HDRP or any scriptable renderpipeline, these won't get called (https://forum.unity.com/threads/camera-onprecull-onprerender-not-working.755516/).
It would be nice if Rider could give us a warning (or error) if we try to use the `OnPreRender` function (for example) when we are using a scriptable render pipeline. In that case we're supposed to use the delegates that `RenderPipelineManager` has (https://docs.unity3d.com/ScriptReference/Rendering.RenderPipelineManager.html).
I'm pretty sure you can use `GraphicsSettings.renderPipelineAsset` (https://docs.unity3d.com/ScriptReference/Rendering.GraphicsSettings-renderPipelineAsset.html) to determine if a scriptable renderpipeline is used.
Contributor guide
Research direction
No file or test is named in the issue. Start by locating the Unity inspections for MonoBehaviour message methods, then compare the documented OnPreRender behavior with GraphicsSettings.renderPipelineAsset and RenderPipelineManager; done means the unsupported callback is diagnosed for scriptable render pipelines with guidance toward the relevant delegates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100