have GameObject transform point to vector3 in another GameObject

Hi,

I’ve got an array of vector3s on a controller gameobject,
I’d like to have a group of gameobjects point there localpositions to each vector3

I set each gameobject.transform.localposition = to each vector3

But it just copies the values instead of pointing to each vector3 variable

How would I get the transform components localposition variable on one gameobject to point to another gameObjects custom script vector3 variable

Cheers,
nick

If I understand what you are asking correctly, you cannot “get the transform components localposition variable on one gameobject to point to another gameObjects.” Vector3’s are value types which means you get a copy not a reference when you assign them. GameObjects cannot share the Transform, so you cannot point the transform of one game object to another. You could copy whatever you want each frame using a bit of code. And it is likely there is another way to accomplish whatever you are trying to accomplish with this code.