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

Getting Error: 'Time' does not contain a definition for 'timeScale'

$
0
0
So I was working on a different script when this error popped up, I didn't even save the script and the error popped up. I am trying to figure out why it is wrong because it worked before and everyone else's is working fine. Here is the script with the error using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UnityStandardAssets.Characters.FirstPerson { public class PhoneSystem : MonoBehaviour { public GameObject phonePickedUp; public GameObject phoneCanvas; public bool phoneUp = false; public GameObject player; // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.E)) { if (phonePickedUp.GetComponent().phone == true) { if (phoneUp == false) { Time.timeScale = 0; phoneCanvas.SetActive(true); player.GetComponent().PlayerStop(); phoneUp = true; } else { Time.timeScale = 1; phoneCanvas.SetActive(false); phoneUp = false; Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } } } } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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