October 2017
Intermediate to advanced
548 pages
13h 23m
English
The Frame menu should not be visible until the user activates it. We can add this command to the PictureController and activate it from the toolbar. Add the FRAME command to PictureController script, as follows:
File: PictureController.cs
At the top of the PictureController class add a public variable for the frameMenu as follows:
public GameObject frameMenu;
In its Execute() function's switch statement, add:
case PictureCommand.FRAME:
OpenFrameMenu();
break;
Then add the action function:
private void OpenFrameMenu() {
frameMenu.SetActive(true);
}
Save the file. Now go back to Unity:
Read now
Unlock full access