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

Possible issue resetting AIs on multiple game load/unload? #62

Open
originalfoo opened this issue Jun 12, 2015 · 2 comments
Open

Possible issue resetting AIs on multiple game load/unload? #62

originalfoo opened this issue Jun 12, 2015 · 2 comments

Comments

@originalfoo
Copy link
Contributor

Source: https://forum.paradoxplaza.com/forum/index.php?threads/no-import.862018/

Log: https://gist.github.com/anonymous/4e90f3c84c2737c4be6e

@joaofarias
Copy link
Owner

There might be an issue with the AIs on multiple load/unload but I don't think that's his problem because it would have worked fine on the first load. :/

@originalfoo
Copy link
Contributor Author

Perhaps not directly related to this ticket but someone just posted this finding on the Mesh Info mod page:

CWMlolzlz 21 hours ago
Hey SamsamTS. Ive been developing a mod and have been using your code as a reference to get things started. I found that when quickloading (using F4) the old UIPanels aren't being properly disposed. Pressing Ctrl+M will toggle the visibility of all of them. After investigating other mods i have found they use GameObject.Destroy(m_panel.gameObject); to dispose of the panels.
As far as I can tell that one line can replace

m_mainPanel.parent.RemoveUIComponent(m_mainPanel);
GameObject.Destroy(m_mainPanel);
in both your OnReleased() and OnLevelUnloaded() methods

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

2 participants