What would be the best way to implement a 100 level puzzle that has five buttons? Separate objects consisting of a script that has the coding for each level, thus equaling 100 different objects and 100 different scripts? But then how to get the button press to call the correct object/script; I’m sure I can call the object by making the current level the only object that’s active and doing FindObjectsWithTag(), but then how to run the script in that object since it’s a different piece of script, with a different name, each time? Should I put all the code in the Update function, effectively checking the status of each button (up or down) on every frame and responding appropriately; if so, what’s the performance hit on that (if any)? Do I need to create a different scene for each level? Thanks.
OK, so I decided to make every scene a different level. This means I’ll have 100 different code files for levels, and 100 different code files for buttons, but they’re each relatively small.
If anyone else has any better ideas, please chime in.