Beispiel #1
0
        private void InitAnimationNameUI(bool rightSide)
        {
            {
                var animationLabelJSON = new JSONStorableString("Rename Animation", "Rename animation:");
                RegisterStorable(animationLabelJSON);
                var animationNameLabelUI = plugin.CreateTextField(animationLabelJSON, rightSide);
                RegisterComponent(animationNameLabelUI);
                var layout = animationNameLabelUI.GetComponent <LayoutElement>();
                layout.minHeight            = 36f;
                animationNameLabelUI.height = 36f;
                UnityEngine.Object.Destroy(animationNameLabelUI.gameObject.GetComponentInChildren <Image>());
            }

            {
                _animationNameJSON = new JSONStorableString("Animation Name", "", (string val) => UpdateAnimationName(val));
                RegisterStorable(_animationNameJSON);
                var animationNameUI = plugin.CreateTextInput(_animationNameJSON, rightSide);
                RegisterComponent(animationNameUI);
                var layout = animationNameUI.GetComponent <LayoutElement>();
                layout.minHeight       = 50f;
                animationNameUI.height = 50;

                _animationNameJSON.valNoCallback = current.AnimationName;
            }
        }
        private void InitRenameAnimation()
        {
            _animationNameJSON = new JSONStorableString("Animation name (group with 'group/anim')", "", UpdateAnimationName);
            var animationNameUI = prefabFactory.CreateTextInput(_animationNameJSON);

            _animationNameJSON.valNoCallback = current.animationName;
        }
        ExpressionAnimationUI CreateUIFromExpressionPath(string path, JSONStorableString store)
        {
            string fileName = PathExt.GetFileNameWithoutExtension(path);

            store.SetVal(sc.NormalizePath(path));

            string jsonString = sc.ReadFileIntoString(path);

            ExpressionAnimation animation = new ExpressionAnimation(morphControl, jsonString);

            JSONStorableAction action = new JSONStorableAction("Play " + fileName, () =>
            {
                PlayExpression(animation);
            });

            RegisterAction(action);

            ExpressionAnimationUI ui = null;

            ui = new ExpressionAnimationUI(this, fileName, animation, () =>
            {
                store.SetVal("");
                uiList.Remove(ui);
                animationLookup.Remove(fileName);
                DeregisterAction(action);
            });



            animationLookup[fileName] = animation;
            expressionChooser.choices = animationLookup.Keys.ToList();
            uiList.Add(ui);
            return(ui);
        }
        private void InitRenameAnimation()
        {
            _animationNameJSON = new JSONStorableString("Animation Name", "", (string val) => UpdateAnimationName(val));
            var animationNameUI = prefabFactory.CreateTextInput(_animationNameJSON);

            _animationNameJSON.valNoCallback = current.animationName;
        }
Beispiel #5
0
    private void ShowSnapshot(JSONStorableString logsJSON, string snapshotName)
    {
        var snapshot = context.diagnostics.snapshots.FirstOrDefault(s => s.name == snapshotName);

        if (snapshot == null)
        {
            return;
        }
        var sb = new StringBuilder();

        sb.AppendLine($"<b>Snapshot</b>:\n{snapshot.name}");
        sb.AppendLine($"<b>Active</b>:\n{snapshot.active?.ToString() ?? "Unknown"}");
        sb.AppendLine($"<b>Pose</b>:\n{((snapshot.poseJSON?.Count ?? 0) > 0 ? $"{snapshot.poseJSON.Count} nodes" : "None")}");
        sb.AppendLine($"<b>Player Height Adjust</b>:\n{snapshot.playerHeightAdjust}");
        sb.AppendLine($"<b>World Scale</b>:\n{snapshot.worldScale}");
        sb.AppendLine($"<b>Navigation Rig</b>:\n{snapshot.navigationRig}");
        sb.AppendLine($"<b>Head</b>:\n{snapshot.head}");
        sb.AppendLine($"<b>Left Hand</b>:\n{snapshot.leftHand}");
        sb.AppendLine($"<b>Right Hand</b>:\n{snapshot.rightHand}");
        sb.AppendLine($"<b>Vive Tracker 1</b>:\n{snapshot.viveTracker1}");
        sb.AppendLine($"<b>Vive Tracker 2</b>:\n{snapshot.viveTracker2}");
        sb.AppendLine($"<b>Vive Tracker 3</b>:\n{snapshot.viveTracker3}");
        sb.AppendLine($"<b>Vive Tracker 4</b>:\n{snapshot.viveTracker4}");
        sb.AppendLine($"<b>Vive Tracker 5</b>:\n{snapshot.viveTracker5}");
        sb.AppendLine($"<b>Vive Tracker 6</b>:\n{snapshot.viveTracker6}");
        sb.AppendLine($"<b>Vive Tracker 7</b>:\n{snapshot.viveTracker7}");
        sb.AppendLine($"<b>Vive Tracker 8</b>:\n{snapshot.viveTracker8}");
        logsJSON.val = sb.ToString();
    }
