How to check if Parse is initialized (Parse.com)

Anyone using Parse? I’m trying to see if there is a way to check whether parse has been initialized so I don’t try to call parse methods and get an exception. ie: something like Parse.isInitialized or a event I can listen to?

This is using the official Parse unity SDK.

All you have to do is add a game object and add the Parse Initialize Behaviour to it.

Specify your app key and .NET key in the Initialize script.

In your other script just add using parse; at the top.

Yes, I know that part, but what I’m trying to figure out is how to check if parse has been setup and is working. ie: once parse has been initialized (which can take time depending on internet connections, etc) I need to then submit a query right away to load my saved data. Or if for some reason parse was down/unable to connect then I need to check if it’s actually connected before making calls to it further in the game, or in testing lets say I’m in a scene where parse has not been initialized (because that object was in the main scene) then I need to know that it’s not initialized before trying to make calls.

I know this doesn’t exist, but is there anything like this I can check:

if( Parse.isInitialized )

So anyone out there use Parse?

So this thread is old but in case anyone else stumbles upon this issue, here’s the solution:

  1. Edit->Project Settings->Script Execution Order.
  2. Add Parse.ParseInitializeBehaviour.
  3. Place it above any script using Parse in the order, or just place it at the top to be sure.

I’m having the same issue, using parse sdk 1.2.16… The best that I have found out is that if it hasn’t officially initialized you will get a Null Reference Error… (Kind of like the Facebook sdk, except the Parse SDK does NOT disable your script. That was a joy figure out…)
I placed the Parse InitializeBehaviour script at the very top of the execution order, placed my Parse Control script right after the facebook scripts/dll…
The way that I have met with some success is that I set the User to be ParseUser.CurrentUser, and then I check to see if the User has been authenticated by testing the .IsAuthenticated (bool variable) and branching off of that. Sadly, whoever wrote the documentation for Parse, much like the Documentation for the Facebook SDK, knew the SDK inside and out… and forgets that not everyone else knows it’s inner workings as well as they. I do not have a direct “do this” answer for you on this, and after a lot of searching, no one else does either. The best that I can say is that in a perfect world, the sdk will recognize the stored Current User, and will let you authenticate them using LoginAsync() with the
.ContinueWith (t =>… so that you can then check t.IsFaulted (error) or t.IsCanceled (the user backed out) then if need be, check t.Exception / t.Exception.InnerException to see what the heck went wrong.
Also, once you have Authenticated them, be sure to assign t.Result (the Authenticated version of the User) back to your ParseUser User… otherwise, it will still fail, and the darn thing will unload itself on you giving you a Null Reference Error (yet again).
It truly should not be this difficult. that is WHAT an SDK (Software Development Kit) is for – to make things easier… not harder.

I have a similar issue to the one described above. Mine is even more pressing, since Parse does not work (much like this problem: Parse Platform

But it seems related to ParseInitializeBehaviour. I need to make sure I run this once, and only once and that it works across multiple scenes.

on your initial scene set your object to not destroy that includes the parse initialize script.

[Unity - Scripting API: Object.DontDestroyOnLoad

](Unity - Scripting API: Object.DontDestroyOnLoad)