View Issue Details

IDProjectCategoryView StatusLast Update
0001596NoesisGUIC# SDKpublic2019-12-12 14:36
ReporterstonstadAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version2.2.5 
Target VersionFixed in Version 
Summary0001596: Unity 2019.2.x OnGUI GC Allocation in NoesisView.OnGUI
DescriptionThe Unity MonoBehavior function OnGUI has a 0.7 kb per-frame gc allocation. Unity does not intend to fix this, as OnGUI is deprecated, per this thread: https://forum.unity.com/threads/gc-coll ... ui.642229/

NoesisView.cs uses OnGUI as follows:
 void OnGUI()
    {
        if (_uiView != null)
        {
            UnityEngine.GUI.depth = -(int)_myCamera.depth;
            ProcessEvent(UnityEngine.Event.current, _enableKeyboard, _enableMouse, _emulateTouch);
        }
    }

I can confirm the following:
1. OnGUI leaks memory without the internal Noesis logic.
2. Commenting out OnGUI completely removes a 0.7 kb per frame allocation.

To eliminate this allocation, is there a different location Noesis logic may be moved to?

Allocation screenshot: https://i.imgur.com/AAfTwRS.png


TagsNo tags attached.
PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-12-06 17:18 stonstad New Issue
2019-12-12 14:36 stonstad Summary Unity 2019.2.x OnGUI Memory Leak NoesisView.OnGUI => Unity 2019.2.x OnGUI GC Allocation in NoesisView.OnGUI