Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I have a couple scene, after I used

        foreach (GameObject o in Object.FindObjectsOfType<GameObject>())
        {
            Destroy(o);
        }

then, I reload the scene.

MissingReferenceException: The object of type 'DriveConnection' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.

turn out is the follow code

StartCoroutine(CoExecuteRequest(www, postData));


How can I properly stop the connect and start over?

(1 edit)

I really dont understand exacctly what you mean, or what you need. The code is all in the asset so you can do whatever you need.

The handling of scene transitions varies hugely from project to project, so I cant provide a reasonable solution that would cover every case. In that regard, making the connections handling working correctly according to your own approach, is entirely up to you.

(3 edits) (+2)

I got the same problem as the OP. The problem is that "driveConnectorRuntime" gets lost with a level reload, but "_connectionData" does not (pesky static variables! ;), so driveConnectorRuntime will be null if you use e.g. Drive.GetAllTables() on Start() again, and that throws an error. Can you please make an update so it checks if driveConnectorRuntime is null or not?

(My hack right now is to make _connectionData public and setting it to null by hand in an OnDestroy().)

(+1)

Hey there, thanks for the elaboration!

I will annotate this for the next update update indeed, and although I have not ETA atm, I definitively have a list of things to work on. 

Cheers!