Morning all!

I will get right into it.

I am making a space sim and am pretty far into development, But I have hit a wall. I want to be able to tell one of my traders to deliver X goods to X station, in X sector (Scene). this action will be automated and The player can be in any other scene , What I cant figure out is 1. How to send an object to a scene that is not loaded, 2. How to track the current position of that object.

I am using Unity free and I am hoping that the Application.LoadLevelAdditiveAsync is not needed.

I can program, But just cannot figure out a method do to it! (E.g I am not asking for the code, just the concept)

Thank you!

Well, there is not really an easy solution for this. Unity can only have 1 scene loaded at the same time. You can load the other scene using loadAdditive, but that would load all the objects in the current scene which is not what you want(everything will most likely be intersecting, causing error, etc.)

A real simple solution that is used by multiple games is not to simulate the ship moving through the other sector at all, but just do a few simple time based calculations. eg. destination station is 100km from gate, at 50km/minute, that is then 2 minutes. Now the sector also has a piracy rate of 20%, so halfway we do a random roll against that, and see if the ship has been pirated.

You can store all that in an object that stays between scenes using DontDestroyOnLoad so that if you go to that sector, it looks up if you sent any ships, and puts them at approximately the correct position.

If you do want to simulate it completely, you would need to track every object that is in the other scene, which basically means to get all the objects from the other scene, but don’t render them. At that point, it might faster and easier to abandon unity’s scene system and write your own dynamic loading engine using, for example, Resources.Load. This will be a lot harder to make, and computing wise it is also more expensive.