Beispiel #6
0
        public void InitUserInterface()
        {
            _initCompleted = false;

            BrightnessPollIntervalStorable = new JSONStorableFloat("Brightness Poll Delay", BRIGHTNESS_POLL_DEFAULT, (float value) => { _detector.PollFrequency = value; }, 0f, 5f);
            CreateSlider(BrightnessPollIntervalStorable);
            RegisterFloat(BrightnessPollIntervalStorable);

            LightAdjustSpeedStorable = new JSONStorableFloat("Light Adjust Within", 3.50f, 0f, 10f);
            CreateSlider(LightAdjustSpeedStorable);
            RegisterFloat(LightAdjustSpeedStorable);

            DarkAdjustSpeedStorable = new JSONStorableFloat("Dark Adjust Within", 5.00f, 0f, 10f);
            CreateSlider(DarkAdjustSpeedStorable);
            RegisterFloat(DarkAdjustSpeedStorable);

            IdleAdjustSpeedStorable = new JSONStorableFloat("Idle: Adjust Over Seconds", 1.00f, 0f, 10f);
            CreateSlider(IdleAdjustSpeedStorable, rightSide: true);
            RegisterFloat(IdleAdjustSpeedStorable);

            IdleStrengthStorable = new JSONStorableFloat("Idle: Strength", 0.05f, 0f, 1f);
            CreateSlider(IdleStrengthStorable, rightSide: true);
            RegisterFloat(IdleStrengthStorable);

            IdleMaxDelayStorable = new JSONStorableFloat("Idle: Next Random Run", 2.50f, 0f, 10f);
            CreateSlider(IdleMaxDelayStorable, rightSide: true);
            RegisterFloat(IdleMaxDelayStorable);

            _screenAtomUid = new JSONStorableString("DetectorAtomUid", String.Empty);
            RegisterString(_screenAtomUid);
        }
Beispiel #7
0
        public override void Init()
        {
            try
            {
                pluginVersionStorable     = new JSONStorableString("Version", "");
                pluginVersionStorable.val = $"{version}";
                RegisterString(pluginVersionStorable);

                if (containingAtom.type != "Person")
                {
                    Log.Error($"Add to a Person atom, not {containingAtom.type}");
                    return;
                }

                AdjustJoints   breastControl     = containingAtom.GetStorableByID("BreastControl") as AdjustJoints;
                DAZPhysicsMesh breastPhysicsMesh = containingAtom.GetStorableByID("BreastPhysicsMesh") as DAZPhysicsMesh;
                chest    = containingAtom.GetStorableByID("chest").transform;
                geometry = containingAtom.GetStorableByID("geometry") as DAZCharacterSelector;

                Globals.BREAST_CONTROL      = breastControl;
                Globals.BREAST_PHYSICS_MESH = breastPhysicsMesh;
                Globals.GEOMETRY            = containingAtom.GetStorableByID("geometry") as DAZCharacterSelector;

                settingsMonitor = gameObject.AddComponent <SettingsMonitor>();
                settingsMonitor.Init(containingAtom);

                atomScaleListener    = new AtomScaleListener(containingAtom.GetStorableByID("rescaleObject").GetFloatJSONParam("scale"));
                breastMorphListener  = new BreastMorphListener(geometry.morphBank1.morphs);
                breastMassCalculator = new BreastMassCalculator();

                gravityMorphH   = new GravityMorphHandler();
                nippleMorphH    = new NippleErectionMorphHandler();
                gravityPhysicsH = new GravityPhysicsHandler();
                staticPhysicsH  = new StaticPhysicsHandler(GetPackagePath());

                InitPluginUILeft();
                InitPluginUIRight();
                InitSliderListeners();
                UpdateLogarithmicGravityAmount(gravity.val);

                modeChooser.setCallbackFunction = (val) =>
                {
                    UpdateButtonLabels(modeButtonGroup, val);
                    staticPhysicsH.LoadSettings(val);
                    staticPhysicsH.FullUpdate(massEstimate, softness.val, nippleErection.val);
                };
                if (string.IsNullOrEmpty(modeChooser.val))
                {
                    modeChooser.val = Const.MODES.Values.First();
                }

                StartCoroutine(SubscribeToKeybindings());
                StartCoroutine(RefreshStaticPhysics(() => settingsMonitor.enabled = true));
                StartCoroutine(MigrateFromPre2_1());
            }
            catch (Exception e)
            {
                Log.Error($"{e}");
            }
        }
