• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.

Load scene dialog

fabio

Well-known member
Joined
Jan 30, 2021
Messages
78
Reactions
287
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