Add text message with condition

I’d like to know how to add a text message if something happens (i don’t want a fixed text message).
I also would like to know how to add a extrusion effect in the text.

By text message do you mean text on screen?

add this to the script you want to do this for.

private string textToDisplay = "test text"

void OnGui()
{

    if(conditionA == conditionB)
    {
        GUI.Text (Rect (10, 10, 100, 20), textToDisplay);
    }
}

public void SetText(string text)
{
    textToDisplay = text;
}

Whenever you want to change the text just call “ChangeText()”

For more information on playing around with unity text take a look at

http://docs.unity3d.com/Documentation/ScriptReference/GUIText.html

How is the code in C#?

That is C# :slight_smile:

Nice shit i’ve said hahahaha