Beispiel #1
0
    public static string DoUpdateLayerNameGUI(string label, string updateLayerName, VerletSimulation settings)
    {
        if (settings == null)
            return "";

        if (settings.LayerNames.Count > 0)
        {
            int selected = settings.LayerNames.IndexOf(updateLayerName);
            if (selected == -1)
                selected = 0;

            selected = EditorGUILayout.Popup(label, selected, settings.LayerNames.ToArray());
            return settings.LayerNames[selected];
        }
        return "";
    }
    public static string DoUpdateLayerNameGUI(string label, string updateLayerName, VerletSimulation settings)
    {
        if (settings == null)
        {
            return("");
        }

        if (settings.LayerNames.Count > 0)
        {
            int selected = settings.LayerNames.IndexOf(updateLayerName);
            if (selected == -1)
            {
                selected = 0;
            }

            selected = EditorGUILayout.Popup(label, selected, settings.LayerNames.ToArray());
            return(settings.LayerNames[selected]);
        }
        return("");
    }