- Home /
Question by
naqvir · Apr 06, 2012 at 06:30 PM ·
errorgameobjectstartdictionarycompiling
Dictionary within a dictionary?
Hi there (again and again and again.. lol and expect much more greetings soon) :P
Anyways im having problems initialising a dictionary within a dictionary. Ive made sure that my spaces are included :P , but the compilor seems to say otherwise. Something about not being able to convert ..... If im declaring this wrong, then please do tell. My aim is to have a for each key the value will have its own dictionary as well.
Heres what i have so far.
import System.Collections.Generic;
private var componentsExtracted:Dictionary;
function Start()
{
componentsExtracted = new Dictionary.<GameObject,Dictionary.<Component,float> >();
}
Comment
Best Answer
Answer by naqvir · Apr 06, 2012 at 07:03 PM
import System.Collections.Generic;
private var componentsExtracted:Dictionary.<GameObject,Dictionary.<Component,float > >;
function Start()
{
componentsExtracted = new Dictionary.<GameObject,Dictionary.<Component,float > >();
}
Your answer
Follow this Question
Related Questions
Compilor Error using Dictonary collection 1 Answer
typedefing in unity 1 Answer
Need help with logic problem (JavaScript) 1 Answer
MonoBehavior.Start() called infinite times? 1 Answer
ES2 Can't save Dictionary 1 Answer