Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created July 21, 2015 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/1e3c190d925bb9b90527 to your computer and use it in GitHub Desktop.
Save tsubaki/1e3c190d925bb9b90527 to your computer and use it in GitHub Desktop.
起動時に1度だけウィンドウを表示する
using UnityEngine;
using UnityEditor;
[UnityEditor.InitializeOnLoad]
public class Hoge : EditorWindow
{
static readonly string tempFilePath = "Temp/unique File Name2";
static Hoge()
{
if( System.IO.File.Exists(tempFilePath ) == false ){
System.IO.File.Create(tempFilePath);
EditorApplication.delayCall += Hoge.Init;
}
}
static void Init()
{
Hoge.GetWindow<Hoge> ();
EditorApplication.delayCall -= Hoge.Init;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment