Example #1
0
        private void Awake()
        {
            string updateTempFilePath = Path.Combine(GadgetPaths.GadgetCorePath, "Update.tmp");

            if (File.Exists(updateTempFilePath))
            {
                try
                {
                    string oldVersion = File.ReadAllText(updateTempFilePath);
                    GadgetCoreAPI.DisplayInfoDialog($"GadgetCore has been updated!\n{oldVersion} -> {GadgetCoreAPI.GetFullVersion()}");
                }
                catch (Exception) { }
                try
                {
                    File.Delete(updateTempFilePath);
                }
                catch (Exception) { }
            }
        }