Hi
I’am still learning so maybe question is stupid but I’am a little confused.
For example I have script with declared public Big game objects and Small game objects, but in level one in my scene I have only small objects , in level two I have small and big objects. so in level one I can not declare big ones because I don’t have them yet.
The question is should I have separate scripts for each level even if this scripts are almost the same ?
I don’t really understand but basically, you’re asking that if your script has two public gameobject variables, on the first scene, you only have one of the gameobject, the second scene contains both gameobjects, can you use the same script regardless? If that’s your question, yes you can, just make sure you’re careful with null exception errors. Put null checks and your script shouldn’t have any problem even if the game object doesn’t exist in the scene.
Thank you wolfhunter yes this is what I was asking for and yes I was thinking about null exceptions but maybe it’s better to tag objects , and then in the script have one public game objects and in each level check if it’s " big or small " by their tag?