Issues when building regarding collisions?

Updated on October 12, 2018 in [A] Brackeys Courses
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
2 on October 11, 2018

When building the demonstrated dodging game from the Brackeys “How to make a Video Game” playlist, I created the obstacles that are supposed to cause the level to restart, but when I do a build of the game, it isn’t recognizing the obstacles on my desktop.  It still recognizes the collision in the Unity interface itself.  Is there some option in builds that is preventing my obstacles from being collided with properly that maybe I’m overlooking?  Is this an issue somebody else dealt with that might be able to assist me?

  • Liked by
Reply
1 on October 11, 2018

Ohh that seems to be the same issue that I encountered too and still am.

I already found out that the problem is, that the tag list shifts about one tag. So if you use collision detections with tags on the game object, the tag on the game object is another one that you tagged on it.

For example: The tag list is: “Untagged”, “Player”, “Enemy”, “Ground”. Then if you build the game, I think the “untagged” tag is gone and the list shifts with one count down. So your player tag index is not 1 anymore, but 0. That’s why every collision you setup with tags fails to work as they should.

So the only way I found to avoid it, is not to use tags. Perhaps somebody else know the problem too and also a better solution?

 

on October 12, 2018

That is an interesting idea, if albeit a super annoying one.  I’ll find a different way to distinguish the obstacles and try it that way.  I did find that when I switch build settings (for instance, I want to make casual games for Facebook, so I’ve been working on figuring out all the problems that go with that, but I also want to make some casual games for Android/iOS so I’ve been switching the builds when I want to test touch screen access), that my buttons for one reason or another don’t work.  The fix for those is simply duplicating and deleting the old copies of the buttons, and then everything works fine again.  Just seems like a super annoying thing to do for Unity to need that kind of fix. 

Show more replies
  • Liked by
Reply
Cancel