Exemplo n.º 1
0
 public static void PopulateFromGit()
 {
     try
     {
         data = new VersionDataHolder()
         {
             Version = Build.Git.BuildVersion,
             Hash    = Build.Git.Hash
         };
     }
     catch (System.Exception e)
     {
         Debug.LogWarning($"{e} thrown, no version data will be added");
         data = new VersionDataHolder()
         {
             Version = NoVersionPlaceholder,
             Hash    = "version data was not found"
         };
     }
 }
Exemplo n.º 2
0
    public static void LoadFromFile()
    {
        string json = Resources.Load <TextAsset>(FileName).text;

        data = JsonUtility.FromJson <VersionDataHolder>(json);
    }