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
  4. Dismiss Notice

Building one game, but another loads

Discussion in 'General Discussion' started by xOSSxKratos, Mar 1, 2023.

  1. xOSSxKratos

    xOSSxKratos

    Joined:
    Apr 4, 2021
    Posts:
    11
    So I have a few games all separated in different folders. I have a complete game we will call Completed Game. Then I have another game I am trying to make a build for, we will call this New Game.
    When I make the build for New Game, save it to New games file, then click on the exe. for the New game build. But it opens up the Competed Game. Both separate games in separate folders. I watch the build as its being created and it has all the files of New Game.

    My next step is to remove Completed Game from my pc completely. I have never had this problem with any other games I've made.

    Anyone know why this is happening?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,085
    If you made Complete Game in the very same project, check if Build Settings still contains the scene of Completed Game as first scene. ;)
     
    xOSSxKratos likes this.
  3. xOSSxKratos

    xOSSxKratos

    Joined:
    Apr 4, 2021
    Posts:
    11
    Its in a different project completely, looking at the Build settings there is no trace of Completed Game. I did borrow some materials from Completed Game. Looking at that now to see if there could be anything related.
    Mean time I am moving Completed Game my Library PC. I am hoping a little clean up will solve the problem.
     
  4. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,878
    Right but did you start it off in the same project? did you start one project by cloning/copying another? Or has it always been in a completely seperate project in a seperate folder structure from the beginning, in seperate repo etc?
     
  5. SF_FrankvHoof

    SF_FrankvHoof

    Joined:
    Apr 1, 2022
    Posts:
    780
    Have you tried an exorcism? I think your PC might be haunted.
     
  6. xOSSxKratos

    xOSSxKratos

    Joined:
    Apr 4, 2021
    Posts:
    11
    Oddly as it sounds New Game was created a year before Finished Game. I used one scene from New Game to help create as a template before altering it. Project is not a clone/copy. They have always been separate folders, and repos. When I do a build from an older version it works as it should. This is just an update, and for some reason it's loading the other game.

    So now I have completely removed Completed Game from my pc on to a back up. No trace of it on this PC but for the keys file. I just made a build for New Game and when I click on the .exe it asked to install Completed Game....

    Everything in the Player is proper...
    I'll have to post my next step when I look in to it more.
     
  7. xOSSxKratos

    xOSSxKratos

    Joined:
    Apr 4, 2021
    Posts:
    11
    Ok I think I found the problem. I'll let everyone know if it worked or not.
    After the exorcism didn't work, and the priest left disappointed. I remembered I'm using SteamManager.

    In this case I am using SteamSDK for both apps. they both have a script called Steam Manager. In that script you put your AppID from steam in to line
    if (SteamAPI.RestartAppIfNecessary((AppId_t)9999999)) {
    Debug.Log("[Steamworks.NET] Shutting down because RestartAppIfNecessary returned true. Steam will restart the application.");

    Application.Quit();
    return;
    }

    Because I altered the script for Completed Game and put it's AppID it altered the same line in New Game. In conclusion if I going to use the same Steam Manager script for different games on the same PC I must change the AppID before making the build. I am sure there is other ways around this. Now that my Completed Game is on another PC the script change won't happen. Time to test this... wish me luck.

    Great that worked. Now to fix all the things I broke trying to figure out what was wrong lol. I changed the Pipeline. Anyone who has had to change pipelines know wile not a difficult task it is mind numbing.

    Thanks for all the help and good suggestions it helps with the problem solving.
     
    Last edited: Mar 2, 2023
    ExtraCat and SF_FrankvHoof like this.