- Home /
This question was
closed Nov 19, 2014 at 06:30 AM by
Landern for the following reason:
Duplicate Question: http://answers.unity3d.com/questions/834446/how-to-get-values-from-json-and-makes-array-of-gam.html
Question by
raj231 · Nov 19, 2014 at 06:30 AM ·
gameobjectarrayjsonflagged-for-delete
How to create array of GamwObject
I'm retrieving 3dmodel url values from JSON and it's getting and showing the 3dmodel urls. But how can i create array of game object from the url values
String modal3d=string.Format("{0} ", modellinksArray["link"]);
model3darray = GameObject.FindWithTag(modal3d);
for(int i = 0; i < model3darray.Length; i++)
{
Debug.Log("model3darray Number "+i+" is named "+model3darray[i].name);
}
URL values:
[{"link":"http://server.com/Unity/3dmodel/cat/cat.obj"},{"link":"http://server.com/Unity/3dmodel/leather_armchair/leather_armchair.obj"}]
Comment
Follow this Question
Related Questions
Use an objects (from array) position to focus a camera on 3 Answers
Cannot convert 'UnityEngine.Collider[]' to 'UnityEngine.gameObject[]' using OverlapSphere 3 Answers
Detection if a GameObject is below you or next to you? 1 Answer
Need help with an array. - C# 3 Answers
arrays / textures help 1 Answer