Exposing FileLocationSettings #76
Replies: 2 comments 2 replies
-
Hi Jakob, I think your suggestion would be a welcome addition, to allow users to override the default settings using a scriptable object that is passed into the experiment config file. If you decide to work on this, just keep in mind a couple things
Note, on many devices, you aren't allowed to save files save anywhere, and are are forced to use the unity-provided folders. I know windows and Mac allow you to save anywhere, but mobile does not (including meta quest if running in standalone), so just something to keep in mind. Let me know if you need a hand with anything. |
Beta Was this translation helpful? Give feedback.
-
I've got a question regarding a the PackageInstallDetector which accesses the FileLocationSettings. TUX/BML_TUX_Project/Packages/bmlTUX/Editor/PackageInstallDetector.cs Lines 57 to 58 in e1514d8 Passing the BaseTuxDocumentsFolderPath into Path.Combine will never have an effect, because a following argument contains a rooted path, in this case the Application.dataPath (ref). Testing this, there have been no occasions of the installData.json ever being created in the BaseTuxDocumentsFolderPath and I couldn't think of a case when it should be. I bring up this specific situation, because PackageInstallDetector is an Editor Script which executes immediatly upon Asset Import. I think its not as straight forward as I'd hoped to link the Scriptable FileLocationSettings into this Script without further changes. Removing the reference would make things alot easier and wouldnt require any changes to this Scripts Behaviour, because the reference doesnt have any effect anyways. |
Beta Was this translation helpful? Give feedback.
-
Hey Adam,
I've got a question about a feature request I'd like to work on, but I wanted to ask if you could share your thoughts. Maybe this idea has been considered but scrapped for reasons.
My goal is to make the location for all the data more flexibel, rather than having to save into the Documents\bmltux_data folder. When I want to change the Location I have to edit the package because FileLocationSettings.cs isn't exposed in the editor, unlike other Settings (ControlSettings, ColumnNameSettings ... ). I've been using a modified local package of this project for a while now because I've made other changes aswell, but this change might be useful for everyone.
As far as I understand, the problem stems from FileLocationSettings beeing a static class and static classes / variables are unserializable. Additonaly its supposed to be read-only, which complicates things alot.
I've tinkered around with a proxy serialization class, for serialization and protected inheritance access, but thats not going in the right direction. Would it be more sensible to try to modify the FileLocationSettings to behave like an Object thats passed to ExperimentSettings and I/ExperimentDesignFile2 ?
Regards
Jakob
Beta Was this translation helpful? Give feedback.
All reactions