Jump to content

Subclassing from another plugin - loading order


Recommended Posts

So I have two plugins I\'m working on. One with my base files and another one providing implementation by subclassing a base class. It works when the base plugin is loaded first, but if it\'s loaded second my implementation plugin starts throwing errors on load.

Is there some way to make sure the base plugin is loaded first?

Link to comment
Share on other sites

Just put both plugins in the same namespace. If your stuff is directly tied to Parts on a vessel. The best way to load everything into the engine is to call foreach(Part p in vessel.parts). Then make a Initialize() (NOt a constructor) method on your parts and call it in either onPartLoad or onFlightStart or similar.

Link to comment
Share on other sites

Haven\'t tried Romfarer\'s namespace trick, but I discovered the plugin loader broke inter-plugin references the last time it got updated. It\'s supposed to be being fixed, but the workaround I had was to append \'Z\' characters to the plugin file name, as they apparently load in alpha order.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...