Answer the question
In order to leave comments, you need to log in
How to convert array to List in Unity?
There is a GET request that returns an array:
I need to find out its length, but Length returned 156
I thought that if I need to know the normal length, then I need to use Count, it's still an array, how can I convert it to List<> and find out the correct one length?
Answer the question
In order to leave comments, you need to log in
Well, firstly, apparently, there is not just an array, but a string with a json array inside.
By that .Length return the number of characters.
It needs to be deserialized first.
https://docs.unity3d.com/ScriptReference/JsonUtili...
Then you can find out the real size of the array in elements.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question