• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

Load scene dialog

fabio

Well-known member
Joined
Jan 30, 2021
Messages
77
Reactions
288
when I press the Load Scene button from VaM, the dialog box shows all the scenes, those from Saves/scene and those inside AddonPackages folder (VARs). Can I replicate this dialog in a script? I'm using SuperController.singleton.GetMediaPathDialog(...) which allow me to select only one directory at a time.
 
Almost there. I only need to figure it out how to select "All Flattened" from the shortcut list when the dialog appears.

Code:
using MVR.FileManagementSecure;

    string saveFolder = SuperController.singleton.savesDirResolved + "scene";
    List<ShortCut> shortCutsForDirectory = FileManagerSecure.GetShortCutsForDirectory(saveFolder, allowNavigationAboveRegularDirectories: true, useFullPaths: false, generateAllFlattenedShortcut: true, includeRegularDirsInFlattenedShortcut: true);
    SuperController.singleton.GetMediaPathDialog(ImportFileSelected, "json|vac|zip", null, true, true, false, null, false, shortCutsForDirectory);
 
You are feeding in the list of shortcuts there...what happens if you only put in the "All Flattened" one?
 
I'm getting the same result. GetMediaPathDialog has a 'suggestedFolder' as a parameter, I guess that's the one. If I'm right I need the path to "All Flattened". I've taken a look inside ShortCut (the first one points to All Flattened) and everything I tried on the console printed out "Saves / scene" or something like that. It's ok, the option is in there anyway :)
 
Back
Top Bottom