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 UnityEngine; | |
public abstract class MonoSingletonFromResources<T> : MonoBehaviour where T : MonoSingletonFromResources<T> | |
{ | |
private static readonly string RESOURCES_PATH = "Prefabs/Singletons/"; | |
static T m_Instance = null; | |
public static T instance | |
{ |
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; | |
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T> | |
{ | |
static T m_Instance = null; | |
public static T instance | |
{ | |
get | |
{ |
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
yasuaki@YASUAKI-PC ~ | |
$ pwd | |
/c/Users/yasuaki | |
yasuaki@YASUAKI-PC ~ | |
$ cd Launch/Unity/Git | |
yasuaki@YASUAKI-PC ~/Launch/Unity/Git | |
$ git clone https://github.com/suakig/Unity-ShowCountCycle.git | |
Cloning into 'Unity-ShowCountCycle'... |
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; | |
public class SingletonMonoBehaviourFromResources<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
private static T instance; | |
public static T Instance { | |
get { | |
if (instance == null) { | |
instance = (T)FindObjectOfType (typeof(T)); | |
if (instance == null) { |
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; | |
public class SingletonMonoBehaviourAutoCreate<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
private static T instance; | |
public static T Instance { | |
get { | |
if (instance == null) { | |
instance = (T)FindObjectOfType (typeof(T)); | |
if (instance == null) { |
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; | |
using UnityEditor; | |
[CustomEditor(typeof(Mask))] | |
public class EquipmentEditor : Editor { | |
public override void OnInspectorGUI() | |
{ | |
var obj = target as Mask; | |
obj.id = (Mask.ID)EditorGUILayout.EnumMaskField ("MaskIDField", obj.id); |
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; | |
using System.Collections.Generic; | |
public class Mask : MonoBehaviour { | |
private const string PATH = "Prehabs/Color/"; | |
public enum ID | |
{ | |
Red = 1, |
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 Weapon : MonoBehaviour { | |
[System.NonSerialized] public GameObject whoEquip; | |
Gun[] gun; | |
void Start () | |
{ |
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 UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEditor.iOS.Xcode; | |
using System.IO; | |
using System.Collections.Generic; | |
public class PostBuildProcess : MonoBehaviour | |
{ | |
internal static void CopyAndReplaceDirectory(string srcPath, string dstPath) |
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; | |
using System; | |
using System.Net; | |
using System.Net.Cache; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
public class TimeSample : MonoBehaviour | |
{ |