Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change GoogleDriveSettings at runtime #61

Open
fisher-bai opened this issue Dec 9, 2019 · 2 comments
Open

Can't change GoogleDriveSettings at runtime #61

fisher-bai opened this issue Dec 9, 2019 · 2 comments

Comments

@fisher-bai
Copy link

I have a project that requires multiple GoogleDriveSettings is there a way to load a specific one at runtime? From what I see in GoogleDriveRequest.cs it always does GoogleDriveSettings.LoadFromResources() which always defaults to Resources/GoogleDriveSettings

How do you recommend changing/loading different GoogleDriveSettings?

@elringus
Copy link
Owner

Changing the settings at runtime is not possible by design. In case you just need to change the values, reflection could work, though it's obviously not optimal.

I can imagine that in some cases changing the settings at runtime could be useful; it would be nice to move the settings from scriptable object to a JSON file and allow the modifications at runtime. Unfortunately, I don't currently have time to work on this, but I'll leave this issue open in case anyone would be interested to pick it up.

@fisher-bai
Copy link
Author

Found a good enough solution for myself. Assuming you only need to select which Google Drive Setting you want on startup, then you can create multiple GoogleDriveSetting scriptable objects and just set the main GoogleDriveSettings scriptable object to the one you want to use before your first GoogleDriveRequest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants