Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. protected static T InitNodeEditor<T>( string name, NodeEditorSettings settings, TNodeGraph graph ) where T : ANodeEditor<TNodeGraph>
  2. {
  3. T customEditor = EditorWindow.GetWindow<T>( name );
  4. customEditor.m_settings = settings;
  5. customEditor.m_activeGraph = graph;
  6. customEditor.UpdateWindowSize();
  7. return customEditor;
  8. }
  9.  
  10. private static void SampleShowEditor()
  11. {
  12. InitNodeEditor<SampleNodeEditorA>
  13. (
  14. "Sample Node Editor A",
  15. Resources.Load<NodeEditorSettings>( "SampleNodeEditorSettings" ),
  16. Resources.Load<SampleNodeGraph>( "SampleNodeGraphA" )
  17. );
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement