Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Bouton : MonoBehaviour {
  5.  
  6. void OnGUI() {
  7. CreateBox mystuff;
  8. if (GUI.Button(new Rect(10, 70, 50, 30), "Click")){
  9.  
  10. Debug.Log("Clicked the button with text");
  11. mystuff = gameObject.GetComponent("CreateBox") as CreateBox;
  12. mystuff.doNothing();
  13. }
  14.  
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement