Ejemplo n.º 1
0
 public async void BeginEdit(Window parent)
 {
     if (RoleEditorWindow.Edit(parent, this.Source))
     {
         this.RefreshProperties();
         await this.parent.CommitAsync();
     }
 }
Ejemplo n.º 2
0
	// temporary debug variables
//	string eventtype = "";
//	string mouseloc = "";

	public static void Init(ScriptedObject role){
		instance = (RoleEditorWindow)EditorWindow.GetWindow(typeof(RoleEditorWindow));
		// be sure we don't blow away and edits when switching scripts...
//		instance.requestedScript = script;
		// what if we start running before saving ? we should probably warn for that too.
//		if (!(EditorApplication.isPlaying || EditorApplication.isPaused))
			// don't load up yet, put up a confirmation dialog first.
//			instance.confirmChange=true;
//			return;
//		}
		instance.myLeftRole = role;
		instance.title = "Role Editor";

		instance.leftHasChanged = false;
		instance.rightHasChanged = false;
//		EditorApplication.playmodeStateChanged += instance.PlaymodeCallback;
	}