Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Instantiating an AC menu at runtime (menu duplicates).

Hi, I was wondering if anyone knows how to instantiate/duplicate AC menus at runtime? I know some dialogue windows have that ability, but I want to do this in scripting and on manual appear types. I've tried to look at the scripting guide but I haven't found the appropriate method. I know I could always just instantiate the prefab or something but I want to be able to use AC's own methods to manipulate the new copies.

Anyways, as usual any advice would be greatly appreciated.

Comments

  • You're correct that certain Menus have this ability, but these are for special cases only that AC can control - it's not possible to duplicate a Menu through script.

    You're on the right track with instead instantiating a UI prefab, but one that isn't connected to the Menu system in the usual way.  Instead you will have to assign e.g. button click events to an ActionList asset file's Interact method manually, and use custom Actions to turn it on/off.
  • I see. Thing is I was making a little prompt system to use in the project, which I can use for automatically showing (Yes/No) prompts or context sensitive buttons, and I was contemplating having the context sensitive menus having the ability to show in several objects at the same time (currently I'm using one menu per prompt type, so I can't, a new prompt request needs to wait until the menu isn't in use anymore to open). I'm using AC's methods heavily in the system so changing to unity's methods only when there's more than one menu open at a time isn't very desirable. Still, having one open at a time isn't that much of a problem. So I'll leave it as it is.
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.
Do NOT follow this link or you will be banned from the site!