Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Type or namespace definition, or end-of-file expected error wont go away

$
0
0
my code is this using System.Collections; using System.Collections.Generic; using UnityEngine; public class GunToggle : MonoBehaviour { public GameObject Gun; public GameObject Grapple; // Update is called once per frame void Update() { // Reverse the active state every time escape is pressed if (Input.GetKeyDown(KeyCode.Z)) { // Check whether it's active / inactive bool isActive = Gun.activeSelf; Gun.SetActive(!isActive); } // Reverse the active state every time escape is pressed if Gun.SetActive(true); { Grapple.SetActive(false); } if Gun.SetActive(false); { Grapple.SetActive(true); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>