Reply To: Jump to method on node double click?

Forums › 💬 NodeCanvas › 🗨️ General Discussion › Jump to method on node double click? › Reply To: Jump to method on node double click?

#14822
Gavalakis
Keymaster

    Hey,

    So thinking about this, since what you want (ShowInEditor) is practicaly only applicable in the Script Control Tasks (Execute, Get, Set etc), creating a virtual method ShowInEditor is a bit overkill in my opinion. Here are 2 solutions:

    1. Interface way

    Create an interface like IReflectionTask with one void method ‘ShowInEditor’.
    Implement that interface in all Script Control tasks and it’s method ShowInEditor (like you did)
    In Node.cs line #638 where the double click is handled, add this extra check:

    Still hacky.

    2. Inspector Button

    In OnTaskInspectorGUI of eg Execute Function, add a simply GUI button “ShowInEditor” and do the stuff there: