displaying a loading message

Hey there,

I have a script that accesses a MySQL database, and the query takes about 30 seconds. I was wondering how i might implement putting up some sort of loading message while the query is loading? (extra points for an animation)

the issue being that the application is totally frozen while it is running the query script.

I’ve noticed that any kind of “print” statement i put near the query actually desplays after it is completed. any thoughts on why that is?

It shouldn’t freeze, for one. You should be yielding, using a coroutine, or separate thread, or polling, or something. Use OnGUI to paint up a message while you are waiting. Your sql query code could set a variable that OnGUI tests to show itself (and if possible, progress).

Look at the async sql stuff like SqlCommand.BeginExecuteReader Method (System.Data.SqlClient) | Microsoft Learn