playMaker

Author Topic: More Activate Game Object Weirdness  (Read 1324 times)

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
More Activate Game Object Weirdness
« on: March 30, 2016, 09:31:43 AM »
OK, this is a different issue.

I have 2 canvases,  Canvas_A and Canvas_B.

Canvas_A has a bunch of Unity UI buttons on it.

Canvas_B has a UI button on it that hides/shows (activates/deactivates) Canvas_A.  There is also a Get Key Down action on Canvas_B that also can hide/show (activate/deactivate) Canvas_A.  This all works fine.

On Canvas_A, there are two buttons which basically choose between two animations to use... Anim_A and Anim_B.

When PLAY mode begins, Anim_A is the animation used.  If the user clicks the Anim_B button... Anim_B animation is used.

If the user is viewing Anim_A and they click the hide Canvas_A button (or they use the 'H' key) Canvas_A is hidden.  If they click again, the Canvas_A is unhidden and Anim_A is still shown.

But if the user is viewing Anim_B and they use the button (or key press) to hide Canvas_A, and then they use the button (or key press) to unhide Canvas_A... the animation will be switched to Anim_A.

If Anim_B is being used and the Canvas_A is hidden/unhidden... I want Anim_B to continue to be used.  I don't want it to switch to Anim_A.

Any idea why activating/deactivating the canvas object should influence what animation is being used?  Clearly, the Anim_A and Anim_B buttons are children of the canvas object... but it seems like activating/deactivating the canvas shouldn't change which animation is being used.

Thanks!

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: More Activate Game Object Weirdness
« Reply #1 on: March 30, 2016, 09:40:05 AM »
Oh, and I've tried setting 'Recursive' to unchecked in the Activate Game Object action which activates/deactivates the Canvas_A object... it makes no difference.  When the Canvas_A is activated, the animation will be switched to Anim_A.

Thanks!