• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Carwashh · Apr 17, 2014 at 03:15 PM · collison

Collisions not working when game built, but works fine in the editor

Hi,

I'm making a puzzle game, where the gamer has to get the player safely from the start to the exit by placing waypoints and then pressing 'Go'. On the level there are zombie heads (ie: stars) to collect, w$$anonymous$$ch when the player touches them there's a particle effect and the game object is destroyed.

T$$anonymous$$s worked perfectly in previous builds.
T$$anonymous$$s works perfectly in the editor with the current build.
T$$anonymous$$s, now, does not work at all if I build it to the webplayer or an exe.

To see the problem, look here: http://enigma23.co.uk/Unity/sz/prototype/2014.04.16_PrototypeBuild11.html

  1. Click 'Play'.

  2. Click 'Normal'.

  3. Select Level 1.

  4. Put down a single waypoint on the exit (left mouse click on the exit).

  5. Press 'Go'.

  6. Player $$anonymous$$ts the zombie head as though it's a wall, instead of collecting it.

Recent Changes
1- I activated the 30 day trial of Unity Pro yesterday (needed it for another project), up until then I was (and will be again) using Unity free.

2- I've swapped from Monodevelop to Visual Studio 2013 for my IDE, and get warnings about line endings being different between Windows/ UNIX/ Mac (I sometimes dev on a Mac at work).

Fix Attempts
1- I've gone through all of my scripts (not any plugin scripts), to stop the inconsistent line endings warning from happening.

2- Updated to the latest version of Unity (4.3.4f1).

3- Rebooted.

4- Tried to build on a Mac.

Questions
I haven't a clue where to start looking to fix t$$anonymous$$s issue, as up until a few days aog everyt$$anonymous$$ng was fine - and I haven't touched t$$anonymous$$s area since implementing it months ago.

1- How do I go back to Unity free now? (so I don't have to wait for pro to expire)
2- What's the difference between the editor and the web/ exe builds?
3- Why would the collisions work ok in one and not the others?
4- How do I even go about fixing t$$anonymous$$s?

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Carwashh · Apr 17, 2014 at 04:11 PM 0
Share
avatar image ilovebatcatstew · Jun 29, 2015 at 03:59 PM 0
Share
avatar image Carwashh · Jun 29, 2015 at 07:12 PM 0
Share

8 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by andrew_196 · Apr 17, 2014 at 06:48 PM

have you tried to launch/build as a development build and run a:

 Debug.Log("Debug here");

to see if it is the function or the trigger?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Carwashh · Jan 02, 2021 at 01:27 PM 0
Share
avatar image
3

Answer by Shinugami · Apr 28, 2015 at 03:55 PM

I also was unable to use the mouse during build version of my game. In the editor it worked fine. What was happening was that I had Unity crash at one stage. I've had t$$anonymous$$s problem before so I was aware of how to fix it. If I look at the 'output_log.txt' in the build folder when using debug mode for the build, it says that some tags do not exist.

For example: "UnityException: Tag: Food is not defined."

When unity crashes, for some reason it wipes the tag list. You can select the drop down menu and they are all there HOWEVER if you do 'add new tag' then the truth is revealed and here we can see that the tag list is actually empty. I'd say t$$anonymous$$s is a unity bug as it shows the tags when you casually use the drop down menu for 'add tag to object' however when you go to actually add a new tag to the tag list there are NO tags at all.

I restored those tags and re-assigned them to the correct objects. T$$anonymous$$s fixed the issue and the mouse functioned in the build mode as expected.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image gwynblade · Jan 27, 2019 at 08:09 AM 0
Share
avatar image
3

Answer by maftkd · Jan 09, 2018 at 11:10 PM

I had a similar issue with triggers being detected fine in unity editor, but triggers not being detected in final builds.

I understand t$$anonymous$$s thread is old, but perhaps one person may come across t$$anonymous$$s in the future. And that one person may have the same peculiar setup as I did, and therefore t$$anonymous$$s comment may be beneficial.

Ok so. My deal was I had my trigger objects as c$$anonymous$$ldren of a parent container. That parent container just so happened to be Canvas / GUI container. Unity did not like t$$anonymous$$s. It said hey, we know you are used to your triggers being right here, but when you build it, we are going to place them elsewhere since t$$anonymous$$s seems like it's just part of your GUI.

My fix: Remove the c$$anonymous$$ldren, place them under a plane ol' empty game object, and adjust the connections between the objects accordingly.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Carwashh · Apr 17, 2014 at 08:23 PM

I hadn't thought about using a development build, nor did I really know what it does.

The problem was that the materials for the detonator explosion had lost the connection to the detonator. The Unity editor added them automatically when instantiating the object, whereas the build wouldn't.

Re-adding these to the prefab fixed the problem. Thank you so much!

Some additional information, w$$anonymous$$ch I had to go searc$$anonymous$$ng for as I didn't know what I was doing:

The console output is dumped to the file _Data/output_log.txt

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image andrew_196 · Apr 18, 2014 at 05:58 AM 0
Share
avatar image
0

Answer by Amjad_Mohamed · Mar 01, 2020 at 01:58 PM

Hey from the future. I had the same problem with my trigger and found out that the t$$anonymous$$ng that caused my problem was that I changed my collider tag and deleted the old one, but that caused Unity for some reason to not detect the new one after the build. To fix that I had to close Unity and open it again to get the deleted tag out of the list and after that I built it again aaand it worked :).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

29 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Raycast and actions. 1 Answer

Rectangular Cube is sinking in floor rotating at 90 degree 0 Answers

Detecting when certain objects have been destroyed 2 Answers

How to detect the angle off the collision with an array (or collider)? 1 Answer

2D Collision Between Two Objects 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges