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

Method GetWindow

Source/Editor/Modules/WindowsModule.cs:734–755  ·  view source on GitHub ↗

Gets that is represented by the given serialized typename. Used to restore workspace layout. The typename. The window or null if failed.

(string typename)

Source from the content-addressed store, hash-verified

732 /// <param name="typename">The typename.</param>
733 /// <returns>The window or null if failed.</returns>
734 private EditorWindow GetWindow(string typename)
735 {
736 // Try use already opened window
737 for (int i = 0; i < Windows.Count; i++)
738 {
739 if (string.Equals(Windows[i].SerializationTypename, typename, StringComparison.OrdinalIgnoreCase))
740 return Windows[i];
741 }
742
743 // Check if it's an asset ID
744 if (Guid.TryParse(typename, out Guid id))
745 {
746 var el = Editor.ContentDatabase.Find(id);
747 if (el != null)
748 {
749 // Open asset
750 return Editor.ContentEditing.Open(el, true);
751 }
752 }
753
754 return null;
755 }
756
757 /// <inheritdoc />
758 public override void OnInit()

Callers 2

CanDrawMethod · 0.80
OnRenderMethod · 0.80

Calls 4

EqualsMethod · 0.45
TryParseMethod · 0.45
FindMethod · 0.45
OpenMethod · 0.45

Tested by

no test coverage detected