Jump to content

GameInfo.gameScene not accurate.


Recommended Posts

So I was using GameInfo to check that my code was running only in the VAB and ran into some problems while porting my plugin over to .15

In .14.x GameInfo.gameScene == GameInfo.EDITOR while in the VAB.

In .15 GameInfo.gameScene == GameInfo.LOADING while in the VAB and in the hanger.

I\'m wondering if this is a bug or if this will continue going forward.

Link to comment
Share on other sites

I noticed the same thing a couple hours ago working on my modularized plugin example. Also showing up as 'Loading' when grabbed in flight.

If you\'re using the new OnStart(), 'PartModule.StartState state' does show relevant you can use, but you need to be using the PartModule system. I ran into a ton of bugs like this, that weren\'t immediately apparent doing a straight port of my 0.14 code.

That method, and the state will prove very useful I think, as scene switch detection was a serious problem with 0.14, and it seems to be called with the appropriate state each time the scene switches.

Link to comment
Share on other sites

I hadn\'t really looked at the PartModule system while doing my port but it seams like it will allow me to be more flexible and compartmentalized going forward, but will probly require a total rewrite to get there.

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