public void RemoveObject(LayeredObject lo)
 {
     string name = lo.layerName;
     if (dict.ContainsKey (name)) {
         dict[name].Remove(lo);
     }
 }
        public void AddObject(LayeredObject lo)
        {
            string name = lo.layerName;
            //			print (name + ":" + lo.name);
            if (!dict.ContainsKey (name)) {
                dict.Add (name, new List<LayeredObject> ());

                ObjectLayerEntry cde = GameObject.Instantiate (prefab) as ObjectLayerEntry;
                cde.transform.SetParent (scrollContent.transform, false);
                cde.Set (name, this);
                cde.toggle.isOn = lo.visible;

                if(entryMap.ContainsKey(name)) {
                    entryMap[name] = cde;
                } else {
                    entryMap.Add (name, cde);
                }

                if(layerMap.ContainsKey(name)) {
                    layerMap[name] = lo.visible;
                } else {
                    layerMap.Add (name, lo.visible);
                }
            }
            if(!dict[name].Contains(lo)){
                dict [name].Add (lo);
            }

            if(layerMap.ContainsKey(name)) {
                lo.visible = layerMap [name];
                entryMap [name].toggle.isOn = lo.visible;
            }
        }