Beispiel #8
0
        private void InitPluginUIRight()
        {
            bool rightSide = true;

            statusUIText = NewTextField("statusText", 28, 100, rightSide);

#if DEBUG_PHYSICS || DEBUG_MORPHS
            UIDynamicTextField angleInfoField = CreateTextField(baseDebugInfo, rightSide);
            angleInfoField.height          = 125;
            angleInfoField.UItext.fontSize = 26;
#else
            CreateNewSpacer(10f, true);
            JSONStorableString usage2Area = NewTextField("Usage Info Area 2", 28, 135, rightSide);
            string             usage2     = UI.Size("\n", 12);
            usage2 += "Physics settings mode selection.";
            usage2Area.SetVal(usage2);

            CreateNewSpacer(10f, true);
            JSONStorableString usage1Area = NewTextField("Usage Info Area 1", 28, 255, rightSide);
            string             usage1     = UI.Size("\n", 12);
            usage1 += "Breast softness adjusts soft physics settings from very firm to very soft.\n\n";
            usage1 += "Breast gravity adjusts how much pose morphs shape the breasts in all orientations.";
            usage1Area.SetVal(usage1);
#endif
#if DEBUG_PHYSICS
            UIDynamicTextField physicsInfoField = CreateTextField(physicsDebugInfo, rightSide);
            physicsInfoField.height          = 945;
            physicsInfoField.UItext.fontSize = 26;
#elif DEBUG_MORPHS
            UIDynamicTextField morphInfo = CreateTextField(morphDebugInfo, rightSide);
            morphInfo.height          = 945;
            morphInfo.UItext.fontSize = 26;
#endif
        }
Beispiel #9
0
        public UIDynamicTextField CreateUITextfieldInCanvas(JSONStorableString jss, float x, float y)
        {
            var canvas = _atom.GetComponentInChildren <Canvas>();

            if (canvas == null)
            {
                throw new NullReferenceException("Could not find a canvas to attach to");
            }

            var transform = UnityEngine.Object.Instantiate(_owner.manager.configurableTextFieldPrefab.transform);

            if (transform == null)
            {
                throw new NullReferenceException("Could not instantiate configurableButtonPrefab");
            }
            _components.Add(transform);
            transform.SetParent(canvas.transform, false);
            transform.gameObject.SetActive(true);

            var ui = transform.GetComponent <UIDynamicTextField>();

            if (ui == null)
            {
                throw new NullReferenceException("Could not find a UIDynamicTextField component");
            }
            jss.dynamicText = ui;

            transform.Translate(Vector3.down * y, Space.Self);
            transform.Translate(Vector3.right * x, Space.Self);

            return(ui);
        }
        private void InitRenameLayer()
        {
            _layerNameJSON = new JSONStorableString("Layer Name", "", (string val) => UpdateLayerName(val));
            var layerNameUI = prefabFactory.CreateTextInput(_layerNameJSON);

            _layerNameJSON.valNoCallback = current.animationLayer;
        }
Beispiel #11
0
        private void InitExplanation()
        {
            var textJSON = new JSONStorableString("Help", HelpText);
            var textUI   = prefabFactory.CreateTextField(textJSON);

            textUI.height = 1070f;
        }
        private void InitPreviewUI()
        {
            _nextAnimationPreviewJSON = new JSONStorableString("Next Preview", "");
            var nextAnimationResultUI = prefabFactory.CreateTextField(_nextAnimationPreviewJSON);

            nextAnimationResultUI.height = 50f;
        }
Beispiel #13
0
        public override void Init()
        {
            try
            {
                if (containingAtom.type != "Person")
                {
                    Log.Error($"Plugin is for use with 'Person' atom, not '{containingAtom.type}'");
                    return;
                }

                pluginVersion = new JSONStorableString("version", "1.0.1");
                RegisterString(pluginVersion);

                if (gameObject.GetComponent <HairSimHandler>() == null)
                {
                    hairSimHandler = gameObject.AddComponent <HairSimHandler>();
                }

                InitPluginUILeft();
                hairSimHandler.Init(containingAtom);
                InitPluginUIRight();
            }
            catch (Exception e)
            {
                Log.Error($"Exception caught: {e}");
                hairSimHandler.enabled = false;
            }
        }
Beispiel #14
0
        private void InitAnimationsListUI(bool rightSide)
        {
            _animationsListJSON = new JSONStorableString("Animations List", "");
            RegisterStorable(_animationsListJSON);
            var animationsListUI = plugin.CreateTextField(_animationsListJSON, rightSide);

            RegisterComponent(animationsListUI);
        }
Beispiel #15
0
        public override void Init()
        {
            try
            {
                disableUpdate       = true;
                pluginLabelJSON.val = "Wardrobe v2.2.1 (by VamDazzler)";

                // Obtain our person
                if (containingAtom == null)
                {
                    SuperController.LogError("Please add this plugin to a PERSON atom.");
                    throw new Exception("Halting Wardrobe due to de-Atom-ization");
                }

                // Create the clothing items drop-down
                clothingItems = new JSONStorableStringChooser("clothing", EMPTY_CHOICES, null, "Clothing Item");
                UIDynamicPopup clothingSelector = CreateScrollablePopup(clothingItems);

                // Create the outfit selection drop-down
                outfitNames = new JSONStorableStringChooser("outfit", EMPTY_CHOICES, null, "Outfit");
                UIDynamicPopup outfitSelector = CreateScrollablePopup(outfitNames);
                outfitSelector.popupPanelHeight = 900f;
                RectTransform panel = outfitSelector.popup.popupPanel;
                panel.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 400f);
                panel.pivot = new Vector2(0.35f, 1.0f);

                // Create the slot in which all changed textures are stored.
                storedOutfits = new StorableReplacements();
                RegisterString(storedOutfits);

                // Action to perform replacement
                applyButton = CreateButton("Apply");
                applyButton.button.onClick.AddListener(ApplyOutfitCallback);

                // Force reload
                forceReloadButton = CreateButton("Refresh Textures");
                forceReloadButton.button.onClick.AddListener(ForceReloadCallback);

                // Create a dump button
                UIDynamic align = CreateSpacer(true);
                align.height = 25;
                dumpButton   = CreateButton("Dump OBJ and MTL files - look in root", true);
                if (dumpButton != null)
                {
                    dumpButton.button.onClick.AddListener(DumpButtonCallback);
                    dumpButton.button.interactable = false;
                }

                // Create the material listing window
                materialList = new JSONStorableString("matlist", "");
                UIDynamicTextField matListTextField = CreateTextField(materialList, true);
                matListTextField.height = 400f;
            }
            catch (Exception ex)
            {
                SuperController.LogError($"Could not initialize Wardrobe {ex}");
            }
        }
Beispiel #16
0
        public UIDynamicTextField CreateTextInput(JSONStorableString jss)
        {
            RegisterStorable(jss);

            var container = new GameObject();

            container.transform.SetParent(transform, false);
            {
                var rect = container.AddComponent <RectTransform>();
                rect.pivot = new Vector2(0, 1);

                var layout = container.AddComponent <LayoutElement>();
                layout.preferredHeight = 70f;
                layout.flexibleWidth   = 1f;
            }

            var textfield = Instantiate(plugin.manager.configurableTextFieldPrefab).GetComponent <UIDynamicTextField>();

            textfield.gameObject.transform.SetParent(container.transform, false);
            {
                jss.dynamicText = textfield;

                textfield.backgroundColor = Color.white;

                var input = textfield.gameObject.AddComponent <InputField>();
                input.textComponent = textfield.UItext;
                jss.inputField      = input;

                Destroy(textfield.GetComponent <LayoutElement>());

                var rect = textfield.GetComponent <RectTransform>();
                rect.anchorMin        = new Vector2(0, 1);
                rect.anchorMax        = new Vector2(1, 1);
                rect.pivot            = new Vector2(0, 1);
                rect.anchoredPosition = new Vector2(0, -30f);
                rect.sizeDelta        = new Vector2(0, 40f);
            }

            var title = new GameObject();

            title.transform.SetParent(container.transform, false);
            {
                var rect = title.AddComponent <RectTransform>();
                rect.anchorMin        = new Vector2(0, 1);
                rect.anchorMax        = new Vector2(1, 1);
                rect.pivot            = new Vector2(0, 1);
                rect.anchoredPosition = new Vector2(0, 0f);
                rect.sizeDelta        = new Vector2(0, 30f);

                var text = title.AddComponent <Text>();
                text.font     = textfield.UItext.font;
                text.text     = jss.name;
                text.fontSize = 24;
                text.color    = new Color(0.85f, 0.8f, 0.82f);
            }

            return(textfield);
        }
Beispiel #17
0
        public void CreateUI()
        {
            pluginLabelJSON.val = PluginName;

            _builder = new UIBuilder();
            _group   = new UIGroup(_builder);
            _group.BlacklistStorable("Device Report");

            PluginTitle = _group.CreateDisabledButton("Plugin", new Color(0.3f, 0.3f, 0.3f), Color.white);

            PresetButtonGroup = _group.CreateHorizontalGroup(510, 50, new Vector2(10, 0), 3, idx => _group.CreateButtonEx());
            var saveButton = PresetButtonGroup.items[0].GetComponent <UIDynamicButton>();

            saveButton.buttonText.fontSize = 25;
            saveButton.label       = "Save Config";
            saveButton.buttonColor = new Color(0.309f, 1f, 0.039f) * 0.8f;
            saveButton.textColor   = Color.white;
            saveButton.button.onClick.AddListener(SaveConfigCallback);

            var loadButton = PresetButtonGroup.items[1].GetComponent <UIDynamicButton>();

            loadButton.buttonText.fontSize = 25;
            loadButton.label       = "Load Config";
            loadButton.buttonColor = new Color(1f, 0.168f, 0.039f) * 0.8f;
            loadButton.textColor   = Color.white;
            loadButton.button.onClick.AddListener(LoadConfigCallback);

            var defaultButton = PresetButtonGroup.items[2].GetComponent <UIDynamicButton>();

            defaultButton.buttonText.fontSize = 25;
            defaultButton.label       = "As Default";
            defaultButton.buttonColor = new Color(1f, 0.870f, 0.039f) * 0.8f;
            defaultButton.textColor   = Color.white;
            defaultButton.button.onClick.AddListener(SaveDefaultConfigCallback);

            OutputTargetSettings = new OutputTargetSettings(t => _outputTarget = t);
            OutputTargetSettings.CreateUI(_group);

            var debugGroup = new UIGroup(_group);
            var visible    = false;

            DebugTitle = _group.CreateButton("Debug", () => debugGroup.SetVisible(visible = !visible), new Color(0.3f, 0.3f, 0.3f), Color.white);

            DebugDrawEnableToggle          = debugGroup.CreateToggle("Plugin:DebugDrawEnable", "Enable Debug", false);
            DeviceReportText               = debugGroup.CreateTextField("Device Report", "", 320);
            DeviceReportText.text.font     = Font.CreateDynamicFontFromOSFont("Consolas", 24);
            DeviceReportText.text.fontSize = 24;

            debugGroup.SetVisible(false);

            MotionSourceTitle   = _group.CreateDisabledButton("Motion Source", new Color(0.3f, 0.3f, 0.3f), Color.white);
            MotionSourceChooser = _group.CreatePopup("Plugin:MotionSourceChooser", "Select motion source", new List <string> {
                "Male + Female", "Asset + Female", "D***o + Female", "Animation Pattern", "Range Test"
            }, "Male + Female", MotionSourceChooserCallback);

            DeviceChooserCallback("T-code");
            MotionSourceChooserCallback("Male + Female");
        }
        private void InitPreviewUI(bool rightSide)
        {
            _nextAnimationPreviewJSON = new JSONStorableString("Next Preview", "");
            RegisterStorable(_nextAnimationPreviewJSON);
            var nextAnimationResultUI = plugin.CreateTextField(_nextAnimationPreviewJSON, rightSide);

            nextAnimationResultUI.height = 30f;
            RegisterComponent(nextAnimationResultUI);
        }
 public StorableStringList(MVRScript script, string prefix)
 {
     for (int i = 0; i < maxCount; i++)
     {
         JSONStorableString store = new JSONStorableString(prefix + i, "");
         storables.Add(store);
         script.RegisterString(store);
     }
 }
