How to create script for UI Dropdown button to choose between prepared variants?

Hello all.
Can anybody help me to create script for UI Dropdown menu please ?

Script should be able to do following:

  • After inserting script to UI Dropdown menu TMP version in the inspector, script would let me manually insert game objects / variants I want to see in game in UI Dropdown menu.
  • Only one selected game object/variant should be active and all other should be disabled.

Thank you for any advice or ideally whole script.

Still no one to help me out ?
I am not advanced programmer, I believe it is really not that hard. I just need Dropdown menu where I can insert my game objects, my prepared variables.

Maybe there is some already made script for customizable UI Dropdown menu for Unity but I could not find it.

Your post is a random collection of very basic UI questions, but a lot of your post is very poorly-defined.

For instance, what does this mean:

Why do you need a script to let you do this? Use the UI Dropdown the way it works out of box, it already does this, including adding items to it.

And this is commonly called a Toggle and ToggleGroup:

You can also trivially do this in your own script by responding to clicks and enabling the item clicked while disabling all others. This is an extremely common behind-UI logic pattern and it usually looks something like:

int whichOneIsActive = 0;

for (int i = 0; i < items.Count; i++)
{
  bool active = i == whichOneIsActive;
  items[i].SetActive( active);
}

I suggest this approach: go as far into the design of your UI as you can, following tutorials, doing it one tiny step at a time like this:

Imphenzia: How Did I Learn To Make Games:

Two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.

When you get stuck, don’t post long sentences about game and UI design. Nobody can answer those. Instead, follow this easy simple template:

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

This is the bare minimum of information to report:

  • what you want
  • what you tried
  • what you expected to happen
  • what actually happened, log output, variable values, and especially any errors you see
  • links to actual Unity3D documentation you used to cross-check your work (CRITICAL!!!)

The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven’t put effort into finding the documentation, why should we bother putting effort into replying?