Page 2 of 2
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 2:17 am
by CodePrincess
I think I see what's happening, and -- if so -- it is related to the Dialogue System.
Wow, I've never had a post with so many twists and turns!
The script has been installed in the SaveMenu Prefab.
https://www.mediafire.com/view/i0oncwwp ... b.png/file
And now the console says that it can't play the "BirdSquawk" sound I picked. The good news is, it wasn't even trying to
play the sound before. That just leaves the action list. I love me some progress!
I'm a little curious; It prints that message to the console pretty much every frame the cursor is over the Exit button.
Is it supposed to do that?
https://www.mediafire.com/view/yidpewdz ... r.png/file
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 2:15 pm
by Tony Li
I haven't dug into the AC code on that, but it's possible that, while the mouse is hovering over buttons, it keeps trying to play the sound until it's successful.
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 2:32 pm
by CodePrincess
I haven't dug into the AC code on that, but it's possible that, while the mouse is hovering over buttons, it keeps trying to play the sound until it's successful.
That makes sense. I'll go see if fixing the Bird squawk problem lets the engine run the action list, maybe?
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 2:40 pm
by Tony Li
Maybe? But AC is pretty good about handling error conditions like that. Double-check that the script I provided above is on the menu when it gets instantiated into the scene. You might want to temporarily add Debug.Log lines to the OnEnable and OnDisable methods to verify that they're actually running when they should.
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 2:41 pm
by CodePrincess
Okay, I got the squawks happening. You get one squawk when you hover over Scene Menu, but infinite squawks when you hover over any of the buttons in the Save Menu prefab. And it doesn't look like it runs the action list.
I hope this points to something useful. Is there anything I can do to help?
Oh, adding debug log comments to the new script. I just read your post. I'm on it!
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 3:05 pm
by CodePrincess
I'm back from the double-check. I can confirm that the prefab SaveMenu has the script, and that the AC Menu GameSaveMenu uses SaveMenu as its linked canvas prefab.
The debug log says that StopAutoFocusWhileActive's OnEnable and OnDisable methods get called once when the game boots up, then only OnEnable gets called again when GameSaveMenu is activated.
https://www.mediafire.com/view/3o6stj3p ... e.png/file
Re: Only one Button on Menu Doesn't Play Action List
Posted: Thu Jan 21, 2021 7:45 pm
by Tony Li
Hi,
The infinite squawks make me wonder if the Dialogue System's UI is still stealing focus somehow. Does this only happen when you open the save menu while a conversation is active?
If not, then it's probably not Dialogue System-related. But feel free to send me a reproduction project either way. I don't mind taking a look.
Re: Only one Button on Menu Doesn't Play Action List
Posted: Fri Jan 22, 2021 1:46 am
by CodePrincess
Does this only happen when you open the save menu while a conversation is active?
No, it looks like it happens when there isn't a conversation going, as well.
Thank you for taking another look at my game. I've emailed you a link to the most recent version of the project. Good night!