This file contains 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 System.Linq; | |
using UnityEngine; | |
public class RandomBox : MonoBehaviour | |
{ | |
Dictionary<string, int> entry = new Dictionary<string, int>(); | |
public void AddEntry(string _name, int amount) | |
{ |
This file contains 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; | |
public class StructOwner : MonoBehaviour { | |
public MyStruct myStruct; | |
public MyStruct myStruct2; | |
public NestedClass nestedClass; |
This file contains 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.Text; | |
public class MyStringExtension { | |
public string InjectComma(string input) | |
{ | |
StringBuilder sb = new StringBuilder(input.Length * 2); | |
for (int i = 0; i < input.Length; i++) { | |
sb.Append(input[i]); | |
if (i % 5 == 4) { |
This file contains 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.Diagnostics; | |
using System.Text; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class BuildTest : MonoBehaviour { | |
public Slider slider; | |
public Text countText; |
This file contains 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 UnityEngine.InputSystem; | |
namespace MyNamespace { | |
public class PlayerMovement : MonoBehaviour, MyControl.IMovementActions { | |
public MyControl control; | |
void Awake() | |
{ |
This file contains 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; | |
public class SingletonMonoBehaviour<T> : MonoBehaviour where T : SingletonMonoBehaviour<T> { | |
static T _inst; | |
public static T Instance { | |
get { | |
if (_inst == null) { | |
_inst = GameObject.FindObjectOfType(typeof(T)) as T; |
This file contains 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; | |
public class Toast : MonoBehaviour { | |
// Singleton | |
static Toast instance; | |
public static Toast GetInstance() | |
{ | |
if (instance == null) { | |
instance = FindObjectOfType<Toast>(); |
This file contains 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
public enum EReadOnlyType { | |
FULLY_DISABLED, | |
EDITABLE_RUNTIME, | |
EDITABLE_EDITOR, | |
} | |
public class ReadOnlyAttribute : UnityEngine.PropertyAttribute { | |
public readonly EReadOnlyType runtimeOnly; |
This file contains 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; | |
public class Sample : MonoBehaviour { | |
public string publicField; | |
[ReadOnly] | |
public string readOnlyField; | |
[ReadOnly(EReadOnlyType.FULLY_DISABLED)] |
OlderNewer