- Home /
Do unused assets dragged into GameObject variable in a script affect performance when in big numbers?
In the game I'm making right now there are a lot of colliding object in the scene and I want them to instantiate sparks when they collide. I want the effect to differ depending on power of collision and material of colliding objects, I already made many different assets of particle systems. I know how to make script choose proper sparks effect depending on factors I mentioned, but the only way I can think of to make all those assets available for instantiating is to write down several GameObject variables in script which picks and instantiates one of particles system on collision. My question is: will it influence game's performance if there would be nearly hundred game objects, each one with the same script in which there are several unused "GameObject" variables?
Your answer
![](https://koobas.hobune.stream/wayback/20220613163407im_/https://answers.unity.com/themes/thub/images/avi.jpg)