How To Convert Javascript to C# In Unity – Crash Course Tutorial




http://jvunity.com :: Jimmy gives a crash course on the subtle differences between Js and C# in Unity and how you can better yourself by changing to C#. Consider Supporting @ http://patreon.com/jimmyvegas

Follow us on Twitter: https://twitter.com/jimmyvegas17

Join us on Facebook: https://www.facebook.com/jimmyvegas3d
Our Website: http://jvunity.com

Original source


5 responses to “How To Convert Javascript to C# In Unity – Crash Course Tutorial”

  1. import UnityEngine.UI;

    var cleanValue : int;
    var dirtyValue : float;
    var textDisplay : GameObject;

    function Start () {
    textDisplay.GetComponent.<Text>().text = "Clean or Dirty";
    cleanValue = 6;
    ChangeValues();
    }

    function ChangeValues () {
    yield WaitForSeconds(2.4);
    dirtyValue = 7.3;
    }

Leave a Reply