So I have got two scene change scripts, both which are attached to two different game objects. But for some reason, one script affects both game objects. So I am trying to temporarily disable one of the scripts when the other script is active on the other game object. Here is what I have but this is returning the error, “BasketballSceneChange’ is a type, which is not valid in the given context”.
void Update()
{
**GameObject.Find("pPrism1").GetComponent(BasketballSceneChange).enabled = false;**
if (Input.GetMouseButtonDown(0) && SceneManager.GetActiveScene().name == "MWalk")
{
SceneManager.LoadScene("SWalk");
}
if (Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "SWalk")
{
SceneManager.LoadScene("Football");
}
if (Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "Basketball")
{
SceneManager.LoadScene("BWalk");
}
if (Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "BWalk")
{
SceneManager.LoadScene("MWalk");