Ejemplo n.º 1
0
        protected void SetupActiveShaderStackList()
        {
            shaderStackList.data.Clear();
            shaderStackList.tableView.ClearSelection();

            Dictionary <string, Material> matCache = _shaderManager.MaterialCache;

            foreach (string id in matCache.Keys)
            {
                matCache.TryGetValue(id, out Material mat);

                ShaderEffectData sfx = _shaderManager.GetShaderEffectByMaterial(mat);

                if (sfx == null)
                {
                    continue;
                }

                /*Sprite icon = Util.SEUtilities.GetDefaultShaderIcon();
                 *
                 * if (sfx.previewImage != null && _spriteCache.TryGetValue(sfx.previewImage, out Sprite image)) {
                 *  icon = image;
                 * }
                 *
                 * //CustomListTableData.CustomCellInfo customCellInfo = new CustomListTableData.CustomCellInfo(sfx.name, sfx.author, icon);*/
                shaderStackList.data.Add(new ActiveShaderElement(sfx.ReferenceName, id));
            }

            shaderStackList.tableView.ReloadData();
        }