Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hi, My project uses Unity 2019.4.40f1. this means some of the code did not work, due to my C# version being version 7.3. So, I ended up rewriting the ConstantVariables class. Hopefully you are all cool with it, It would not have worked if I didn't. Here it is:

        internal const string GUID_KEY = "LEADERBOARD_CREATOR___LOCAL_GUID";

        private const string SERVER_URL = "https://lcv2-server.danqzq.games";

        private static string URL_EXTENSION;

        internal static string GetServerURL(Routes route = Routes.None, string extra = "")

        {

            switch (route)

            {

                case Routes.Authorize:

                    URL_EXTENSION = "/authorize";

                    break;

                    

                case Routes.Get:

                    URL_EXTENSION = "/get";

                    break;

                case Routes.Upload:

                    URL_EXTENSION = "/entry/upload";

                    break;

                case Routes.UpdateUsername:

                    URL_EXTENSION = "/entry/update-username";

                    break;

                case Routes.DeleteEntry:

                    URL_EXTENSION = "/entry/delete";

                    break;

                case Routes.GetPersonalEntry:

                    URL_EXTENSION = "/entry/get";

                    break;

                case Routes.GetEntryCount:

                    URL_EXTENSION = "/entry/count";

                    break;

            }

            return SERVER_URL + URL_EXTENSION + extra;

        }

(+1)

Thank you for letting me know about this. I will revert the script to work with 2019.4 versions.

There are a couple other lines of code in one of the other scripts that uses the ConstantVariables, but other than that, the compatibility of this code for 2019.4 is actually really good!