- Home /
Question by
The Spaniard · Mar 22, 2014 at 06:42 PM ·
javascriptcollectionseditor extention
[Editor] How to use System.Collections.Generic in a UnityScript Editor Script
Hi. I'd like to know how to get System.Collections.Generic to work in my editor scripts. I use Generic Lists all the time in normal scripts, but I can get them to work in editor scripts. For example where should the "import System...." go?
@CustomEditor(BezierSegmentScript)
@CanEditMultipleObjects
import System.Collections.Generic; //this line causes a compile error! Where should it go?
public class BezierSegmentEditorScript extends Editor {
override function OnInspectorGUI () {
DrawDefaultInspector();
var segmentSelectList : IList = new List.<GameObject>();
...
}
}
Thank you for your help!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613140916im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Array Index is Out Of Range... 0 Answers
I need a good data structure collection for Unity, where can I find it? 2 Answers
Dictionary suddenly loses its items 1 Answer
Generic methods in UnityScript 2 Answers
Enemy following Player in range 2 Answers