Forum rules - please read before posting.

ActionList parameters not set is using Addressables

I'm here again struggling to make addressable work on my game.
I have an action list that relies on a couple of GameObjects parameters set on the run before it runs, everything runs correctly if the scene is "normal", if I make the scene addressable parameters are not set anymore, but ONLY in actual build and not in the editor.
I tested by adding a comment and in the editor console returns the constant id of the GameObject while in build (tested on WebGL looking at Chrome console) I had the confirmation that the parameter is not set.
Here a screenshot of the action list:

In the editor movement is performed correctly an this is what console returns:

In the build movement is wrong like if parameters were not set, and in fact this is what console shows:

I tried making the gameObject put in the parameter addressable but - besides the fact that this is not feasible as they are dozens of markers and hotspot created in scene and not coming from the asset - nothing changes, parameter still stay unset.
This happens both on AC 1.75.1 and AC1.77.2
Any help? Thanks!

Comments

    1. Is the ActionList in the image scene-based, or an asset file?
    2. Can you share details of how the other ActionList, SportRESTORE, is setting the parameter values?
    3. Does check Wait until finish? in the ActionList: Run Action cause it to work?
    4. If you place a comment Action in SportRESTORE, does it show up in the log?
  • Is the ActionList in the image scene-based, or an asset file?

    it's an asset file, tried to make it addressable but nothing changes

    Can you share details of how the other ActionList, SportRESTORE, is setting the parameter values?
    Does check Wait until finish? in the ActionList: Run Action cause it to work?
    If you place a comment Action in SportRESTORE, does it show up in the log?

    it is not the sportRESTORE ActionList the one that sets the parameters. They are set by different cutscenes called by a script. This is how they set them:

    These are scene-based cutscenes set to Pause Gameplay and comments added are printed to console.
    The zoom_back_OnClick action is called by a menu button pressed.

  • it is not the sportRESTORE ActionList the one that sets the parameters. They are set by different cutscenes called by a script. This is how they set them:

    At what point is this run, relative to the ActionList asset they affect?

    What are the properties of "zoom_back_On.."?

  • This is how it works: whenever you enter in a "zoomed place" a Cutscene runs that sets the parameters, does other stuff and then turns on a menu.
    When you need to exit the zoom, you press the menu button that runs "zoom_back_OnClick" ActionList. Its properties are Pause Gameplay, all the others are unticked, except, obviously, Use parameters?

  • I'm afraid I don't have enough to go on to recreate the issue. If you'd like me to take a look at your project, PM me a zip along with instructions on how to see the issue occuring.

  • I've decided to not use addressables anymore, I'm getting too close to release and this is giving too many issues. I will stick with older AC version and no addressable for now. Anyway, I am going to send you a sample project with the recreated issue for you to check as soon as I can.
    Thanks a lot for your awesome support.

  • edited July 2023

    Thanks for the project - I've looked into it and uncovered what's been going on.

    Essentially, it's to do with the fact that any assets referenced by an Addressable scene will be duplicated in memory by Unity. The ActionList: Set parameter Actions, which are inside the scene, affect the copy - while the Menu Button that ultimately runs the ActionList affects the original.

    One potential way around this would be to mark both the ActionList and the Menu Manager as Addressable - I haven't tested this, and may cause unwanted side effects.

    A way that does work, however, is to ensure that all calls to the asset are handled from within the scene. You can do this by having your zoom-out Button instead run a new ActionList asset that simply calls ActionList: Run to run a Cutscene in the scene. This Cutscene would then use another ActionList: Run to run the "zoom_back_OnClick" asset file.

    This method would require such a Cutscene to be placed in each scene that the asset could be called from. To ensure that the Cutscene is always correctly called, you'd need to ensure that its Constant ID value is consistent across scenes - a concept covered in this tutorial.

  • Thank you very much Chris, the second solution worked like a charm!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.