October 2017
Intermediate to advanced
548 pages
13h 23m
English
The PictureController will expose a method, SetImage(), that takes a game object as a parameter using a texture that should be in the picture. And while you're at it, also add the IMAGE command to activate the menu from the toolbar, and handle saving the initial texture to Cancel, as we just did for Frames.
Make the following additions to the PictureController.cs script:
File: PictureController.cs
At the top of the class, add a public variable for the imageMenu and a private variable for the image renderer:
public GameObject imageMenu;
private Texture startTexture;
private Renderer imageRenderer;
In the Start() function, initialize the imageRenderer:
Transform image = framedImage.Find("Image"); imageRenderer ...Read now
Unlock full access