- Home /
Editing a new list of vector3's without changing the original list?
I just got Vectrosity and need to make a line of all the destinations for an object. Issue is that I need to use a single list of vector3's to create the line (as far as I'm aware).
I have a list of vector3's that is the objects queued destinations. I then need to insert the objects current location at index [0] in the list so that the first line point is at the objects location. Issue is that no matter how I try and accomplish this I'm still referencing the original destinations list, and inserting something at [0] on the list for the lines changes the original destinations list as well.
How do I go about creating a single List from a list of vector3's and an extra point without changing the original list that is being referenced? Do I need to clone it?
Edit: I initially was just going to use two lines. One line for all the destinations and a 2nd line for the current location of the object to the first destination. But I do not know how to get two separate lines to merge to the first corner is not wacky.
Answer by bartm4n · Mar 23, 2015 at 03:54 AM
I believe that you answered your own question; clone the list.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Destroy and rebuild game objects from lists 1 Answer
Passing List value as reference 1 Answer
How do I make a list of references to a variable? 2 Answers
SetActive(true) is not working 0 Answers