Forum rules - please read before posting.

Can prefabs remember their linked actionlists?

Using Unity ver. 2022.3.62f2 and AC ver. 1.85.5

I have a few prefabs, of characters and objects, that have hotspots parented underneath them. The hotspot controls the interactions of each of them, by linking to actionlists that have effects when the object is used or examined by the player. Prefabs are very convenient for me, but I noticed when I drop them into the scene I have to link the existing actionlists to the hotspots all over again every time.
I went into the prefab to see if I could save it in a state that already linked the actionlists, but it seems unable to 'call' the actionlists that exist in the scene during prefab view.
In all of this, I also noticed that the actionlists in my scene can be found in the 'interaction' folder in the scene hierarchy, but do not actually exist as assets in my project folder.
Do I need to save these actionlists as prefabs themselves? Beyond this issue, would it be a sensible idea to save a few generic actions into the project folder to be used across scenes?

Thank you for your time.

Comments

  • Scene-based ActionLists like Cutscenes and Interactions cannot exist as prefabs - you'll need to rely on ActionList asset files instead if you wish to have a prefab Hotspot work across scenes without re-linking.

    At the top of the Hotspot Inspector is the Interaction source field. If you set this to Asset File, you can assign ActionList asset files instead of scene-based Interaction objects.

    So far as running your existing Interactions go, you have a couple of options:

    1. Convert your Interactions completely to asset files by clicking the cog icon in their Inspectors. It will attempt to update the Actions within by assigning Constant IDs to any scene-based objects they reference.
    2. Leave your Interactions as they are, but instead have your Hotspot's ActionList assets comprise of single ActionList: Run Actions that then run the Interactions in the scene. These will create a link again with Constant ID values - so if your prefabs are used across multiple scenes, just make sure the various Interactions across each scene share the same Constant ID number and the link will work in each scene.
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.