Beispiel #20
0
        public UIDynamicTextField CreateTextField(JSONStorableString jss)
        {
            RegisterStorable(jss);
            var ui = Instantiate(plugin.manager.configurableTextFieldPrefab).GetComponent <UIDynamicTextField>();

            ui.gameObject.transform.SetParent(transform, false);
            jss.dynamicText = ui;
            return(ui);
        }
        private void TitleUITextField()
        {
            JSONStorableString storable = new JSONStorableString("title", "");
            UIDynamicTextField field    = CreateTextField(storable);

            field.UItext.fontSize = 36;
            field.height          = 100;
            storable.val          = $"<b>{nameof(EmissiveClothing)}</b>\n<size=28>v{version}</size>";
        }
Beispiel #22
0
        private JSONStorableString NewTextField(string paramName, int fontSize, int height = 100, bool rightSide = false)
        {
            JSONStorableString storable  = new JSONStorableString(paramName, "");
            UIDynamicTextField textField = CreateTextField(storable, rightSide);

            textField.UItext.fontSize = fontSize;
            textField.height          = height;
            return(storable);
        }
Beispiel #23
0
        private void InitExplanation()
        {
            var textJSON = new JSONStorableString("Help", HelpScreen.HelpText);

            RegisterStorable(textJSON);
            var textUI = plugin.CreateTextField(textJSON, true);

            textUI.height = 900;
            RegisterComponent(textUI);
        }
Beispiel #24
0
 public void RemoveTextField(JSONStorableString jss, UIDynamicTextField component = null)
 {
     if (jss.dynamicText != null)
     {
         jss.dynamicText = null; _storables.Remove(jss);
     }
     if (component != null)
     {
         Destroy(component.gameObject);
     }
 }
Beispiel #25
0
        public JSONStorableString CreateTextField(string paramName, string startingValue, float height, JSONStorableString.SetStringCallback callback, bool rightSide = false)
        {
            var storable      = new JSONStorableString(paramName, startingValue, callback);
            var textField     = UIManager.CreateTextField(storable, rightSide);
            var layoutElement = textField.gameObject.GetComponent <LayoutElement>();

            layoutElement.minHeight       = height;
            layoutElement.preferredHeight = height;

            return(storable);
        }
Beispiel #26
0
        private void InitExplanation()
        {
            var textJSON = new JSONStorableString("Help", @"
<b>Locked</b>

Enable ""Edit Mode"" to make modifications to this animation.
");
            var textUI   = prefabFactory.CreateTextField(textJSON);

            textUI.height = 350f;
        }
Beispiel #27
0
        public override void Init()
        {
            base.Init();

            _runUI = CreateButton("Run", false);
            _runUI.button.onClick.AddListener(Run);

            _resultJSON = new JSONStorableString("Test Results", "Running...");

            Run();
        }
Beispiel #28
0
    private void CreateTextInput(JSONStorableString jss, bool rightSide = false)
    {
        var textfield = CreateTextField(jss, rightSide);

        textfield.height          = 1f;
        textfield.backgroundColor = Color.white;
        var input = textfield.gameObject.AddComponent <InputField>();

        input.textComponent = textfield.UItext;
        jss.inputField      = input;
    }
Beispiel #29
0
        private void StringTextbox(ref JSONStorableString output, string name, string start, JSONStorableString.SetStringCallback callback, bool rhs)
        {
            output = new JSONStorableString(name, start, callback);

            RegisterString(output);
            var textfield = CreateTextField(output, rhs);
            var input     = textfield.gameObject.AddComponent <InputField>();

            input.textComponent       = textfield.UItext;
            textfield.backgroundColor = Color.white;
            output.inputField         = input;
        }
Beispiel #30
0
 public void OpenLoadFolder(List <NamedAudioClip> nacs, JSONStorableString lastPath)
 {
     SuperController.singleton.GetDirectoryPathDialog(
         (path) => {
         if (!string.IsNullOrEmpty(path))
         {
             nacs.Clear();
             nacs.AddRange(this.LoadFolder(path, filetype.val));
             lastPath.val = _path.val = path;
         }
     }, lastPath.val);
 }