This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function getBrowserLocale(options = {}) { | |
const defaultOptions = { countryCodeOnly: false } | |
const opt = { ...defaultOptions, ...options } | |
const navigatorLocale = | |
navigator.languages !== undefined | |
? navigator.languages[0] | |
: navigator.language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using UnityEngine; | |
/// <summary> | |
/// Abstract singleton class for Unity. Updated with possible errors: | |
/// - Doesn't create a new singleton if it is in scene. | |
/// - Singleton has an initialize method which is called on creation, finding one from scene, or awake. Which makes sure initialization always happen before using it. | |
/// - It doesn't create a new single if you try to access it OnDestroy (e.g. game quit). Returns null instead. | |
/// </summary> | |
/// <typeparam name="TSingleton">Type of singleton. (Same as class inheriting from it.)</typeparam> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |