Quantcast
Viewing latest article 11
Browse Latest Browse All 50

Spawning prefab button loses function

I am making a sorta quiz like game. and the way my script is working, is everything is inside one singular manager script. Including the buttons functions on whether it is right or wrong. Well after complications I decided to make everything a spawned prefab instead of setting active and not active. This is where the problem lies, as now when my buttons spawn, they no longer have the script reference because it's not in their prefab. I've tried making a second script then referencing the function , but I can't do that without making everything static and thus breaking the script. Is there anyway for the prefab buttons to keep their functions ?

Viewing latest article 11
Browse Latest Browse All 50

Trending Articles