I'm assuming by Gameobject Input field, you mean the UI component.
If you link it to AC's Menu system, you can use the Variable: Set Action to set a Global string to the value of the input box. But to do it through script (so that you can also affect Local variables), check section 12.6 of the manual - that gives a list of script functions you can use to read/write variables through code.
Can i atleast request Menu Labels to also have Localvariables? In some rare cases like mine, there could be scene related menus which will only appear in one scene and labels in that scene can show Local variables.
Is there a easier way to call Actionlists in to UnityUi Buttons than writing scripts? What i mean, with the current Ui interface we can add game objects on to "on click" list and there are some options which might be useful for firing the action list.
Last but not least, how do we call the result of popup variables? I cant seem to call them with strings like " AC.GlobalVariables.GetStringValue (xx); "
I'm aware but i got curious and tried my hands on Unity Ui for a change. I did manage to achieve what i want though so it was fruitfull.
As for AC.PlayerMenus : I just copy pasted from the manual (page 121), and it seems to miss AC. before playermenus (My manual version is v1.41)
Also about the previous error which was
error CS0117: `AC.AdvGame' does not contain a definition for `RunActionList'
This also is fixed using "RunActionListAsset". For some reason, RunActionList didnt (may be it would if i was calling for inscene actionlists instead of actionlistasset) work for me (though again, i just copy pasted from manual).
Comments
I got a local variable (integer) i want to show in the scene. But when i use Labels (menu) , it only checks global variables.
So, is there a way to connect Localvariables ([localvar:x]) to gameobject text fields (in scene)? (In this new UI TEXT video they are attaching script. This is what im after for this particular question)
If you link it to AC's Menu system, you can use the Variable: Set Action to set a Global string to the value of the input box. But to do it through script (so that you can also affect Local variables), check section 12.6 of the manual - that gives a list of script functions you can use to read/write variables through code.
I'll start learning c# little by little thanks.
What i mean, with the current Ui interface we can add game objects on to "on click" list and there are some options which might be useful for firing the action list.
error CS0117: `AC.AdvGame' does not contain a definition for `RunActionList'
when im trying to call for
AC.AdvGame.RunActionList (ActionListAsset actionListAsset);
----------------------------
[SerializeField]
private Button MyButton = null; // assign in the editor
void Start()
{
MyButton.onClick.AddListener(() => { PlayerMenus.SimulateClick (main_menu, button_red, 2); });
}
Gives this error
error CS0103: The name `PlayerMenus' does not exist in the current context
Also, what does slot stand for?
A popup's value can be found with:
AC.GlobalVariables.GetVariable (xx).GetValue ();
Just so you're aware, you can easily link a UI button to an ActionList by declaring it in the Menu manager.
I'm aware but i got curious and tried my hands on Unity Ui for a change. I did manage to achieve what i want though so it was fruitfull.
As for AC.PlayerMenus : I just copy pasted from the manual (page 121), and it seems to miss AC. before playermenus (My manual version is v1.41)
Also about the previous error which was
error CS0117: `AC.AdvGame' does not contain a definition for `RunActionList'
This also is fixed using "RunActionListAsset". For some reason, RunActionList didnt (may be it would if i was calling for inscene actionlists instead of actionlistasset) work for me (though again, i just copy pasted from manual).
I should check a bit more before asking again.
Thanks a lot Chris.