- Home /
How to add gameobject inside of an array?
Hello,
I have a script that renders an object I click on, as "selected".
How can I add all the objects I select on an array, and then remove them when the variable "selected" is false?
This is the script that the objects have:
//more stuff...
var selected : boolean;
function OnMouseUp() {
selected = true;
}
//more stuff...
Comment
I think I need to use System.Collections.Generic for that, that Js doesn't allow
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
wont generate correctly
1 Answer
Store multiple types of data in an Array? 4 Answers
destroying a unit and removing it from a list 2 Answers
Handling multiple tags 1 Answer