Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Roll a Ball Building on Windows Problem

Discussion in 'Getting Started' started by GuiPax, Nov 11, 2017.

  1. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    Hi guys,

    I'm new using Unity, so I need your help. I'm using Personal Unity software.
    I followed all "Roll a Ball" tutorial and I did everything like it says and the game is working perfect, but when I try to build it for Windows, it shows 9 errors. See below the printscreen of the erros.
    upload_2017-11-11_16-10-36.png
    Can someone help me and say what is going wrong with it? How can I fix it?
    Thank you!!!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    5,830
    Double-click the first error in the list. What do you see?
     
  3. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    Hi... When double-click the first error, it opens the script like this.
    upload_2017-11-12_14-30-11.png
     
  4. RichAllen2016

    RichAllen2016

    Joined:
    Jul 19, 2016
    Posts:
    101
    At the risk of being flamed for pointing out the painfully obvious, did you type in the code for the scripts exactly as shown on the tutorial? If there's errors in the code it'll not work.

    Just a suggestion :)
     
  5. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    I belive so. That is why the game is working perfectly like I said.
    My problem is when I'm trying to build it for windows.
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    5,830
    Hmm, your script looks correct to me. It sounds like your installation of Unity does not have the Windows build target properly installed. I'd run the installer again, and be sure you've selected Windows builds as one of the components to install.
     
  7. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    Yes! This is my tought! I will try it and see what happen. Thank you for your help.
    In case it doesn't work I'll come here again. Hahaha..
     
  8. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    Hey again... I unstalled and I installed again and the errors still happening...
     
  9. nat42

    nat42

    Joined:
    Jun 10, 2017
    Posts:
    254
    Fairly new to Unity myself (but not to coding), but I think the consensus is that the errors you are getting are spurious. I had some trouble with Visual Studio and Unity initially, but it was fixed by restarting.

    If you haven't done alot, I suggest trying a new project and copying over the assets (but not the meta files, etc), at the very least this would ensure you are getting a fresh build (there is surely other ways to do so, but I'm guessing you don't have enough content to worry about finding a sharper solution)
     
  10. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    5,830
    I'd go even farther: start a new project, do nothing to it, and try to build for Windows.

    You might also need to contact Unity support directly. This is pretty clearly a bug in Unity.
     
  11. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    That is another question that I have. When I started using Unity, it was opening Visual Studio to script, because the tutorial doesn't use Visual Studio, I deleted it and stat using the other program. Is there any difference between visiual studio and the orther program? Which one do you think is better?

    Thank you for you help!
     
  12. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    I tryed it and it didn't work. I got 3 errors.
     
  13. nat42

    nat42

    Joined:
    Jun 10, 2017
    Posts:
    254
    I choose to use Visual Studio because it's something I already had installed and happens to be my preferred IDE generally. This also means I can't comment on how it compares to MonoDevelop as I haven't tried/considered it personally. I'd probably expect they are both reasonable options.
     
    JoeStrout likes this.
  14. GuiPax

    GuiPax

    Joined:
    Nov 11, 2017
    Posts:
    8
    Do you believe that is possible that this errors are happening because of MonoDevelop?
     
  15. nat42

    nat42

    Joined:
    Jun 10, 2017
    Posts:
    254
    I really don't know (and to that extent I wouldn't rule it out, but this does not mean I think it's necessarily likely either) sorry.

    My guess would be that Unity uses the IDE for edtting and debugging and builds the target using it's own copy of the Mono compiler/build system. Perhaps I'd concede that it may (no idea how likely) be a possibility that installing MonoDevelop after Unity might have changed a config somewhere? Possibly the Editor log as described here: https://docs.unity3d.com/Manual/LogFiles.html might contain more info about the build process? (if you post your copy of the log to this or another forum for specific support, and if the latter please consider a thread title that suggests build issues, please be sure to remove personal info - looking through my copy I see stuff like my email address and Windows Username)
     
  16. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    5,830
    No. Whatever editor you choose is not involved when Unity builds.

    Have you contacted Unity tech support yet?
     
  17. juddk1986

    juddk1986

    Joined:
    Nov 18, 2017
    Posts:
    5
    I'm getting the same error. Game runs fine, all code is correct but get errors when trying to build. Did you find a solution yet?