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

Exit to Menu button issues #186

Open
fragmental opened this issue May 3, 2017 · 0 comments
Open

Exit to Menu button issues #186

fragmental opened this issue May 3, 2017 · 0 comments

Comments

@fragmental
Copy link
Contributor

I can add a new exit to menu button to a pause screen(#150) but the backend code that exits to the menu will be the same regardless of whether the button is ongui or ugui or where it's located. So I thought I would try to fix what we have now, first.

After changing the += to a -= in SpinnerActivator.cs that seems to have fixed the scoring bug(#179) , though there may still be some delegates that need to be unregistered or cleaned up.

However, apparently exiting to menu breaks the variant changing. I suspect this has to do with there being a new AssetBundleManager created every time the BaseTable scene is loaded. I tried turning off DontDestroyOnLoad for AssetBundleManager(#180), but that didn't seem to fix it. Also, after skimming over some documentation on the AssetBundleManager it seems like killing the AssetBundleManager and then spawning a new one might not be a good way to handle it, because each new AssetBundleManager might be spawning new asset bundles in memory(which it might also be doing now)? As long as their unloaded properly that might not matter, but I don't know enough about it to know if they are.

I also tried forcing AssetBundleManager to be a singleton, like this:

if (go == null)
            {
                go = this;
            }
            else if (go != this)
            {
                Destroy(go);
            }

but I'm not entirely sure how to do that with the way the AssetBundleManager is created at runtime.AssetBundleManager.cs#L205

This all begs the question of the importance of the AssetBundleManager going forward, but that probably deserves a separate github issue discussing the pros and cons. I'm hesitant to create one because I feel like I've been creating a lot of github issues, lately, though.

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

No branches or pull requests

1 participant