Forum rules - please read before posting.

MenuButton ActionList parameters restricted to Integer type

edited September 2015 in Technical Q&A
I want to send a string parameter to an action list that is called from a menu button, but it appears that the menu editor only handles integer parameters.

Compare this (using an integer param):

image

With this (using a string):

image


A quick look at MenuButton.cs (lines 307-311) seems to confirm this:

parameterID = Action.ChooseParameterGUI ("", actionList.parameters, parameterID, ParameterType.Integer);
if (parameterID >= 0)
{
parameterValue = EditorGUILayout.IntField (parameterValue);
}

Hope that made sense - only on my second cup of coffee this morning! :-)

Comments

  • Also, the Engine.ChangeScene action doesn't appear to accept parameters in the editor.
  • That's a restriction by design - you can use the ActionList: Check parameter Action in the ActionList you call to determine what to do with it.

    I shall look to add parameters to the Engine: Change scene Action, however.
  • No problem - I think I'll just make some local changes to the AC scripts then, as this would make things a bit more straightforward for my workflow.

    BTW, I've already hacked my working copy of the AC code base enough to make it necessary to manually merge in changes from a separate empty project after AC upgrades. If anyone is interested in a quick guide for this, just let me know.
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.