Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public class HierarchyObjectSize
{
static HierarchyObjectSize ()
{
class aaa {
static void bbb (int a ,params string[] strs) {
}
}
static void Main () {
int a = 1;
int b = 2;
bbb(a,"foo","bar","baz");
bbb(b);
@st0326s
st0326s / file0.txt
Created August 11, 2014 04:28
メモ:Debug.Logに色を付ける ref: http://qiita.com/satotin/items/97b5daea8b9098a95735
Debug.Log("<color=green>Awake</color>");
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace WWWKit
{
/// <summary>
/// A handy class to use WWW class and WWWForm class.
///
/// Features:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class iTweenTest : MonoBehaviour {
public Text text1;
private Hashtable table = new Hashtable(); // ハッシュテーブルを用意
// Use this for initialization
void Start () {
@st0326s
st0326s / filename
Last active August 29, 2015 14:17
■iTween Visual EditorによるiTweenEvent・iTweenPathの使い方(メモ) ref: http://qiita.com/satotin/items/dae194179ecadd33473b
_tweenEvent = gameObject.GetComponent<iTweenEvent>();
// EventTypeからEventParamMappingsのキーマップ配列を取得、これには各パラメータ型情報が入っている
var mappings = EventParamMappings.mappings[_tweenEvent.type];
System.Type valueType = mappings["speed"];
object setValue = 10;
object speed = Convert.ChangeType(setValue, valueType);
if (_tweenEvent.Values.ContainsKey("speed")){
@st0326s
st0326s / TestAnimationMethod.cs
Last active August 29, 2015 14:17
Animationのタイムラインからメソッドを呼ぶ一連の流れ ref: http://qiita.com/satotin/items/da7a3a5611b8676872f5
using UnityEngine;
using System.Collections;
public class TestAnimationMethod : MonoBehaviour {
private GameObject ParticleObject;
private Animator animator;
private int _plusVal = 0;
private float _blendTreeVal = 0.0f;
@st0326s
st0326s / AssetBundleLoad_Unity5.cs
Last active August 25, 2016 12:19
アセットバンドルの作り方・ロード方法の色々メモ(ver5.4.0f3・ver5.3.0f4・ver5.0.1f・ver4.6.2) ref: http://qiita.com/satotin/items/7a481c69230e9393401b
using UnityEngine;
using System.Collections;
public class AssetBundleLoad_Unity5 : MonoBehaviour {
public void CreateFileAssetBundleFileLoad()
{
// マニフェストが入っているファイルをパスで指定
string path = Application.streamingAssetsPath + "/" + "BuildOutPut" + "/";
// マニフェストのアセットバンドルを作成
// (マニフェストのアセットバンドルの中にアセットバンドル化したデータ群が入っている)
AssetBundle NoCompress = AssetBundle.CreateFromFile(path + "BuildOutPut");
@st0326s
st0326s / UnZipThread
Last active August 15, 2018 05:07
Unity C# Zip化したアセットバンドル(ファイル)を解凍 ref: http://qiita.com/satotin/items/39af44667c86db1e4069
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Text.RegularExpressions;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class PersonalData
{
public int id;
public string name;
public long money;
public float weight;