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.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class TextLocalizer : MonoBehaviour | |
{ | |
public static string CurrentLanguage = "english"; | |
static Dictionary<string, Dictionary<string, string>> Translations = new Dictionary<string, Dictionary<string, string>>() { | |
["english"] = new Dictionary<string, string>() { |
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 UnityEngine; | |
using System.Collections; | |
public class TestLocationService : MonoBehaviour | |
{ | |
IEnumerator LocationCoroutine() { | |
// Uncomment if you want to test with Unity Remote | |
/*#if UNITY_EDITOR | |
yield return new WaitWhile(() => !UnityEditor.EditorApplication.isRemoteConnected); | |
yield return new WaitForSecondsRealtime(5f); |
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 NoSuchStudio.Common; | |
public class MyClassWithLogger: MonoBehaviourWithLogger | |
{ | |
public void OnButtonClick() { | |
LogLog("Hello World!"); | |
} | |
} |
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 UnityEngine; | |
using NoSuchStudio.Common; | |
public class MyClassB : MonoBehaviour { | |
void Start() { | |
this.LogLog("Hello World!"); | |
} | |
} |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace NoSuchStudio.Common { | |
/// <summary> | |
/// Base class for MonoBehaviours that should have a separate logger. Useful for filtering | |
/// logs by class types. | |
/// </summary> |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var listOfLists = new List<List<string>>() { | |
new List<string>() {"one", "two"}, | |
new List<string>() {"three", "four"} | |
}; | |
Console.WriteLine(listOfLists.ToStringExt()); | |
// output: [[one, two], [three, four]] |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var strList = new List<string>() { | |
"one", "two", "three" | |
}; | |
Console.WriteLine(strList.ToStringExt()); | |
} | |
} |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace NoSuchStudio.Common | |
{ | |
public static class GenericToStringExts | |
{ | |
// Dictionary's KeyValuePair |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var listOfLists = new List<List<string>>() { new List<string>() {"one", "two"}, new List<string>() {"three", "four"}}; | |
Console.WriteLine("ToString: " + listOfLists.ToString()); | |
Console.WriteLine("ToStringExt: " + listOfLists.ToStringExt()); | |
} | |
} |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var strList = new List<string>() {"one", "two", "three"}; | |
Console.WriteLine("ToString: " + strList.ToString()); | |
} | |
} |
NewerOlder