- Home /
Question by
DavidDebnar · Jun 26, 2013 at 05:07 PM ·
performancelistdictionaryrectgenerics
[JS] String,List dictionary doesn't compile. Any suggestions?
Hey guys. I'm using JS, and I've been trying to make a String,List dictionary, but without an success.
import System.Collections.Generic;
static var dict : Dictionary.<String,List.<Rect>>;
What I could do is use a dictionary, where each key would be the actual name + index. Would this impact performance?
Comment
Best Answer
Answer by Eric5h5 · Jun 26, 2013 at 05:34 PM
The Unityscript compiler has an issue where >>
is always interpreted as a bitshift operator. Instead:
static var dict : Dictionary.<String,List.<Rect> >;
It's actually the compiler that's stupid, since that's not an issue in C#. $$anonymous$$aybe I should get around to submitting that as a bug report....