Hot answers tagged

1

I generally prefer ScriptableObjects for storing data that: You want to be editable with a GUI in the Unity Editor (as they can be edited in the Inspector much like the components on a GameObject) Is determined at design time and will not change at runtime You want to be able to assign to fields in the Unity Inspector Here's the typical strategy I'll use ...


1

You need to IEnumerator to yield return and wait for request to complete. Call this method inside coroutine. Method: public IEnumerator GetLeaderBoard() { UnityWebRequest myWr = UnityWebRequest.Get("http://your-url")); yield return myWr.SendWebRequest(); if (myWr.isNetworkError || myWr.isHttpError) { Debug.Log(myWr.error); ...


Only top voted, non community-wiki answers of a minimum length are eligible