Created
July 21, 2015 15:12
-
-
Save tsubaki/1e3c190d925bb9b90527 to your computer and use it in GitHub Desktop.
起動時に1度だけウィンドウを表示する
This file contains 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; | |
[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