Good day for all.
Well, My point is: I have created a simple GameObject which has a Renderer with a Single Sprite.
No Animations, no magics, not fancy… OK.
Secondly, i´ve created a C# Script. The most simple C# Scripts ever seen:
I have a void update method which print(“hello world”).
OK, so now a dragged that GameObject to my Project, so it becomes a “Prefab”, right?
In parallel, i´ve create an ObjectPool Script, so i can Instantiate 20 clones of my Prefabs in its start method. OK?
So, I attach this ObjectPool Script to an empty GameObject and associate my prefab as the type to be pooled.
Here i have the premisse: 1 empty GameObject which has a script to pool GameObjects which has my “Simple Prefab”, which contains a Script which prints “hello world”.
I play my “game”, what i can see that all of the clones are created in hierarquy but none of them runs my print(“Hello World”) unless for the original prefab.
It seems that the Instantiate method is not cloning my whole prefab.
Does anyone have idea about the why my Clone´s Scripts are not running? In addition: does inactive objects are still able to run their scripts??