#OK, I think I'm nearly there. There's an

1 messages ยท Page 1 of 1 (latest)

turbid sleet
agile hound
#

So my flow is three scripts:

UGSAccounts (Sign in)
UGSCloudSaves (Cloud)
BootManager (Manages the Main Menu)

UGS Accounts awaits InitialiseAsync, it then awaits SignInAnonymouslyAsync.

BootManager holds an AuthStateChanged function, it will not do anything until the player signs in and that pings.

UGSCloudSaves does nothing, it is called by BootManager.

#

But still, somehow, CloudSaves doesn't seem to be ready (even though it awaits the IsSignedIn), which the BootManager is also triggered by.

turbid sleet
#

Ah I see - in that case I would recommend using an event system that will emit a message that other scripts can receive. This will allow you to decouple the scripts from each other. Here is a pretty good video on the topic https://www.youtube.com/watch?v=7_dyDmF0Ktw

Let's build the ultimate event system in Unity. With just 2 Scripts, you'll improve your programming skills and be able to organise and decouple your code much better! Less spaghetti code and more independent systems!

โ˜… Join the Kingdom:
https://discord.gg/M2qfnUGxAz

โ˜… Download the 2 epic scripts here: https://www.gamedev.lu/game-assets
โ˜… Wat...

โ–ถ Play video
agile hound
#

Alrighty, this makes sense! Thanks Francois, I appreciate you taking the time to help me with this.

turbid sleet
#

no problem!

digital helm
#

the way you originally wrote this is @agile hound makes more sense, than the burdensome event whatever... the ugs functionality is materially decoupled from the rest of your game, so it makes sense that they are eventually consistent and you do the right thing

agile hound