Skip to content

Instantly share code, notes, and snippets.

@yasuakiohama
yasuakiohama / テストMasterData.Item.cs
Created May 16, 2015 06:23
テストMasterData.Item.cs
using UnityEngine;
namespace MasterData
{
public class Item
{
private static Entity_item1 entity_item1;
public static void Init()
{
@yasuakiohama
yasuakiohama / Items.cs
Created May 17, 2015 04:36
エクセルデータテスト。最初に呼ばれた時に初期化する。
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Data
{
/// <summary>
/// ItemListのエクセルデータ設定用クラス
@yasuakiohama
yasuakiohama / Manager.Excel.Item.cs
Last active August 29, 2015 14:21
Manager.Excel.Itemでmapを利用したバージョン
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Manager.Excel
{
/// <summary>
/// Itemのエクセルデータ設定用クラス
@yasuakiohama
yasuakiohama / enumのテストサンプル
Created May 30, 2015 08:33
enumのテストサンプル
// foreach (var strArray in SaveData.Key.GetArray ()) {
// GameObject flageList = Instantiate (Resources.Load ("FlageList")) as GameObject;
// flageList.GetComponent<RectTransform> ().SetParent (transform, false);
// flageList.GetComponent<RectTransform> ().name = strArray.name;
// flageList.GetComponent<CreateNode> ().namelist = strArray.data;
// flageList.SetActive (false);
// }
using UnityEngine;
using System.Collections;
@yasuakiohama
yasuakiohama / AwakeStartUpdate.cs
Last active August 29, 2015 14:22
AwakeStartUpdate
using UnityEngine;
using System.Collections;
public class AwakeStartUpdate : MonoBehaviour
{
void Awake ()
{
string parentName = "";
if (transform.parent) {
parentName = transform.parent.name + "_";
@yasuakiohama
yasuakiohama / Find.cs
Last active August 29, 2015 14:22
Find.cs
using UnityEngine;
using System.Collections;
public class Find : MonoBehaviour {
void Start ()
{
FindBytransform ();
FindBytransformAll ();
FindByGetChild ();
@yasuakiohama
yasuakiohama / CustomImporter.cs
Created June 7, 2015 16:35
CustomImporter.cs
using UnityEngine;
using UnityEditor;
public sealed class CustomImporter : AssetPostprocessor
{
public override int GetPostprocessOrder()
{
return 0;
}
@yasuakiohama
yasuakiohama / FixedAspectRatio.cs
Created June 11, 2015 08:32
FixedAspectRatio.cs
using UnityEngine;
using System.Collections;
public class FixedAspectRatio : MonoBehaviour
{
public Camera cam = null; // アスペクト比を固定化するカメラ
public float width = 1920.0f; // 横幅 (目標解像度)
public float height = 1080.0f; // 高さ (目標解像度)
private Rect camRect = new Rect();
@yasuakiohama
yasuakiohama / MyResources.cs
Created June 14, 2015 00:12
NameCreator/Assets/NameCreator/Editor/MyResources.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class MyResources
{
public static ClassAndPathName[] GetPathToArray()
{
List<ClassAndPathName> path = new List<ClassAndPathName> ();
path.Add (new ClassAndPathName ("Sprite", "Sprites"));
@yasuakiohama
yasuakiohama / NameCreatorSample.cs
Created June 14, 2015 00:16
NameCreatorSample.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class NameCreatorSample : MonoBehaviour
{
void Start ()
{
AudioManager.Instance.PlayBGM (BGMName.thunderstorm1);
SpriteLoad ();