Question by
HyperNovaDev · Nov 13, 2021 at 03:14 AM ·
error messageissuenamespacefalse
GameObject not being detected, even though its there............
Assets\Scripts\MenuManager.cs(9,12): error CS0246: The type or namespace name 'OptionsMenu' could not be found (are you missing a using directive or an assembly reference?)
I am receiving the above error in my program, although OptionsMenu is there is the hierarchy... What could I be doing wrong? Here is my script and some info.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MenuManager : MonoBehaviour
{
public OptionsMenu optionsMenu;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
optionsMenu.gameObject.SetActive(!optionsMenu.gameObject.activeSelf);
}
}
}
alt text
tjjnrtghatqte.jpg
(218.7 kB)
rqeg.jpg
(161.8 kB)
Comment