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.

Discussion Build Unique Version ID

Discussion in 'Scripting' started by guluerechan, Nov 7, 2022.

  1. guluerechan

    guluerechan

    Joined:
    Mar 24, 2022
    Posts:
    9
    I am working with a few artists to build a Multiplayer game, I want to be able to generate and apply a string of UUID text to a UI Text so that it can be referred to during play.

    Currently trying to find a way that can effectively only apply it when the game is built, and not by having it needed to be manually typed in.

    Current closest process I found: Create a new file containing only that string and apply that into the UI Text
     
    Last edited: Nov 7, 2022
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    31,216
    I think that's the easiest because it gives you full control.

    Don't forget to AssetDatabase.Refresh() so it gets pulled in!

    The only thing I would add is that if you're using this to prevent earlier builds from hitting the server, one day you might find yourself needing to update your software without changing this number, so be sure to include a post-build step to commit the change to source control so you can pull it back on demand.