How do you download a plugin to check the source?

0 favourites
  • 6 posts
From the Asset Store
[C2] [C3] support C3 build service | support Banner ads, Interstitial ads, Rewared video ads.
  • I know I saw this mentioned somewhere, but now I can't find it. I just need to download the source for a couple of official plugins so I can figure out a few things.

    Also, if anyone has any ideas of where errors dealing with cors and 404 errors when using an XMLHttpRequest (to access project files) that were working in C2, any direction would be appreciated.

  • Official plugins are native - they aren't actually plugins anymore. I was the one who asked a while back.

  • I see. Well that's no fun.

  • I don't believe things are minified when previewing so if you open the browser debug console you can see the runtime portion of plugin's. I did that with the early c3 releases and the runtimes were each a seperate file. Not sure if things have changed since then.

    The edittime portions and the whole editor is minified like crazy so there is nothing to glean there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We don't want to put out the full source of the built-in plugins in C3, because in C2 this basically caused ongoing compatibility nightmares, to the extent I'd rather simply block the option of copy-pasting an addon to tweak it, and force us to come up with another way to alter other addons in an extensible way. You can however see the runtime scripts in preview mode, as pointed out. If you have any questions about the SDK I'll try to answer them on the forum.

    The point about loading project files is a good question, because it's different in C3. Preview mode doesn't actually host on a server, it keeps everything locally, so there's no direct URL to project files. You can solve this by asking the runtime for the URL to the resource with:

    var urlToRequest = this.runtime.getLocalFileUrl(projectFileUrl);[/code:132x49b4]
    In preview mode, urlToRequest will be a blob URL that you can fetch normally and will load the project file locally. After export this just passes the URL through and fetches it from the network as usual.
  • Thanks R0J0hound and Ashley

    Got it working.

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