string to CloudRegionCode

Options
Hey guys, is there any way to convert string to CloudRegionCode?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited November 2019
    Options
    Hi @Angel,

    May I know why do you need this?
    Maybe we could suggest something better.

    Otherwise, I got this from stackoverflow answer that showed up as first result on Google.
    CloudRegionCode cloudRegionCode = (CloudRegionCode) Enum.Parse(typeof(CloudRegionCode), cloudRegionString.Trim(), true);
  • Angel
    Options
    Hi @JohnTube , i am working on new update for my game noobhunter.io, in which players can create room directly by writing the room settings in the url , for example www.noobhunter.io/?game=213621&region=us&maxplayers=14...and so on , thank you for the code, that's was exactly what i needed.