Editor Scripts - Instance.js

0 favourites
  • 5 posts
From the Asset Store
Here is the wonderful & amazing script for your website or fun with maths.
  • Ashley I just found out that the SDK.IInstanceBase.Release() method is never called when you remove a GlobalPlugin from the project. Is that supposed to happend? Should I file a bug?

    In one of my plugins I need to instantiate additional components that register listeners in the main window in c3 editor, not at runtime when running the game but when working in your project. So, I need to release those listeners if the plugin is removed from the project.

    Thanks!

  • It will only be released when you close the project. It will not be released if deleted, because you can press undo and it will come back.

  • It will only be released when you close the project. It will not be released if deleted, because you can press undo and it will come back.

    Is there a way to react whenever these changes and undo-points happen in a singleglobal plugin is removed?

    For this scenarios:

    1. Add a single-global plugin to the project. Then I instantiate additional DOM elements and register listeners in the editor needed for the plugin.

    2. Remove the single-global plugin from the project. I need to remove the DOM components and disconnect the listeners.

    3. If an undo is executed, I need to re-initialize those components and listeners.

    4. If a redo to remove it is done, same as in step 2. I must remove the components and listeners.

    Or at least a way to verify if the plugin is currently in the project. Because the inst variable is always set. Thus, I can't validate if it's null.

  • The SDK isn't designed to handle editor DOM customization. That is a huge can of worms that will cause all sorts of major complications.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's really a shame. There's a lot of potential if we could also build within the official framework. More complex and well integrated addons could be developed. Prompts and alerts look messy. For instance, theres a 3D level editor in progress in the community that looks very promising. Just to mention one, but if we could have the ability to work within the editor's UI lots of nice things can be created.

    Btw. I also noted that some UI features are used by the official addons that are not available for devs but I believe are needed. For instance, setting a plugin property field enabled or disabled for input just like the physics addon does would help a lot. My plugins are complex, and some properties depend upon others, and/or are ignored depending on which fields are checked. Do you think that at least improvements like those are possible? I filed a feature request while ago that could be worth looking into. Didn't mentioned this there, but I could add it.

    github.com/Scirra/Construct-feature-requests/issues/309

    I suggested it for behaviors, but that's applicable also for plugins.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)