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

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