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 DataStrage : MonoBehaviour { | |
Dictionary<string, object> dataList = new Dictionary<string, object>(); | |
public void OnDestroy (){ Clear (); } | |
public void SetInt(string key, int value){ SetParam<int>(key, value); } | |
public int GetInt(string key, int def) { return GetParam<int>(key, def); } |
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 SampleInstance : SingletonMonoBehaviour<SampleInstance> | |
{ | |
} |
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.IO; | |
[ExecuteInEditMode] | |
public class ImageLoader : MonoBehaviour | |
{ | |
// テクスチャ(png/jpeg)の拡張子をbytesとしたもの | |
public TextAsset image; | |
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 UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
public class BundleIdentifierChange | |
{ | |
static string androidBundleIdentifier = "android"; | |
static string iOSBundleIdentifier = "iOS"; | |
static string otherBundleIdentifier = "other"; |
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
// | |
// MemoryWarning.mm | |
// | |
// Created by tsubaki on 2013/08/16. | |
// | |
// | |
#import "iPhone_target_Prefix.pch" | |
#import "UnityAppController.h" | |
@interface MemoryWarning : UnityAppController |
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 class NoPixelperfectOnGUI : MonoBehaviour | |
{ | |
[SerializeField] | |
Vector2 screenSize = new Vector2(800,1280); // GUI想定解像度 | |
void OnGUI() | |
{ | |
// GUI用の解像度を更新 | |
GUIUtility.ScaleAroundPivot(new Vector2( Screen.width / screenSize.x, Screen.height / screenSize.y), Vector2.zero); |
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] | |
[RequireComponent(typeof(GUITexture))] | |
public class NotPixelperfectGUITexture : MonoBehaviour | |
{ | |
[SerializeField] | |
Vector2 screenSize = new Vector2 (800, 1280); |
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; | |
[ExecuteInEditMode] | |
public class MultiHitRay : MonoBehaviour | |
{ | |
[Range(0.1f, 30f)] | |
public float Length = 20; | |
public LayerMask Mask; |
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 MultiHitRay | |
{ | |
public static List<Vector3> CheckMultiHitRay(Vector3 position, Vector3 direction, float length, LayerMask mask) | |
{ | |
List<Vector3> list = new List<Vector3>(); | |
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 Timer : MonoBehaviour | |
{ | |
private float startTime; | |
public float second = 0; | |
void OnGUI () |