UI Dropdown Add Different Sprites
hello,I want add different sprites ,What shall I do?I have a script to switch between different sky boxes.This is my code.
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public Material[] Skyboxes;
private Dropdown _dropdown;
public void Awake()
{ _dropdown = GetComponent(); } public void ChangeSkybox() { RenderSettings.skybox = Skyboxes[_dropdown.value]; }
捕获.png
(14.0 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612180926im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Disable a single Dropdown option. 2 Answers
How to add bulk items in dropdown 0 Answers
Search in Dropdown options 2 Answers
Re-order the items of dropdown list using DragHandler 0 Answers
Reuseable Dropdown 0 Answers