Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

BuildPipeline.BuildPlayer problem

Discussion in 'Scripting' started by Lugzan, Sep 3, 2008.

  1. Lugzan

    Lugzan

    Joined:
    Mar 6, 2008
    Posts:
    9
    I am trying to use BuildPipeline.BuildPlayer to make a build of my project but the player it produces is not working:

    First, the player starts in the scene that was opened in Unity at the time of the build instead of the scene with level index 0.

    Secondly, the player cannot change scenes. The Application.loadedLevel value is increased as expected, but it stays in the current scene.

    I was wondering if anyone has successfully made a build with BuildPipeline.BuildPlayer?
     

    Attached Files:

  2. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
  3. Lugzan

    Lugzan

    Joined:
    Mar 6, 2008
    Posts:
    9
    The array was not empty after all, but I just got it all working by prepending the path to the scene files with "Assets/"

    Feature request: Print out a warning if any of the levels to build could not be found on disk! :)

    PS: Grats on post #1000!
     
  4. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
    Doh, I admit that that's uncharacteristically bad API behavior on our part!

    d.