Tag Archives: gui

Selecting GameObjects with a generic ComboBox in Unity3d


Unity’s GUI System does not offer a Combo Box at the time of writing and I needed a ComboBox to select different objects of a certain MonoBehaviour type in my simulation. Based on the ComboBox from here (there are a number of variations) I came up with my quick’n’dirty ObjectComboBox.cs script. It is a generic class that takes any kind of UnityEngine.Object (or an extension of Object) as a type parameter. That means any MonoBehaviour, Transform, GameObject, Vector3, you name it.

Continue reading