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

PlayerObjectPool not automatically created if inspector isnt shown #14

Open
Happyrobot33 opened this issue Oct 16, 2023 · 1 comment · May be fixed by #15
Open

PlayerObjectPool not automatically created if inspector isnt shown #14

Happyrobot33 opened this issue Oct 16, 2023 · 1 comment · May be fixed by #15

Comments

@Happyrobot33
Copy link

If I import a prefab that has a object pool on it but I dont look at the inspector for the pool itself, it will never make the PlayerObjectPool object to initialize the pools. This is an issue when distributing packages that use CyanPlayerObjectPool

@Happyrobot33
Copy link
Author

doing this in CyanPlayerObjectPoolEditor technically works but not sure if im missing anything

[InitializeOnLoadMethod]
private static void Initialize()
{
    // Go through each setup helper and verify their pool size.
    foreach (var helper in FindObjectsOfType<CyanPoolSetupHelper>())
    {
        helper.VerifyPoolSize();
    }
}

@Happyrobot33 Happyrobot33 linked a pull request Oct 17, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant