Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Framerate drop onEnable

A topic by Jacob Grossman created Jul 03, 2021 Views: 115 Replies: 2
Viewing posts 1 to 2
(1 edit)

Hey KaiClaiver, I'm experiencing a pretty annoying framerate drop when enabling STM component - even when built out. I'm using stm + fleece and have narrowed it down to onEnable() behavior. In the scene I have nothing but first person controller and a trigger which onTriggerEnter() just turns on the stm component.

Do you have any suggestions as to how to minimise the loading overhead?

[Edit] After some more fruitling around it appears to be hanging when setting stm.Text =.  Whether it's a fleece passage or a short string (I've tested it with "yeah" and "asdfjhaksjdhfk" and the longer string does seem to cause more hang).

Developer

If you disable autoRead and rememberReadPosition, STM will never Rebuild upon enable. I'd still like to go back and optimize the Rebuild() cycle itself (someday...), but I think manually preventing it from rebuilding should work for the time being - especially if the text your displaying isn't changing.


So... A check on a fleece jumper/drawstring to make sure the new string is different than the old one might be a string comparison check, but it's a lot lighter than rebuilding the whole thing!

Thanks very much, I'll give that a crack!