Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Build problem

Discussion in 'Editor & General Support' started by Omar Rojo, Sep 10, 2007.

  1. Omar Rojo

    Omar Rojo

    Joined:
    Jan 4, 2007
    Posts:
    494
    I am having troubles with my game.. is making me nuts!

    The game behave correctly in the editor player, but somehow, the builds (windows, mac ub, webplayer) are not working well, some behaviors stop working so you can not advance in the game, and the player ended up crashing firefox and internet explorer.

    :(

    Im really clueless about this, and is the game for the TOP DOG contest, so im scared to death since i cant present my game like this! ill get 10 points only in the HOW-TO-NOT-CREATE-A-GAME criteria. :(

    Please help, i don't know what kind of info to write since i don't know what is causing the problems.. i repeat, in the editor the game behave as expected.

    .ORG
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    The very first thing to check: when playing in the editor, are there any errors reported in Unity's console?
     
  3. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    I have had unexpected behavior that only came into being upon building as well. This was without any generation of errors. It makes no sense that this would work, but you might want to try it, because it worked for me:

    Create a new project and import all of the assets from your old project into it.
     
  4. Omar Rojo

    Omar Rojo

    Joined:
    Jan 4, 2007
    Posts:
    494
    Nothing at all, that is what i first checked too.. that is why is weird..


    Ill try that, thanks, ill post the results as soon as i can (im at work right now)


    thanks..

    .ORG
     
  5. Omar Rojo

    Omar Rojo

    Joined:
    Jan 4, 2007
    Posts:
    494
    I found the bug!

    It happen to be that two cameras were with the same tag.. MainCamera! and in the editor player the right camera was returned, but in the build, the incorrect camera was returned by Camera.main..

    So, some behaviors in the right camera would not exists in the incorrect.. and that was the bug. The incredible thing is that this didnt happened before, and this configuration was from the very beginning of the project!

    Thanks for the replies..


    .ORG
     
  6. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    This very well may have been my issue too. I will keep it in mind in the future if similar problems arise. Thanks for sharing!