【3Dゲームエンジン】Unity 2
■ このスレッドは過去ログ倉庫に格納されています
0390名前は開発中のものです。
2011/02/04(金) 04:11:01ID:HYjSZ9LXJavaScriptです。
static private var instance : ScriptFile = null:
function Awake()
{
if (!instance) Setup();
else Destroy(gameObject);
}
private function Setup()
{
if (!instance) instance = this;
Application.LoadLevel(this);
// 以下その他のAwakeの初期化
}
static public function Delete()
{
Destroy(instance);
instance = null;
}
■ このスレッドは過去ログ倉庫に格納されています