UnityUiQuestTracker and GC (SOLVED)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mdotstrange
Posts: 8
Joined: Sat Dec 08, 2018 2:01 pm

UnityUiQuestTracker and GC (SOLVED)

Post 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- Image

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.
Last edited by mdotstrange on Sat Dec 14, 2019 3:31 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22091
Joined: Thu Jul 18, 2013 1:27 pm

Re: UnityUiQuestTracker and GC

Post 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.
mdotstrange
Posts: 8
Joined: Sat Dec 08, 2018 2:01 pm

Re: UnityUiQuestTracker and GC

Post 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.
User avatar
Tony Li
Posts: 22091
Joined: Thu Jul 18, 2013 1:27 pm

Re: UnityUiQuestTracker and GC

Post 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.
mdotstrange
Posts: 8
Joined: Sat Dec 08, 2018 2:01 pm

Re: UnityUiQuestTracker and GC

Post by mdotstrange »

Will do, thank you.
Post Reply