Hey,
My inventory and interactions menus are built in Unity. They are setup exactly the same: custom animations with the 4 required states. Transition times are set to 1s.
I want them both to have a looping animation in the OnInstant state. So the animation clip for OnInstant is set to loop, and there is a transition in the animator from On > OnInstant.
The Inventory menu works absolutely fine.
But the Interaction menu behaves weirdly. When I click a hotspot for the first time it works fine. It goes to On>OnInstant (looping). When I exit the hotspot, it also seems fine. But when I click another a hotspot after that, it only starts the On state for a split second then disappears. When I exit the hotspot area, the menu reappears without transition.
However, it works perfectly when I change the custom animation transition time to 0. Unfortunately, it gets rid of my Off animation.
Settings are:
- Choose Hotspot then Interaction
- Select interaction by Clicking Menu
- Close interactions with Cursor Leaves Menu or Hotspot
Any idea how to fix this?
Comments
Have you assigned the RectTransform boundary field in your Menu's properties? That's used by AC to determine if the cursor has "left the Menu", so if that's improperly configured it will turn itself off inappropriately. What is the difference in behaviour if you temporarily set Close interactions to Click Off Menu?
I shall try to recreate the problem. Which versions of AC and Unity are you using, and how does your Interaction menu differ from the default Interaction / InteractionUI menu + Canvas prefab?
thanks for the support and quick response. Main differences with the provided Unity UI example are:
- interaction buttons are children of the UI panel. I have tried moving them up in the hierarchy but it doesn't change anything.
The RectTransform boundary is set to the UI panel. I have tried creating another panel and using it for boundaries, but the problem persists.
I set Close interactions to Click Off Menu. The menu still behaves weirdly, appearing and disappearing at different points, I can't work out why exactly.
Could it be a problem due to the animations and how AC calculates where hotspot boundaries are? Sorry I'm really stumped as it's the only difference between my inventory menu, which works perfectly fine.
Menu appear type: On Interaction
Position type: Appear at Cursor and Freeze (tried On Hotspot and didn't fix it)
Updating while Fade Out: yes (tried No, didn't fix)
One more note: the menu behaves fine when I change Transition Type to None, (or as previously mentioned, when it's set to Custom Animations with a transition time of 0 seconds). But then I don't have an Off animation when the menu is turned off.
So something in the animation transition is messing up with the animation clips?