Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Problem Building Game (Newbie help)

Discussion in 'Open Projects' started by GPG, Aug 21, 2021.

  1. GPG

    GPG

    Joined:
    Feb 22, 2013
    Posts:
    13
    Hello I'm pretty new to this project and I've changed a few things, mostly cleaning up dialogue and placing a few enemies, nothing major. The game runs well in unity itself, but when I build the game, I suddenly get errors and can't even get the game to run it just black screens. Any idea what I could be doing wrong? Sorry if this is an obvious fix.
     
  2. Harsh-NJ

    Harsh-NJ

    Joined:
    May 1, 2020
    Posts:
    315
    Have you build the addressables content? Because you haven' t builded it, all the location scenes aren't in the build. Hence the black screen.

    If you have any problems feel free to ask.

    Thanks.
     
  3. GPG

    GPG

    Joined:
    Feb 22, 2013
    Posts:
    13
    Hey thanks, I can't believe I missed something so basic, although now the game runs, but now the game freezes on an image of the sea.
     
  4. Harsh-NJ

    Harsh-NJ

    Joined:
    May 1, 2020
    Posts:
    315
    Can you do some debug build. So that you can see the errors in the console? And screenshots please.
     
  5. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    You mean in the build? I just built the game and it works. Like Harsh suggests, can you make a Development build and see what it pops up?

    Another thing to try is to clear the build cache before building. In the Addressable Groups window, choose Build > Clean Build All, and then kick off a clean build (first content from there, then the game).
     
  6. GPG

    GPG

    Joined:
    Feb 22, 2013
    Posts:
    13

    Hey thanks for your response I really apricate it, I followed your steps but still have the same error, even with a fresh build, I get stuck looking at the ocean, no errors just stuck.

    Screenshot of what's happen to show what's happening, this is a development build and it's debugged


     
  7. Harsh-NJ

    Harsh-NJ

    Joined:
    May 1, 2020
    Posts:
    315
    It seems like that the "scene loading - spawn system - camera framing system" is somehow broken inbetween, but where? The camera is stuck looking at the ocean, maybe player hasn't been spawned, or something else, check that in the development build, using logs.
    And
    Whats with the second image, maybe it is not uploaded properly?

    Thanks, and feel free to ask for any kind of help in doing the above.
     
  8. GPG

    GPG

    Joined:
    Feb 22, 2013
    Posts:
    13
    Here's the most confusing thing, if I run the game in unity, doing a test play, everything runs fine, its only when I build it that I get this error. Which is making it very hard to figure out what exactly is happening, even with a fresh build this keeps happening, I'll try a fresh download of the project and see if that helps.

    The second image is just the first image, I will just delete that now!
     
  9. Harsh-NJ

    Harsh-NJ

    Joined:
    May 1, 2020
    Posts:
    315
    The thing is, this is only happening on your computer, so you have to figure out exactly where the bug is. Can you see the console logs in the development build? If yes, see if the player is spawned or not?

    Thanks
     
  10. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    To run a more in-depth test in the editor, try this: Build the Asset Bundle content from the Addressable window like you would, and then, switch the Play Mode Script to Packed Play Mode. That would make a real simulation of how the content is loaded in the build. (more details here: https://docs.unity3d.com/Packages/c...AssetsDevelopmentCycle.html#play-mode-scripts)

    If that works, then I don't know... there's something in your build that breaks. But no errors in the console?