Search Issue Tracker
By Design
Votes
1
Found in
6000.0.50f1
6000.1.6f1
6000.2.0b4
Issue ID
UUM-108189
Regression
No
ProfilingSampler.Get() returns null and makes the Player only render black when building a Release Build
Reproduction steps:
1. Open the attached “IN-103525.zip” project
2. Make sure the “Test” Scene is included in the build (File > Build Profiles > Scene List)
3. Build and Run the project
4. Observe the Player
Expected result: The Scene is rendered
Actual result: The Scene is not rendered, the Player is black
Reproducible with: 6000.0.50f1, 6000.1.6f1, 6000.2.0b4
Couldn't test with: 2022.3.62f1, 6000.0.47f1 (Could not resolve Shader compilation errors)
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Note:
- ProfilingSampler.Get(camera.cameraType); in Assets/Custom RP/Runtime/CameraRenderer.cs line 46 returns null only in a Release Build. If "Development Build" is set to true, the Scene renders as expected. This code path is most important to real-time reflection probes, since they do not expose the camera directly and the function works in the Editor
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Redoing creation of Sub Scenes and Cube GameObjects in Hierarchy throws “Assertion failed on expression: 'targetScene != nullptr’” error in Console window
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
Resolution Note:
ProfilingSampler.Get<TEnum> is not available in Release builds and intentionally returns null when used in non-development builds.
The same applies to RenderGraphProfilingScope.
To avoid any issues you can wrap Profiling code in the preprocessor directives.
#if DEVELOPMENT_BUILD || UNITY_EDITOR
//code
#endif