Ejemplo n.º 1
0
 private void AddGroup(string name)
 {
     BeforeChange("Add group");
     SMGroupedSceneConfigurationOperation.Build(Target).AddGroup(name).Apply(Target);
     groupListData.SetSelectedItems(Target.groups, new string[] { name });
     levelListData.ClearSelection();
     EditorUtility.SetDirty(Target);
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Drop levels from the level list into the scene list
    /// </summary>
    private void DropLevelInScenes(IList <int> levelIndices)
    {
        BeforeChange("Remove levels");
        IList <string> selectedLevels = ListOperation <string> .FilterList(Target.levels, levelIndices);

        SMSceneConfigurationOperation.Build(Target).Ignore(selectedLevels).Apply(Target);
        sceneListData.SetSelectedItems(scenes, selectedLevels);
        levelListData.ClearSelection();
        SyncBuildSettingsIfRequired();
        EditorUtility.SetDirty(Target);
    }
Ejemplo n.º 3
0
    /// <summary>
    /// Moves the selected level into the top position making it the first level.
    /// </summary>
    private void MoveToFirst()
    {
        BeforeChange("Move level to first position");
        IList <string> selectedLevels = levelListData.GetSelectedItems(Target.levels);

        SMSceneConfigurationOperation.Build(Target).MoveLevelToTop(selectedLevels).Apply(Target);
        levelListData.SetSelectedItems(Target.levels, selectedLevels);
        EditorUtility.SetDirty(Target);
    }