Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class NewBehaviourScript : MonoBehaviour {
- GameObject Player;
- UILabel Script;
- int i = 0;
- void MyClick()
- {
- Player = GameObject.FindGameObjectWithTag("Player");
- Script = Player.GetComponent<UILabel>();
- if (i == 0)
- {
- Script.text = "AA";
- i = 1;
- }
- else
- {
- Script.text = "BB";
- i = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment