'On unity i got a error with the camera if you know how to fix it please tell me
Here is the picture of what i mean here is the error
Here is the list of components it has with the code i made
here is the code for the ones that wanted:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JumpTrigger : MonoBehaviour
{
public AudioSource Scream;
public GameObject ThePlayer;
public GameObject JumpCam;
void OnTriggerEnter () {
Scream.Play ();
JumpCam.SetActive (true);
ThePlayer.SetActive (false);
StartCoroutine (EndJump ());
}
IEnumerator EndJump() {
yield return new WaitForSeconds (6.06f);
ThePlayer.SetActive (true);
JumpCam.SetActive (false);
}
}
Solution 1:[1]
The Camera object has been disabled in the hierarchy. Click it and enable its checkbox in the inspector window.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sven Viking |
