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; | |
namespace Singleton | |
{ | |
/// <summary> | |
/// シングルトン基底クラス(MonoBehaviour継承) | |
/// </summary> | |
public abstract class SingletonMonoBehaviour<T> : MonoBehaviour where T : SingletonMonoBehaviour<T> | |
{ | |
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
namespace Singleton | |
{ | |
/// <summary> | |
/// シングルトン基底クラス(MonoBehaviour非継承) | |
/// </summary> | |
public abstract class Singleton<T> where T : class, new() | |
{ | |
public static readonly T Instance = new T(); | |
} | |
} |
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
#if DEBUG_OVERWRAP | |
using UnityEngine; | |
using System.Diagnostics; | |
using UnityDebug = UnityEngine.Debug; | |
using UnityObject = UnityEngine.Object; | |
/// <summary> | |
/// 条件付きのUnityEngine.Debugクラス | |
/// </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
using System.Collections; | |
using UnityEngine; | |
public class RotateCubeTest : MonoBehaviour | |
{ | |
const float RotatingSpeed = 0.2f; | |
const float RotatingAngle = 90f; | |
Vector3 halfSize; | |
float time = 0f; | |
Vector3 axis = Vector3.zero; |
NewerOlder