Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorWindow.SendEvent

Switch to Manual
public bool SendEvent(Event e);

Parameters

Description

Sends an Event to a window.

		var win : EditorWindow;
		
		/// Sends a paste event to an EditorWindow, as if Paste was selected from the Edit menu.
		win.SendEvent(EditorGUIUtility.CommandEvent("Paste"));