Quantcast
Channel: Answers by "ransomink"
Viewing all articles
Browse latest Browse all 80

Answer by ransomink

$
0
0
On which line is the null reference exception? That'll tell us what variable to look for. It seems *resetCol* could be null because you say the array is empty. This is because *resetCol* must have the same length as *colliders*, if it doesn't, then not all or any of the collided game objects will copy to the array. You have to set the length of the array first then copy it over resetCol = new Collider[ colliders.Length ]; resetCol = colliders; - Also, use `if (collider.CompareTag( "Enemy" ) ) ` instead of *.tag*. It is much more efficient...

Viewing all articles
Browse latest Browse all 80

Trending Articles



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