How to deal with many buttons in the Inspector

I have many Buttons in my new project but i dont know how to get them so, that i dont have to connect any button to any game object. For example i have 50 levels and 50 butons for them. Because of that i need to connect my 50 buttons in the Inspector to Level 1, i need to connect my 50 buttons in the Inspector to Level 2 and so on. Does somebody know how to code, that i only need to connect the Level 1 button to the Level 1 game object without doing 50 scripts? I tried it with [SerializeField] but theres no difference. I hope i described it not to bad, im from Germany.

Thanks:)

If I understand your description it sounds like you need a singleton script that handles all 50 buttons and exists for all levels. Take a look here for how to use a Singleton: Unity C# Singleton? - Questions & Answers - Unity Discussions

That way you only need a single script and each level would be using the same script to manage the buttons. You can put the buttons together in a Prefab configuration that you simply have present on all your levels.

I hope that helps.