October 2017
Intermediate to advanced
548 pages
13h 23m
English
Open the ClickableObjects.cs script and modify it to use mouse events so that it reads as follows:
File: ClickableObjects.csusing UnityEngine;
using UnityEngine.Events;
public class ClickableObjectEvent : UnityEvent<GameObject> { }
public class ClickableObject : MonoBehaviour {
public ClickableObjectEvent OnClickableObjectClicked = new ClickableObjectEvent();
void OnMouseDown() {
GameController.instance.PlayClickFeedback();
OnClickableObjectClicked.Invoke(gameObject);
}
}
If you press Build And Run now, much of the UI should work correctly! We need to make further changes to the Move and Scale tools.
Read now
Unlock full access