- Home /
Answer by YoungDeveloper · Aug 11, 2015 at 06:51 PM
using System.Collections.Generic;
private Dictionary<string, Gameobject> data = new Dictionary<string, Gameobject>();
This would probably be the best bet because you will probably want to find fast certain gameobjects. You can also just create tuple class wrapper and store them in list.
Will this by default then access the object position to the world? So According to your code it seems I access and store all the gameobjects but really I just want to store the gameojects vector3 position. Also Iwould like to access by Tag
Dictionary<string, Vector3>
? where's the problem?
Im sorry Im just not following. So for the string I could have it look up all the game objects by the tag? So if my tag was floor it would be
private Dictionary<string, Gameobject> data = new Dictionary<floor, Vector3>();
would that then store the vector3 object poistions. How would I then call for it in a function? Sorry I am just learning code for the past few months.
I really appreciate your help
Your answer
Follow this Question
Related Questions
Store Vector3 from Array of GameObjects to Vector3Array 1 Answer
Setting position of a transform? 2 Answers
if close to one of a kind? 2 Answers
NGUI - Vector 3 Position different from position 1 Answer
How can I simplify this script? 0 Answers