Calling "Optimize" at runtime

Discussion and help for Easy Save 3
Post Reply
funtomata
Posts: 24
Joined: Tue Feb 23, 2021 4:25 pm

Calling "Optimize" at runtime

Post by funtomata »

Hello,
my game has a persistent scene and each level is loaded additively, you can sometimes go back and forth between scenes, but there are some points where you can no longer go back. My Reference Manager is on my persistent scene, and it works perfectly fine, but as the game goes on, the number of references keep increasing more and more.

I was wondering if it was possible to clean unnecessary references at runtime, by calling the Optimize method on the Reference Manager. Is that its intended purpose, or will something backfire if I do that? And if it isn't the proper way, how can I best deal with this?

User avatar
Joel
Moodkie Staff
Posts: 4015
Joined: Wed Nov 07, 2012 10:32 pm

Re: Calling "Optimize" at runtime

Post by Joel »

Hi there,

Having a large reference list is unlikely to affect performance as its simply a Dictionary of reference IDs, which in the context of a game engine is negligible.

I recommend only pursuing this if the Profiler is telling you that this is an issue.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Post Reply