wondering PlayerPref

I really wondering C# PlayerPref.Get something, can waiting for data is loaded or just skip to next loop?

Thanks in advance

Nothing really “waits” in the Unity API, generally speaking. Every call will instantly return.

You can check it regularly and see if something has been saved in it yet.

1 Like

if I call

PlayerPref.GetString(“big_text”);
(it very big text)

so the program will freeze or waiting until this text has been loaded or just skip to the next line
and left this text to variable later?

It will freeze until it loads.

You should NOT be writing big objects to PlayerPrefs. Write them to a file instead. PlayerPrefs goes in the Windows Registry on Windows.

1 Like

Thanks in advanced!

Yes! and I always found a problem on my iPhone…
it looks like a PlayerPref still cannot loaded yet But my program skip it to the next line
So data still not loaded yet but the program skip it to start a problem…