private void InitPalette()
        {
            m_palette = FindObjectOfType <MaterialPalette>();
            if (m_palette == null)
            {
                GameObject go = new GameObject("MaterialPalette");
                m_palette = go.AddComponent <MaterialPalette>();

                Material material = Instantiate(PBBuiltinMaterials.DefaultMaterial);
                material.name = "Default";
                m_palette.Materials.Add(material);
            }
            CleanPalette();
        }
Exemplo n.º 2
0
 private void OnPaletteChanged(MaterialPalette palette)
 {
     m_view.TreeView.Items        = palette.Materials;
     m_view.TreeView.SelectedItem = palette.Materials.FirstOrDefault();
 }
 private void OnPaletteChanged(MaterialPalette obj)
 {
     UpdateTexturesDrowDown();
 }