CyanPlayerObjectPool
CyanPlayerObjectPool copied to clipboard
PlayerObjectPool not automatically created if inspector isnt shown
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
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();
}
}