PictureAction component

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 ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.