Пример #1
0
    // Use this for initialization
    void Start()
    {
        layerChooser = new ComboBox();
        layerChooser.SetAllowMultiple(true);

        //There's no built in way to get layers, so LayerUtils was created to get the currently set layers.
        Dictionary <string, int> layers = LayerUtils.GetLayers();

        foreach (string layerName in layers.Keys)
        {
            layerChooser.AddItem(layerName, layers[layerName], OnLayerSelected, OnLayerUnselected);
        }
    }