Skip to main content

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

PeterEldredge

4
Posts
1
Topics
3
Followers
A member registered Jun 20, 2018 · View creator page →

Creator of

Recent community posts

Replacing  gameobejct.activeInHierarchy with isActiveAndEnabled actually worked! As far as I can tell the problem has been resolved in every case I noticed it before, and I haven't seen any side effects.

Thanks for the help in resolving this! I really appreciate you getting back to me so quickly. If possible, it'd be nice if there was an official patch at some point, but no big deal there as it's a pretty easy fix once you know what the problem is.

Hey thanks again for the quick response. I did a few more tests and have some answers to your questions, so hopefully they will help narrow it down. I am using Unity 2022.3 btw.

The Animation Event that was being called was just a Unity Animation Event in Unity's Animation system. That seems to be mostly unrelated beyond it just being a timing issue, as the issue did continue to happen in some of my tests where I just moved the functionality of the event to before the animation even played and got rid of the event entirely.

The code that is causing the issue simply enabled several Parent Game Objects that each have 1 or more STM components on Child Game Objects of that Parent. I did do a test where the Parents were always active, and I simply enabled/disabled the STM components instead of any Game Objects. Doing this did result in the error occurring still, so it seems like the issue can occur any time that the STM component is enabled, not just their Game Object.

The most important thing I discovered however seems to be that your guess about the material system being involved is correct. As mentioned in my previous message, the text on a completely separate STM component, that is always active and in an entirely different scene with no custom functionality/animation on it, would disappear as part of this issue. It did use the exact same font/material as the STM components on the Game Object I was enabling, however.  So, I tried changing only the font, and the issue did not occur on that piece of text (it stayed visible and no longer disappeared). Then I tried changing only the material, and the same thing happened, no issues. 

So to sum it up, the issue happens regardless of enabling the Game Object or the STM component directly. I am not changing any of the values on the STM component programatically, I'm just simply enabling a Parent Game Object. And the issue that occurs seems to specifically be that objects with the exact same material all can disappear, regardless of how they are connected or what canvas they are on.

Thanks again for the help with this issue and let me know if you need any more information.

I have tried the two solutions that you provided but they did not resolve the issue. However, I did some more testing and my initial guess as to what the issue was is wrong.

The first thing I found was that it is almost an asset wide issue that happens when the bug occurs. It's not just the STM on the canvas that is being animated that can disappear.  Even STM on other canvases, in other scenes, that have no connection to the animated canvas can disappear at the same time.

I then narrowed down an instance of the issue happening to an animation event that I had on the animation, as it would happen whenever the event was present but did not reoccur after I removed it. The animation event triggered some code that would enable Game Objects that have STM components in their hierarchy.  These Game Objects are children of a canvas that's Game Object is enabled over the course of the animation.

I tried multiple things to resolve the issue, such as removing the animation event and enabling the Game Objects in code manually before playing the animation, moving the animation event until after the Canvas's Game Object was active, and setting the Canvas's Game Object to be active for the entirely of the animation. However, even if these solutions worked once, upon triggering the animation multiple times it would normally break again.

Because of this new information, my best guess is that it has something to do with setting an STM component active when a parent Game Object is inactive, or maybe that in combination with the animation system is causing a sequence issue. It is also really strange that it affects even completely disconnected STM components. Although, if there are shared systems or data between all STM components then maybe that could help narrow down the root of the issue.

While I could maybe find a work around to this problem by just blindly trying stuff until something works, I really would like to either get a solution or understand the issue enough that I'm not guessing at least. Any help you could provide would be greatly appreciated. Sorry that I can't show the game/problem directly, but I can give more details if that'd be helpful and can maybe try to replicate the problem in a different context if necessary.

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.