- Home /
Question by
ClearRoseOfWar · Jan 17, 2016 at 11:07 PM ·
editorprogrammingliststags
Convert tags to list, then back to array
Heres what I've got:
List<string> lst = UnityEditorInternal.InternalEditorUtility.tags.OfType<string> ().ToList ();
lst.Add (selectedTag);
foreach (string str in lst) {
Debug.Log (str);
}
UnityEditorInternal.InternalEditorUtility.tags = lst.ToArray ();
I understand the list updates because Im creating the list and storing info into it. Its the last line of the above code that gives me a read only error.
So how can I overcome this?
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Creating Scenes Programmatically From A Deployed Build in Unity 1 Answer
Looking for a way to edit specific values in List by calling a random method? 0 Answers
How do you put a List under an Array item (Hard time explaining) 1 Answer
Preserving the custom inspected Target object between play states 0 Answers