So I am working on a game which spawns between 0 and 12 clones of a prefab, what I wanted to do at first was to enable the component on a set amount of those clones but I couldn't figure out how to do that, what I am trying to do at the moment is enable that component if a condition is reached but if I use `gameobject.GetComponent().enabled = true;` it has no effect on the prefab and the component is still disabled.
If there is another way of going about this please let me know as I really need to get it working.
↧