Jump to content

Have timing issue with onGameSceneLoadRequested


Recommended Posts

Timing issues are "fun" (I have a similar issue with FE needing to act before any other mod to avoid stepping on any toes). What I found with FE is that the function registered last gets called first, so I ended up registering to the gameevent in the Awake of the scene that I required it. Definitely not something I'd recomend doing lightly but so is everything else when playing with timing dependant functionality

Whatever you do get working, I highly recommend that you find a way to ensure it continues working (this is the sort of stuff that can break really easily and quietly). In my case, a seperate plugin that uses the normal route of adding a subcategory and verifies that it didn't get squashed

Link to comment
Share on other sites

6 hours ago, Crzyrndm said:

Timing issues are "fun" (I have a similar issue with FE needing to act before any other mod to avoid stepping on any toes). What I found with FE is that the function registered last gets called first, so I ended up registering to the gameevent in the Awake of the scene that I required it. Definitely not something I'd recomend doing lightly but so is everything else when playing with timing dependant functionality

Whatever you do get working, I highly recommend that you find a way to ensure it continues working (this is the sort of stuff that can break really easily and quietly). In my case, a seperate plugin that uses the normal route of adding a subcategory and verifies that it didn't get squashed

And here I was thinking it was a FILO, not a LIFO

What's the plugin which you are using for the verification?

Thanks

Edited by linuxgurugamer
Link to comment
Share on other sites

https://github.com/Crzyrndm/FilterExtension/blob/master/FE_Testing/FE_Test_Script.cs#L10-L27

Just a copy of the template that most other plugins adding to the part menu use. If everything is working ok, I get a blank icon as the last one in the list (I thought the plugin under it verified that it did get put in, but it seems there is still room for improvement there :wink:). Post build script copies it to my testing KSP instance so it never hits the directory I package for releases

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...