Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Unity Editors crashes after using a button in scene

$
0
0
Hi, My Unity Editor(2019.4.11f1) keeps crashing after I use a button in my scene. Now I don't know why but I'm pretty sure it has to do something with my Game Manager. I also tried using another version of the editor but I get the same problem. Here is my Game Manager Script: { public TextMeshProUGUI CounterText; public TextMeshProUGUI scoreText; private int turn = 0; public static int score; public int scoreValue; public bool isGameActive; public GameObject titleScreen; public Button startbutton; private void Start() { } private void OnTriggerEnter(Collider other) { turn += 1; CounterText.text = "Turn : " + turn + "/3"; score += scoreValue; scoreText.text = "score: " + score; } public void startGame() { isGameActive = true; score = 0; turn = 0; titleScreen.gameObject.SetActive(false); } } Here is the Game Manager's inspector: ![alt text][1] [1]: /storage/temp/177953-game-manager.png I'm making a title screen that i want to deactivate as soon as I click the start button, when I click the button the whole editor freezes. Can anyone make out what is causing that. I'll add the script for my button as well just in case: private Button startButton; private GameManager gameManager; // Start is called before the first frame update void Start() { startButton = GetComponent

Viewing all articles
Browse latest Browse all 2383

Trending Articles



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