Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Updating game executable

Discussion in 'Windows' started by JoeySpringlab, Dec 14, 2023.

  1. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Hey all,

    I have a question about ways we can update our game (rather, platform). The situation we have is as following: We have a main executable that can play various small games. The game assets are all stored in assetbundles and (currently) rely on code we have made in a dll.

    Generally, every time we make a new game, this dll is updated and a new asset bundle is made and we push the new game to all our clients (the clients and server are all in a closed environment). While this works well, making and building the game is an annoying process due to the fact that we have to switch between the code and the dll, mainly for debugging purpose in the editor.

    Now, if we want to do an update on the platform, we replace the complete build folder with the new one. (executable, data folder, unityplayer.dll etc) and I was wondering if that is actually needed.

    If the changes we have made are only code (and any game assets are in an assetbundle), we don't use the resources folder, no unity version update, would it not be possible to only update the executable of the game?

    If not, what other dependencies would need to be updated?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,745
    It's doable. For Mono scripting backend, C# code is all contained in <GAMENAME>_Data/Managed folder. For IL2CPP scripting backend, it's split between <GAMENAME>_Data/il2cpp_data and GameAssembly.dll.

    That said, it is not without pitfalls. Data files contain the serialization layout for your scripts, and if you change serialization layout and only update code, it may lead to crashes.
     
  3. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Thanks for the info.

    So just to have it clear: In our case, we use Mono as scripting and if we only updated "behaviour code" so to say that doesn't involve serialization layout changes, we should be fine with just update the managed folder and the executable. I'm assuming the game specific code is contained in the Assembly-CSharp.dll (and other DLLs for Unity dependencies)

    Is there any info on what exactly the files outside the managed folder are for? Mainly looking at the ASSETS, RESOURCE and RESS files. Do these contain the serialization info?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,745
    Yes.

    They don't contain serialization layout, the contain serialized data (which must match the layout specified in code, otherwise you get crashes). All these files contain data found in your scenes, such as game objects, what components those game objects have and assets used in those components.
     
  5. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Alright, that's clear. Thanks!