private SceneGroup OnSceneGroupData(SceneGroup.Type type, string name, SceneGroup parent, ref SceneGroup leaf) { SceneGroup group = null; if (SceneGroup.Test(type, groupOptions)) { if (parent.childs.ContainsKey(name)) { group = parent.childs[name]; } // No group found for this idenfier if (group == null) { group = new SceneGroup(type, name); parent.childs[name] = group; } // Update the leaf if (SceneGroup.IsLeaf(type, groupOptions)) { leaf = group; } } else { group = parent; } return(group); }
private void SceneGroupToggle(MapzenMap mapzenMap, SceneGroup.Type type) { bool isSet = SceneGroup.Test(type, mapzenMap.GroupOptions); isSet = EditorGUILayout.Toggle(type.ToString(), isSet); mapzenMap.GroupOptions = isSet ? mapzenMap.GroupOptions | type : mapzenMap.GroupOptions & ~type; }