Jump to content

Game Time and Planetarium Time [Solved]


Recommended Posts

Hello everyone,

Whitecat again; so here's a really annoying issue I have discovered.

Basically I have been building a Solar Cycle Simulating plugin for my Orbital Decay mod, everything is going fine, data is being loaded from a config file into a config node and subsequently manipulated and saved again.

However, my program relies on knowing the total elapsed time in the game to determine the position along the 11 year solar cycle. This is required on each scene transition and works for every transition except for one.

 

When loading the SpaceCenter screen from the Main Menu for the first time, the function Planetarium.GetUniversalTime() returns a number from 0.0 - 0.2, irrespective of the current game duration; (for example, my testing scenario is currently at year 52, so the number of seconds since the save beginning should be around 506912827 seconds and not 0.2).

    In any other transition, for example, from the TrackingStation to the SpaceCenter, the function works fine and returns the correct value (Being called in either the Awake() or Start() subroutines), but just not after the initial transition from the MainMenu...

Any ideas on this one?

Seems like a pretty big issue, I have replicated the problem by calling the function within the first 2 seconds of the scene being loaded and still no change. Furthermore I tried using the function of Planetarium.fetch.time and this returned a similar false number.

Whitecat106 :)

Edited by Whitecat106
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...