I keep getting the error “The type ‘Cameras’ already contains a definition for ‘Camup’” how do i fix
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Cameras : MonoBehaviour
{
public Camera office;
public Camera camera1;
public Camera camera2;
public Camera camera3;
public Camera camera4;
public Camera camera5;
public Camera camera6;
public Camera camera7;
public GameObject CamUp;
public GameObject CamDown;
// Start is called before the first frame update
void Start()
{
office.gameObject.SetActive(true);
camera1.gameObject.SetActive(false);
camera2.gameObject.SetActive(false);
camera3.gameObject.SetActive(false);
camera4.gameObject.SetActive(false);
camera5.gameObject.SetActive(false);
camera6.gameObject.SetActive(false);
camera7.gameObject.SetActive(false);
CamUp.SetActive(true);
CamDown.SetActive(false);
}
// Update is called once per frame
void Update()
{
}
public void CamUp()
{
office.gameObject.SetActive(false);
camera1.gameObject.SetActive(true);
camera2.gameObject.SetActive(false);
camera3.gameObject.SetActive(false);
camera4.gameObject.SetActive(false);
camera5.gameObject.SetActive(false);
camera6.gameObject.SetActive(false);
camera7.gameObject.SetActive(false);
up.SetActive(false);
down.SetActive(true);
}
public void CamDown()
{
office.gameObject.SetActive(true);
camera1.gameObject.SetActive(false);
camera2.gameObject.SetActive(false);
camera3.gameObject.SetActive(false);
camera4.gameObject.SetActive(false);
camera5.gameObject.SetActive(false);
camera6.gameObject.SetActive(false);
camera7.gameObject.SetActive(false);
CamUp.SetActive(true);
CamDown.SetActive(false);
}
}