Quantcast
Viewing all articles
Browse latest Browse all 2891

How to press a button and make it open a canvas? i have the code with errors, Please Help!

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityStandardAssets.Characters.FirstPerson; public class OptionsMenuScript : MonoBehaviour { public Transform canvas; public Transform Player; public void Options (); { if (Input.GetButtonDown); } { if (canvas.gameObject.activeInHierarchy == false) { canvas.gameObject.SetActive (true); } else { canvas.gameObject.SetActive (false); } } } I Dont Know How To Fix this i have 3 errors that are Primary Constructor Body Is Not Allowed 2x and Primary Constructor already has a body...

Viewing all articles
Browse latest Browse all 2891

Trending Articles