Do something when default splash screen shows

I’m new to Unity. What a great game development tool. So I’m trying to make my first game and port all my settings from previous game engine to this one.

One of the settings is that I must make a HTTP call and get a feedback from my server. I’m using Unity personal edition and I would like to make a background call right away when Unity splash screen is on the screen.

Any ideas? :slight_smile:

void Awake, OnEnable, Start

Thank you for your reply :slight_smile:

As I said, I’m new to the unity, so I’m actually unfamiliar with unity lifecycle. I know that onStart or onUpdate and similar methods go to the each script, but I’m not sure on which script should I implement those methods you’ve just posted.

Probably they don’t go on my custom game object, or main camera object, right?

So,

Awake is called when the scene is loading, Start is called right at the start.

OnEnable is called whenever the gameobject becomes active.

For your scenario, I would have a Manager game object like a Game Manager that controls the current state of the game.

Have that be in your first scene, and on Awake do exactly what you want to happen after the splash screen.

1 Like

Take a look through the learn section to familiarise yourself Learn

You wont be able to do anything immediately when the splashscreen shows as this is before the engine is ready but you may be able to get a script running towards the end once everything is loaded (probably the last second or so), by doing what SubZeroGaming suggested and having a script with Awake or Start.

By default you can’t start any execution until after the splash screen shows.

I have seen some iOS games that execute a custom splash screen before the Unity personal one. I would imagine this is done by wrapping the Unity app in XCode. You might be able to do the call there.

Otherwise its wait until the splash screen is done.