The PictureAction component, which should send an action-command to the PictureController when clicked will be added to the object. Create a new C# script in your Scripts folder named PictureAction and open it for editing. You will see the following:
File: PictureAction.csusing UnityEngine; using HoloToolkit.Unity.InputModule; public class PictureAction : MonoBehaviour, IInputClickHandler { public PictureCommand command; protected PictureController picture; void Start() { picture = GetComponentInParent<PictureController>(); } public void OnInputClicked(InputClickedEventData eventData) { picture.Execute(command); } }
The PictureAction responds to OnInputClicked events. Using a HoloLens, these events are generated when ...