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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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