Search Unity

Unity Won't Build my Game

Discussion in 'Editor & General Support' started by Joey_Thiesen, Jan 16, 2012.

  1. Joey_Thiesen

    Joey_Thiesen

    Joined:
    Nov 25, 2011
    Posts:
    65
    It says I have scripts with console errors. Everything works fine while running in Unity. What's wrong?
     
  2. roto23

    roto23

    Joined:
    Oct 30, 2009
    Posts:
    240
    You need to post the error message. It will give the file and line number as well
     
  3. Joey_Thiesen

    Joey_Thiesen

    Joined:
    Nov 25, 2011
    Posts:
    65
    Error building Player because scripts had compiler errors
    UnityEditor.HostView:OnGUI()

    I have no idea what that even is.
     
  4. roto23

    roto23

    Joined:
    Oct 30, 2009
    Posts:
    240
    When you try to run the game, its throws that error. look at the bottom of your screen, there will be a detailed error message with a file name and line number. Post that info.
     
  5. Joey_Thiesen

    Joey_Thiesen

    Joined:
    Nov 25, 2011
    Posts:
    65
    What I'm trying to say is that there are no errors and everything works fine. I only get that when I try to build.
     
  6. roto23

    roto23

    Joined:
    Oct 30, 2009
    Posts:
    240
    Are you building for the web? If so try building a standalone. I thought there might be a build log that would provide more clues.
     
  7. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    That error seems to occur when you try including a dynamically linked library into a webplayer build, or when the wrong .NET version is selected for the standalone player.
     
  8. Joey_Thiesen

    Joey_Thiesen

    Joined:
    Nov 25, 2011
    Posts:
    65
    I'm building a standalone. So what settings to I need to change to fix this?
     
    tigerleapgorge likes this.
  9. roto23

    roto23

    Joined:
    Oct 30, 2009
    Posts:
    240
    When you go to build, click on the 'Player Settings" button. That will bring up the player settings box, expand the "other setting" area in that box and you will see the "API compatibility level. Select the first one, build it. If that fails, select the next one. Hopefully one of them will work. On my systemI only see two options, .net 2.0 and .net 2.0 subset.

    What add on are you using such that you are referencing a .net dll?
     
    tigerleapgorge likes this.
  10. Joey_Thiesen

    Joey_Thiesen

    Joined:
    Nov 25, 2011
    Posts:
    65
    None of those work. I don't know what add on you think im using.....
     
  11. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I'm getting the same crap when i try to do a test build...
     
  12. roto23

    roto23

    Joined:
    Oct 30, 2009
    Posts:
    240
  13. roto23

    roto23

    Joined:
    Oct 30, 2009
    Posts:
    240
    heatherwiemelt likes this.
  14. pitibonom

    pitibonom

    Joined:
    Aug 17, 2010
    Posts:
    220
    create a folder anywhere called 'editor' and put your scripts with errors in it, and have a good build

    Edit: UnityEditor classes are unavailable when building ( as editor is then useless ).
    Therefore this gens an error at build time
     
    Last edited: Jan 18, 2012
    tigerleapgorge likes this.
  15. Rocketman03

    Rocketman03

    Joined:
    Jul 14, 2017
    Posts:
    23
    highly doubt you still have this problem, but this is for anyone else that sees this. I tried making my build x86 and it took away a bunch of the errors, then removed my prefab brush, then it was good.
     
    tigerleapgorge likes this.
  16. Final_fantasy18

    Final_fantasy18

    Joined:
    Jan 26, 2018
    Posts:
    3
    i had the same problem i change color space into gama building for android. file----player setting--------other setting----- ( then change linear to gamma
     
    tigerleapgorge likes this.
  17. hedidev

    hedidev

    Joined:
    Aug 11, 2019
    Posts:
    2
    Unreal engine doesn't have those annoying errors , try it now ! it's much better than unity
     
    tigerleapgorge likes this.
  18. AcidmanRPGz

    AcidmanRPGz

    Joined:
    Feb 14, 2020
    Posts:
    10
    Really? On a UNITY forum?
     
    aloften likes this.
  19. firestorm185

    firestorm185

    Joined:
    Sep 23, 2014
    Posts:
    24
    Hey guys, if anyone finds this thread while trying to make builds using Unity version 2019.4.0f1
    try going into your player settings, and under "other" look for the scripting backend option. It wanted me to install ILP2CC or however you spell it at first, and then when I would build for standalone it would never export anything to my hard drive to test. Turns out that's the wrong scripting backend entirely. Change that option to "Mono" and it should build just fine! (as long as you don't have any other issues, of course. That's what fixed it for me)
     
    aloften likes this.
  20. nonoj5386

    nonoj5386

    Joined:
    Aug 15, 2020
    Posts:
    1
    then why are you here?
     
    aloften likes this.
  21. Phenix_eye

    Phenix_eye

    Joined:
    Jul 21, 2020
    Posts:
    7
    Thanks, this did the trick for me.
     
  22. chewey1239

    chewey1239

    Joined:
    Sep 17, 2020
    Posts:
    1
    thanks. only helpful thing on the thread. was searching for hours for answer
     
  23. unity_990479384E069A76E036

    unity_990479384E069A76E036

    Joined:
    Oct 13, 2021
    Posts:
    1
    I was having issues with a build and was left with no errors - only the *ding* sound that indicated the build did not work. I created a backup of my project by making an export of my assets, created a new project with the same name but version 2 at the end so I knew the difference, and imported the just-created assets from my first project, tested to make sure it worked, then did a new build with the new version 2 project. That seemed to work for me.
     
  24. RAD_MOUSE

    RAD_MOUSE

    Joined:
    Dec 17, 2022
    Posts:
    1

    Will this only work if you script in C++ or like scripting in C# is fine