Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in ButtonGame.cs
- void Start () {
- Vector3 position;
- for (int i = 1; i < 5; i++) {
- position = new Vector3(Screen.width * 0.2f * i, 100, camera2d.nearClipPlane + 1);
- Instantiate(consoleButton, camera2d.ScreenToWorldPoint(position), Quaternion.identity);
- }
- }
- // then in ButtonTest.cs
- void OnMouseDown()
- {
- Debug.Log("button on mouse down");
- redButton.gameObject.SetActive(false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement