Documentation for the Unity C# Library
Loading...
Searching...
No Matches
FunctionValueDrawer.cs
Go to the documentation of this file.
1#if UNITY_EDITOR
2using Sirenix.Utilities.Editor;
3using UnityEditor;
4using UnityEngine;
5
6namespace PixoVR.Event
7{
8 public static class FunctionValueDrawer
9 {
10 public static string Draw(Function function, string value, GUIContent label, StepItemSO stepItemSo)
11 {
12 switch (function)
13 {
14 case Function.PLAY_VOICE_OVER:
15 {
16 if (stepItemSo.owner.owner.VoiceOverData == null)
17 {
18 goto default;
19 }
20
21 var names = stepItemSo.owner.owner.VoiceOverData.voiceOverInfos.ConvertAll(v => v.id);
22
23 return SirenixEditorFields.Dropdown(label, value, names);
24 }
25 default:
26 {
27 return EditorGUILayout.TextField(label, value);
28 }
29 }
30 }
31 }
32}
33#endif