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 AspectCamera : MonoBehaviour | |
{ | |
public Vector2 aspect = new Vector2(4,3); | |
public Color32 backgroundColor = Color.black; | |
private float aspectRate ; |
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 AncherLite : MonoBehaviour { | |
public Camera target; | |
public enum VIRTUCAL | |
{ | |
TOP = 10, |
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.Diagnostics; | |
public static class MonobehaviourLogExtensions { | |
public static void Log(this MonoBehaviour self, string msg) | |
{ | |
var method = new StackTrace().GetFrame(1).GetMethod().Name; | |
var message = string.Format("{2} - {0} {1}", self, method, msg); |
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; | |
// | |
// マウスの座標をオブジェクトが追跡する。 | |
// カメラにアタッチ | |
// | |
[RequireComponent(typeof(Camera))] | |
public class TransformScreenToWorld : 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 HeaderTest : MonoBehaviour { | |
public int id; | |
[Header("State")] | |
public string name; | |
public int hp; |
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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[ExecuteInEditMode] | |
public class GizmoTest : MonoBehaviour { | |
Color currentColor = Color.red; |
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
// define LOOKATをコメント化でルックアット方式、コメント化で角度指定で回転 | |
#define LOOKAT | |
using UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class VectorCal : 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; | |
using System.Runtime.InteropServices; | |
using System; | |
public class ObjCMessage | |
{ | |
[DllImport("__Internal")] | |
static extern IntPtr objc_getClass (string name); |
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
// | |
// 呼び出されるObjective-Cのクラス | |
// | |
@interface ItemTest : NSObject | |
{ | |
int count; | |
} | |
-(int) ResultCount; | |
@end |
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.Runtime.InteropServices; | |
public class LoadingAnimation : SingletonMonobehaviour<LoadingAnimation>{ | |
[DllImport("__Internal")] | |
static extern void _Init(); | |
[DllImport("__Internal")] |