Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
using UnityEngine;
using System;
using System.Collections;
using System.IO;
/// <summary>
/// Defalult WWW.LoadFromCacheOrDownload() can use only AssetBundle
/// this eneble chaching any file.
/// </summary>
public class WWWCache {
@asus4
asus4 / UIPopup.cs
Created April 6, 2012 04:46
Popup for nGUI,Unity3D
using UnityEngine;
using System.Collections;
// delegates
public enum UIPopupState {
SUBMIT,
CANCEL
}
public delegate void ClickDelegate(UIPopupState state);
@asus4
asus4 / LabelRandamize.cs
Created April 27, 2012 13:16
Label Randamize Animation for nGUI Unity
using UnityEngine;
using System.Collections;
[AddComponentMenu("NGUI/Tween/Ex/Label Randamize")]
public class LabelRandamize : MonoBehaviour {
public UILabel label;
public bool autoDestroy = false;
const string randamText = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ11234567890";
@asus4
asus4 / CreateTool.cs
Last active October 6, 2015 09:08
Editor Utility Tool
using UnityEngine;
using UnityEditor;
using System.Collections;
/// <summary>
/// Editor Utility tool.
/// author koki ibukuro
/// </summary>
public class CreateTool : ScriptableObject {
@asus4
asus4 / ModelAnimationSpliter.cs
Last active October 6, 2015 14:58
Split Model Animation with CSV
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
/// <summary>
/// Model animation spliter.
/// by Koki Ibukuro @asus4
/// </summary>
public class ModelAnimationSpliter : EditorWindow {
TextAsset csvAsset;
@asus4
asus4 / psd2png.sh
Created October 28, 2015 09:19
Export *.psd to *.png using ImageMagic.
#!/bin/sh
mkdir out
for f in *.psd
do
echo ${f/psd/png}
# 1.trim
# 2.resize with in (512 x 512)
# 3 convert to png
# Check Xcode version
require_version="0710"
if [[ $XCODE_VERSION_ACTUAL != $require_version ]]; then
echo "error: Required Xcode $require_version (current $XCODE_VERSION_ACTUAL) to build ${PRODUCT_NAME}"
return -1
fi
@asus4
asus4 / ofxMackerel.cpp
Last active November 16, 2015 06:31
ofxMackerel
//
// ofxMackerel.cpp
//
// Copyright 2015 asus4
//
//
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/HTTPSClientSession.h>
#include <Poco/Net/HTTPRequest.h>
@asus4
asus4 / .gitignore
Last active December 10, 2015 23:19
Unity .gitignore
Library
Temp
*.csproj
*.sln
*.pidb
*.userprefs
*.unityproj
@asus4
asus4 / CalendarPageDifference.cs
Created January 17, 2013 13:58
月カレンダーのページ単位の期間の差を返します
/// <summary>
/// カレンダー単位の期間の差を返します
/// 実際の差ではなくて、2012/12/31と、2013/01/01の差は"1"になります。
/// </summary>
/// <returns>
/// The Month difference.
/// </returns>
public static int CalendarPageDifference (DateTime old, DateTime now)
{
int old_year = old.Year;