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

Support Multiple Global Variable Sets #66

Merged
merged 13 commits into from
Nov 7, 2021
Merged

Conversation

brwarner
Copy link
Contributor

Despite the ArticyFlowPlayer having a property called OverrideGVs, we did not actually properly support having multiple independent variable sets. You could duplicate the generated global variables asset, but it wouldn't be handled correctly and in some cases would crash the game.

We now support this workflow. To create a new global variables set, just duplicate the generated asset and move the new copy somewhere else in your project. Any flow player whose OverrideGV property is set to this asset will use this variable set instead of sharing the default set.

Similar to the default set, these other sets respect the Persist Global Variables Across Worlds setting.

@brwarner brwarner added this to the v1.3.2 milestone Oct 27, 2021
@brwarner brwarner self-assigned this Oct 27, 2021
@brwarner
Copy link
Contributor Author

Basic functionality is working and tested. Just have to make sure it plays nice with source control and add a few helpers.

@brwarner
Copy link
Contributor Author

brwarner commented Nov 2, 2021

Okay, I'm still getting an issue where existing global variable assets become corrupted if you add variable sets in Articy and import.

I may have to reimagine how this works unfortunately.

@brwarner brwarner marked this pull request as ready for review November 7, 2021 20:43
@brwarner
Copy link
Contributor Author

brwarner commented Nov 7, 2021

Using dummy assets called Articy Alternative Global Variables to track that the user wants to use a different set of globals for various flow players. This solved all our hot reload disappearing asset issues. Plus it's a lot cleaner than dealing with duplicates of the global vars asset that need to be updated/reinitialized/etc.

@brwarner brwarner merged commit 1be97a6 into development Nov 7, 2021
@brwarner brwarner deleted the multiple-globals branch November 7, 2021 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant