Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created January 31, 2017 13:55
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/33eab9c0a4e22b40497c50a6bc3cf99f to your computer and use it in GitHub Desktop.
Save tsubaki/33eab9c0a4e22b40497c50a6bc3cf99f to your computer and use it in GitHub Desktop.
設定したパラメータが破棄されるテスト
using UnityEngine;
using UnityEditor;
public class EditorWindowTest : EditorWindow
{
public static string message;
[MenuItem("Window/Show")]
static void Init()
{
var window = EditorWindow.CreateInstance<EditorWindowTest> ();
message = "C";
window.Show ();
}
void OnGUI()
{
GUILayout.Label (message);
if (GUILayout.Button ("PUSH")) { message += "#"; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment