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 System.Collections; | |
/// <summary> | |
/// このコンポーネントがアタッチされているオブジェクトは、 単一のオブジェクトに含まれる | |
/// 既にある場は削除される | |
/// </summary> | |
public class SingletonObject : MonoBehaviour | |
{ | |
/// <summary> |
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 System.Collections; | |
public class DataSet : SingletonMonoBehaviour<DataSet> { | |
public ObserverDictionary<bool> notiBool = new ObserverDictionary<bool>(); | |
public ObserverDictionary<int> notiInt = new ObserverDictionary<int>(); | |
public static void Attatch(string key, ObserverDictionary<bool>.NotificationAction action) | |
{ |
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 System.Collections; | |
public class EasyAnchor : MonoBehaviour | |
{ | |
public enum VerticalPosition | |
{ | |
Top = 2, | |
Center = 1, | |
Bottom = 0 |
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 System.Collections; | |
using UnityEditor; | |
public class FindReference | |
{ | |
[MenuItem("GameObject/FindReferenceInSceneObject")] | |
static void Find () | |
{ |
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 System.Collections; | |
[ExecuteInEditMode] | |
public class RenderTest : MonoBehaviour | |
{ | |
void OnEnable () | |
{ | |
var rendererList = GetComponentsInChildren<Renderer> (); | |
foreach (var renderer in rendererList) { |
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 System.Collections; | |
public class FreezRigidbody : MonoBehaviour | |
{ | |
Rigidbody _rigidbody; | |
// 定義しておくとコンポーネント起動時に1回呼ばれるイベント。詳しくはMonoBehaviour参照 | |
void Start () | |
{ |
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 System.Collections; | |
using System.Collections.Generic; | |
public class HideObjectManager : MonoBehaviour | |
{ | |
#if UNITY_EDITOR | |
public List<GameObject> hideObjectList = new List<GameObject> (); |
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 System.Collections; | |
public class InputTest : MonoBehaviour | |
{ | |
void Update() | |
{ | |
if( Input.GetKeyDown(KeyCode.LeftArrow) ) | |
{ | |
GetComponent<Handler>().param.Value += 1; |
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 System.Collections; | |
using System; | |
using System.Collections.Generic; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class GetRootInstancePrepared : MonoBehaviour { |
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 System.Collections; | |
public class ScrollTexture : MonoBehaviour | |
{ | |
public Vector2 UVDirection; | |
private Texture2D tex2d; | |
private Vector2 currentUVOffset = new Vector2 (0, 1); |
OlderNewer