Forum rules - please read before posting.

Adding a line of text to an action

edited September 2014 in Technical Q&A
Hi!

I'm trying to add a line of text from an Action. I want to add the text directly in the action list, time by time.

I've created the action and I've added the following variable at the beginning:

public string messageText = "";

Then I added the following:
messageText = EditorGUILayout.TextField ("Menu to turn on:", messageText);

Then I can see the TextField and I could add line of text, but the messageText remains empty.

if I try this in the Run method:
Debug.Log(messageText);

it gives me back the empty string.

How can I give a string/line of text to an Action?

Comments

  • What you've shown should be fine.  Post a full copy of the script here (or at least the parts related to this) - need more to see the problem.
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.