vendredi 5 août 2016

How to use compact if operator for this statement in Unity c#

public bool printInConsole;

void Start()
{
    if ( printInConsole ) Debug.Log("Starting and printing...");
}

I whant to call a Unity function using the compact ? ternary operator.
How do I write a statement for this in Unity using C#?

Aucun commentaire:

Enregistrer un commentaire