Unity Instance Name





using UnityEngine;
using System.Collections;
public class HelloWorld : MonoBehaviour
{
public GameObject ip1;
public GameObject ip2;

    public string myText;
    //Use this for initialization
    void Start()
    {  //diajalankan saat pertama kali aplikasi dijalankan
        Debug.Log("Welcome Lp2maray");
myText = "HALO APA KABAR TEMAN....";
    }
    //Update is called once per frame
    void Update()
    {  //dijalankan terus selama aplikasi aktif

    }

    void OnGUI()
    {  //saat berhasil membentuk GUI / pertama kali dijalankan
        GUILayout.BeginArea(new Rect(10, 10, 200, 200));  //lokasi label myText dari GameObject
        GUILayout.Label(myText);
        GUILayout.EndArea();
    }


public void pindah(){
Application.LoadLevel (1);
myText = "HALO APA KABAR TEMAN";

}
}

/*
  using UnityEngine;
 using UnityEngine.UI;
 using System;

 public class InputFieldOperations : MonoBehaviour {

     public InputField Field1;
     public InputField Field2;
     public Text Result;

     public void Sum() {
         int a = Convert.ToInt32(Field1.text);
         int b = Convert.ToInt32(Field2.text);
         int c = a+b;
         Result.text = c.ToString();
     }


     public void Product() {
         int a = Convert.ToInt32(Field1.text);
         int b = Convert.ToInt32(Field2.text);
         int c = a*b;
         Result.text = c.ToString();
     }

 }
 */

Penentuan nilai 0 atau 1 adalah sesuai build setting registernya





Unity Instance Name Unity Instance Name Reviewed by ADIARRAY on 04.41 Rating: 5

Tidak ada komentar:

Diberdayakan oleh Blogger.