Search Unity

(SOLVED) Problems with build and run (program works fine within Unity)

Discussion in 'Editor & General Support' started by flannegeddes, Apr 25, 2016.

  1. flannegeddes

    flannegeddes

    Joined:
    Mar 10, 2016
    Posts:
    9
    Hi everyone,

    When I run my "game" within unity it seems to run fine. However when I build and run the game while it appears to work (it launches, the menu buttons and start buttons work..) it doesn't seem to launch any of the game code.

    Because it works fine within Unity I'm thinking I am just missing some aspect of the build process. I only have one scene in the "game" and it is selected, so I'm not really sure what else could be the problem. Any help would be greatly appreciated.

    I am currently using version 5.3.2f1 which I upgraded to in order to use the Oculus Rift DK2 which I need to use for this project (my thesis project). the problem occurs whether or not i have the VR support toggle checked or not. For all intents and purposes ignore the VR element (as it is a 2 dimensional "game" anyway).


    Here are three photos of the program running within Unity, and then three photos of what happens when I attempt to build the program:





    and then three where i have built the exe and it does not run correctly:





    Also here is the log:
    The last section with Tag: green is not defined" repeats until the program is terminated.

    I am really at a loss here, and am wildly behind schedule :( Any help or advice would be greatly appreciated!
     
  2. flannegeddes

    flannegeddes

    Joined:
    Mar 10, 2016
    Posts:
    9
    I don't know if this is intentional or not, but it appears when you export a package, tags are not included and obviously if they are used in the code then it will fail when they are called. Although I am still not sure I understand why it will run within Unity ok.