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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Build 2 Scenes

Discussion in 'Editor & General Support' started by Teilor111, Jul 21, 2016.

  1. Teilor111

    Teilor111

    Joined:
    May 22, 2016
    Posts:
    7
    Hi, I have little question. I want to build game, which have 2 scenes. Main menu and Scena_1.
    In build setting I added both scenes but after build I turn on game and I see only Main Menu scene (Scena_1 not exist in game). Could you tell where is the problem?
    Thanks!

     
  2. Mr-GamingWatch

    Mr-GamingWatch

    Joined:
    Jan 17, 2015
    Posts:
    29
    When you say "I see only Main Menu scene," what do you mean?

    I'm not sure how you've got your scenes set up, but have you got a proper method in place for loading the other scene or transitioning between them?

    "MainMenu" is going to be your default scene, and from there you would have a button load the other scene for you.
     
  3. Teilor111

    Teilor111

    Joined:
    May 22, 2016
    Posts:
    7
    In MainMenu scene I have button, which switch to 2nd scene with code:

    Code (CSharp):
    1.        
    2.   NowaGra.onClick.AddListener(Button_load_game);
    3.  
    4.  
    5.   void Button_load_game()
    6.   {
    7. Application.LoadLevel("Scena_1");
    }

    After build I open game, I click this button and my game is close (does not change the scene).
    But... When I tested this button in Unity Editor works fine.
    Where will be problem?
     
  4. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    882
    You will need to check the log file to see what has happened - it might show some info into why it has crashed. The setup you have described sounds correct though. The log file can be found in the ###_Data folder in a Windows standalone build.
     
  5. Teilor111

    Teilor111

    Joined:
    May 22, 2016
    Posts:
    7
    In ###_Data folder I can see only 1 log fine: output_log, but there is no error.


    Code (CSharp):
    1. Initialize engine version: 5.3.3f1 (910d71450a97)
    2. GfxDevice: creating device client; threaded=1
    3. Direct3D:
    4.     Version:  Direct3D 11.0 [level 11.0]
    5.     Renderer: Intel(R) HD Graphics 4600 (ID=0x416)
    6.     Vendor:   Intel
    7.     VRAM:     1792 MB
    8. Begin MonoManager ReloadAssembly
    9. Platform assembly: C:\New_GAME_01\Managed\UnityEngine.dll (this message is harmless)
    10. Loading C:\New_GAME_01\Managed\UnityEngine.dll into Unity Child Domain
    11. Platform assembly: C:\New_GAME_01\Managed\Assembly-CSharp-firstpass.dll (this message is harmless)
    12. Loading C:\New_GAME_01\Managed\Assembly-CSharp-firstpass.dll into Unity Child Domain
    13. Platform assembly: C:\New_GAME_01\Managed\Assembly-CSharp.dll (this message is harmless)
    14. Loading C:\New_GAME_01\Managed\Assembly-CSharp.dll into Unity Child Domain
    15. Platform assembly: C:\New_GAME_01\Managed\Assembly-UnityScript-firstpass.dll (this message is harmless)
    16. Loading C:\New_GAME_01\Managed\Assembly-UnityScript-firstpass.dll into Unity Child Domain
    17. Platform assembly: C:\New_GAME_01\Managed\Assembly-UnityScript.dll (this message is harmless)
    18. Loading C:\New_GAME_01\Managed\Assembly-UnityScript.dll into Unity Child Domain
    19. Platform assembly: C:\New_GAME_01\Managed\UnityEngine.UI.dll (this message is harmless)
    20. Loading C:\New_GAME_01\Managed\UnityEngine.UI.dll into Unity Child Domain
    21. Platform assembly: C:\New_GAME_01\Managed\UnityEngine.Networking.dll (this message is harmless)
    22. Loading C:\New_GAME_01\Managed\UnityEngine.Networking.dll into Unity Child Domain
    23. - Completed reload, in  0.044 seconds
    24. Platform assembly: C:\New_GAME_01\Managed\System.Core.dll (this message is harmless)
    25. Platform assembly: C:\New_GAME_01\Managed\System.dll (this message is harmless)
    26. desktop: 1920x1080 59Hz; virtual: 3456x1080 at 0,0
    27. <RI> Initializing input.
    28.  
    29. <RI> Input initialized.
    30.  
    31. <RI> Initialized touch support.
    32.  
    33. UnloadTime: 0.535763 ms
    34. Setting up 2 worker threads for Enlighten.
    35.   Thread -> id: 1df4 -> priority: 1
    36.   Thread -> id: 1724 -> priority: 1
    37. UnloadTime: 4.880578 ms
    38.  

    It's strange problem. I just open game I can see MainMenu, I click button for start new game (switch scenes), I need wait 2-5 secound and I can see desktop (game is close). In the Unity editor after click this button switch to 2nd scene correctly. I no see errors inb output_logs. I added also to structure 2 scenes (as object) and build again - the same problem :/

     
    Last edited: Jul 22, 2016