Search Issue Tracker

By Design

Votes

0

Found in

2019.3.0a3

Issue ID

1156341

Regression

Yes

SystemInfo APIs take enum parameter create GC.Alloc

Scripting

-

Steps:
1. Open attached project, open repro scene
2. Hit play
3. Open Profiler > CPU Usage
4. Look at Hierarchy > PlayerLoop > Update.ScriptRunBehaviourUpdate > BehaviourUpdate > NewBehaviourScript.Update()

Actual: There is GC.Alloc under the item
Expected: There is no GC.Alloc

Reproducible in: 2019.3.0a3, 2018.4.1f1, 2018.2.20f1, 2018.1.0a5, 2018.1.0a4, 2018.1.0a3,
Not reproducible in: 2018.1.0a2, 2018.1.0a1, 2017.4.26f1, 2017.1.3p1

  1. Resolution Note (2019.3.X):

    GCAlloc is due to Textureformat enum check. To avoid GCAlloc, you just have to cache any systeminfo information. ( don't call it per frame )

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.