MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / FindEditor

Method FindEditor

Source/Editor/Modules/WindowsModule.cs:218–231  ·  view source on GitHub ↗

Finds the first window that is using given element to view/edit it. The item. Editor window or null if cannot find any window.

(ContentItem item)

Source from the content-addressed store, hash-verified

216 /// <param name="item">The item.</param>
217 /// <returns>Editor window or null if cannot find any window.</returns>
218 public EditorWindow FindEditor(ContentItem item)
219 {
220 if (item == null)
221 return null;
222 for (int i = 0; i < Windows.Count; i++)
223 {
224 var win = Windows[i];
225 if (win.IsEditingItem(item))
226 {
227 return win;
228 }
229 }
230 return null;
231 }
232
233 /// <summary>
234 /// Closes all windows that are using given element to view/edit it.

Callers 3

OpenMethod · 0.80
CreateMethod · 0.80
OnAddTagButtonClickedMethod · 0.80

Calls 1

IsEditingItemMethod · 0.45

Tested by

no test coverage detected