Skip to content

Commit c4bbd9f

Browse files
[Backport 7.x.x] Fixed some gcalloc in the debug window (#464)
* Fixed some GCAlloc in the debug window # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Debug/VolumeDebug.cs * Update changelog
1 parent 722d7b1 commit c4bbd9f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ protected T Cast<T>(object o)
3636
where T : class
3737
{
3838
var casted = o as T;
39-
string typeName = o == null ? "null" : o.GetType().ToString();
4039

4140
if (casted == null)
41+
{
42+
string typeName = o == null ? "null" : o.GetType().ToString();
4243
throw new InvalidOperationException("Can't cast " + typeName + " to " + typeof(T));
44+
}
4345

4446
return casted;
4547
}

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6767
- Fixed a null ref exception in static sky when the default volume profile is invalid.
6868
- Fixed an error about procedural sky being logged by mistake.
6969
- Fixed flickering of the game/scene view when lookdev is running.
70+
- Fixed some GCAlloc in the debug window.
7071

7172
### Changed
7273
- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.

0 commit comments

Comments
 (0)