This file contains hidden or 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
#!/bin/sh | |
cd `dirname ${0}` | |
UNITY_APP=/Applications/Unity/Unity.app/Contents/MacOS/Unity | |
PWD=`pwd` | |
$UNITY_APP -projectPath $PWD & |
This file contains hidden or 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
import UnityEngine | |
import System.Collections | |
import System.Collections.Generic | |
class ObjectPool (MonoBehaviour): | |
// プール本体 | |
class Pool (): | |
_prefab as GameObject = null | |
_maxCount = 10 | |
_prepareCount = 0 |
This file contains hidden or 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
import UnityEngine | |
import System.IO | |
class VersionDisplay (MonoBehaviour): | |
static final _filename = 'version.txt' | |
_text as string = '' | |
def Start(): | |
StartCoroutine(reader()) | |
private def reader() as IEnumerator: | |
path = Application.streamingAssetsPath + "/${_filename}" |
This file contains hidden or 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
_ground_obj as GameObject = null | |
_ground as Ground = null | |
ground_obj: | |
get: | |
_ground_obj = GameObject.Find('Ground') if _ground_obj == null | |
return _ground_obj | |
ground: | |
get: | |
_ground = ground_obj.GetComponent[of Ground]() if _ground == null | |
return _ground |
This file contains hidden or 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
import UnityEngine | |
import UnityEditor | |
import System | |
import System.IO | |
// C# の例 | |
// プロジェクト ウィンドウの選択されたオブジェクトからアセットバンドルを作成 | |
// コンパイルした後は "Menu" -> "Assets" へ移動して選択肢から一つを選択して | |
// アセットバンドルをビルド | |
class BuildAssetBundle: |
This file contains hidden or 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
" 簡易Wiki的なもの | |
" テキスト中にある、[[hoge]]のようにタグで括られた文字列をファイル名としてジャンプします | |
" nmap ,v :call SWikiOpenTag()<CR> | |
" とでもしておくと便利かも | |
let g:SWikiTagBegin = '[[' |
This file contains hidden or 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
#!/usr/bin/ruby | |
# filetype: ruby | |
# encoding: utf8 | |
# プレイヤーからのビルド後にパッチを適用する | |
PATCH = '/usr/bin/patch' | |
pwd = ARGV[0] | |
target = ARGV[1] |
This file contains hidden or 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 UnityEditor; | |
using System; | |
using System.Collections; | |
public class FreezeMesh : MonoBehaviour { | |
[Flags] | |
enum FreezeFlag { | |
kSCALE = 1<<0, | |
kROTATION, | |
kTRANSLATION, |
This file contains hidden or 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; | |
using System.Runtime.Serialization.Formatters.Binary; | |
// 実装例 | |
public class DebugMenu : DebugMenuBase { | |
public bool playerMoveSync { get { return hoge_.playerMoveSync_; } } | |
[System.Serializable] | |
public class Hoge { | |
public bool playerMoveSync_; |
This file contains hidden or 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 UnityEditor; | |
using System; | |
using System.IO; | |
// Assetsフォルダ以下を見てファイルを取得する系 | |
public class AssetDir { | |
public static string[] GetFiles(string path) { | |
string[] rawfiles = Directory.GetFiles(MakePath(path)); | |
string[] files = new string[rawfiles.Length]; |