Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Text Disappearing Inconsistently when Enabling/Disabling Canvas

A topic by PeterEldredge created 6 days ago Views: 18 Replies: 1
Viewing posts 1 to 2

Hey All,

I am running into an issue where the text in my game seems to be disappearing at seemingly random or at least inconsistent times. I believe that it has to do with enabling/disabling the canvas, particularly in an animation, but I am not 100% sure if that is the case. This has been an issue for me since I started using the asset, and I have not been able to reproduce the issue in a consistent way.

Is there a caveat for using this asset I am missing? Or any ideas at a possible work around. I can't provide specifics about the game or screenshots, but I can give some more details about the setup if that would be helpful.

Developer

Hello!


Yeah, that shouldn't be happening... Hm a few things that come to mind from this scenario are...


1. Re-enabling the canvas might not be properly telling child STM objects to re-appear/re-make their meshes. Is this behaviour any different when the GameObject the canvas is on is turned on/off instead? Not sure if I already is, but need to check since this can narrow it down! (If this is the case, will look into why STM isn't updating in this scenario, but that's a quick working fix for you) I have a few  ideas on how to fix this if it's the problem.

2. Inside of an animation, please enable the "forceAnimation" variable on the text, at least for the frames where it will appear/disappear. This was intended as an optimization feature for animating text, but if a parent object is being set active/inactive, I can see the text or certain animations refusing to play. You can also try disabling "autoRead" or enabling "rememberReadPosition"... Those variables are true by default so if I had to guess, it's probably trying to read but refusing to automatically animate during the animation triggering it.


So, please give those a shot! setting the canvas's gameobject active/inactive, and enabling "force animation" on STM.