Quantcast
Channel: Questions in topic: "build"
Viewing all articles
Browse latest Browse all 4084

OnCollisionEnter Not Working After Game Build

$
0
0
This code works great in the editor, but after I build the game (I've tried building both standalone and web applications) the OnCollisionEnter function no longer runs. If it works correctly, when the player runs into a monster the game ends. Here's the code: void OnCollisionEnter(Collision collision) { if (this.tag == "Player" && collision.collider.tag == "Monster") { game.gameOver (); } } Any ideas on why this wouldn't work after the build?

Viewing all articles
Browse latest Browse all 4084

Trending Articles



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