Unity-Programming-Patterns icon indicating copy to clipboard operation
Unity-Programming-Patterns copied to clipboard

"Has to inherit from MonoBehaviour so we can use Instantiate()" - wrong

Open andypoly opened this issue 3 years ago • 0 comments

The code comment is wrong. You can make a reusable GameObject pool without monobehaviour because you can call Object.Instantiate - you just have to pass a prefab GameObject to it on creation. But that could be in a parent class or a pool manager monobehaviour.

andypoly avatar Jun 23 '22 13:06 andypoly