0
\$\begingroup\$

I have a text component that displays a text with an animation. If I disable the GameObject while the animation is running, the Rect Transform doesn't reset to the original position, which makes the text appear revealed next time it has to come. How can I fix this?

This is how the settings look like:

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Is the text rect or it's parent holding the script? Is it holding the animator? Are you disabling it with animation? \$\endgroup\$ – Sourav Paul Aug 5 '16 at 3:57
  • \$\begingroup\$ why do you disable GameObject instead of Animator Component.do you have script attach to GameObject ? \$\endgroup\$ – Seyed Morteza Kamali Aug 5 '16 at 5:19
  • \$\begingroup\$ @SP It's the parent. I'm disabling it through code, not with animation \$\endgroup\$ – Milen Aug 5 '16 at 12:25
  • \$\begingroup\$ @smkplus Yes. Plus I generally disable ui gameobjects when I don't need them cuz they're pretty unoptimized for mobile. \$\endgroup\$ – Milen Aug 5 '16 at 12:27
  • \$\begingroup\$ do you use Boolean for controlling Go Text Show? if you want reset position you can false Go Text Show instead of disabling \$\endgroup\$ – Seyed Morteza Kamali Aug 5 '16 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.