Page 1 of 1
UnityUiQuestTracker and GC (SOLVED)
Posted: Thu Dec 12, 2019 3:01 am
by mdotstrange
I was profiling my game for some frame rate drops that were happening- I noticed this part of Dialogue System being called which was causing some performance spikes-
I haven't tested it in builds yet as I know some things don't show in builds- Is it only called once per scene load etc? Just thought I'd get your opinion on it- thanks.
Re: UnityUiQuestTracker and GC
Posted: Thu Dec 12, 2019 8:41 am
by Tony Li
Hi,
If possible, use the StandardUIQuestTracker instead of the older UnityUIQuestTracker. The StandardUIQuestTracker has further optimizations. However, both of them use pools so they will allocate memory only once when it sets itself up. If you add more quests to be tracked, it will allocate more to grow the pool, but since it uses a pool it won't keep freeing and reallocating memory. The process of updating the tracker does use a little memory, but it only occurs when you update the tracker. Make sure you're not updating the tracker every frame or something like that. It only needs to be updated when a quest state or quest variable changes, and in most cases the Dialogue System will automatically tell it to update so you don't have to do anything.
Re: UnityUiQuestTracker and GC
Posted: Fri Dec 13, 2019 9:37 pm
by mdotstrange
Thank you for the detailed response. I'm not updating the tracker/invoking anything related to it manually. It seems to happen 10-20 seconds after game start.
Is there a place in the doc's where it shows how to switch to the Standard tracker? Thank you.
Re: UnityUiQuestTracker and GC
Posted: Fri Dec 13, 2019 10:02 pm
by Tony Li
Hi,
There's no specific documentation for switching to the StandardUIQuestTracker. Just replace the UnityUIQuestTracker script and the UnityUIQuestTrackTemplate script from the child GameObject with the corresponding StandardUIQuestTracker and StandardUIQuestTrackTemplate scripts, and reassign the UI elements.
Re: UnityUiQuestTracker and GC
Posted: Fri Dec 13, 2019 11:32 pm
by mdotstrange
Will do, thank you.