GithubHelp home page GithubHelp logo

Comments (5)

Seneral avatar Seneral commented on July 2, 2024

You need to build a 3rd editor script anywhere that subscribes to these events. So you'd do NodeEditorFramework.NodeEditorCallbacks.OnNodeMove += MyCallbackMethod
Hope that helps!

from node_editor_framework.

snarlynarwhal avatar snarlynarwhal commented on July 2, 2024

I can't seem to get it working, here's my code:

image

I added a Debug.Log in the OnEnable function, but got nothing. o.0 I haven't dealt with subscribing or delegates before, and have dabbled very little in editor scripts so I'm a novice to this.

ps - I owe you for all the help. So I'll definitely be contributing a feature or two to the project soon. :)

from node_editor_framework.

snarlynarwhal avatar snarlynarwhal commented on July 2, 2024

Finally got it working but adding this line:

[CustomEditor(typeof(MachineNode))]

However, it keeps adding the connection OnEnable (duh). I added a static bool to track whether or not I've subscribed to the delegate. It appears to work fine! Or would there be a better place to subscribe?

from node_editor_framework.

Seneral avatar Seneral commented on July 2, 2024

Sorry, was unavailable. Yes for it to execute you need to make it a custom editor (in this case).

For delegates, I tend to first unsubscribe (-=) and then subscribe (+=). If you haven't subsribed before it will do nothing but if you did you won't have duplicate subscribers:)

from node_editor_framework.

snarlynarwhal avatar snarlynarwhal commented on July 2, 2024

No worries! And ahh got it thanks! :D

from node_editor_framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.