I'm wondering if anyone has had this issue after updating to Unity 6. Our game is organized to have a certain number of chapters per level and I started having all kinds of issues with spawning characters, camera changes, etc. when changing chapters or levels, all of which were fine before the Unity version switch. After some messing around, I found that adding an engine wait for 2 or more seconds in the ActionList right after an action that runs another AL from it fixed the issue. Wanted to see how to fix this (without adding the wait in all affected ALs).
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Vythiri.
v1.65 was released several years ago - long before Unity 6. It is not compatible with that release.
Are you able to provide steps that reproduce such an issue with the current release in Unity 6?
Hi @ChrisIceBox!
Thanks for the response. I ended up upgrading AC (at last!) and spent quite a bit of time debugging the issues that came up. A consequence of not keeping up with the upgrades, I guess. I can now see light at the end of the tunnel - but have been stuck on this particular bug and couldn't find anything in the Changelog. The 'Menu - Change state - Show menu element' is just not working after the upgrade (screenshot of two of the actionlists here: [https://imgur.com/a/o43DfBH]). The trigger's AL is disabling player movement and interaction, and skipping to deleting the trigger. The player is stuck because without the menu element active, the closeonclick script is not called to enable movement again. What am I missing?
Your screenshot shows a script that references parameters, but I can't see parameters in the ActionList - is LogoInstruction element the one in question?
Side note: you can't disable a Trigger by affecting its visibility. Instead, use the Object: Send message Action to pass the Turn Off command.
Ok, I see that wasn't the clearest screenshot I could've shared. Sharing another one: https://imgur.com/a/8M7oEST. The problems with the actions in the screenshot I shared are with Menu-change state-show menu element ones (action 3 in the first AL) which is getting skipped. The second screenshot has the menu element it's supposed to show and the script gets sent the parameter from the user click event. (On the side note, yes, and I have no idea why the trigger visibility is changed here - this is inherited code), but an object-remove-trigger removes the trigger somewhere down the line.)
Let's try isolating the problem.
Run the New Game Wizard to create a new, empty game. Duplicate your UI prefab and removr the custom scripts. Copy its Menu and paste it into your new game's one, and have it reference the duplicated prefab.
Are you then able to reproduce the issue from a fresh scene, e.g. within OnStart? If so, .unitypackage the new game assets, ui and scene included, and PM it to me.
Chris, before I try that, I want to check if there is something wrong with how I'm passing the parameter to the ActionList because that is what I changed to fix a bug caused by the upgrade.
This is what I changed:
closeMenu.parameters[0].SetValue (menuName);
to:
List parameter = new List();
parameter[0].SetValue(menuName);
closeMenu.AssignParameterValues(parameter);
Can you please let me know if this is incorrect?
Thanks very much!
Update: Changed to just ActionParamSet.CreateNew(closeMenu, 0, menuName); and now I can see that the parameter is getting passed to the AL.
Your code involves creating new parameters, but you don't set the parameter's type. You can use GetParameter to get the existing parameters and update their values: