mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 06:19:47 -05:00
28 lines
734 B
C#
28 lines
734 B
C#
using System.Collections.Generic;
|
|
|
|
namespace VRMShaders
|
|
{
|
|
/// <summary>
|
|
/// TextureImportParam の集合を Unique な集合にする。
|
|
/// </summary>
|
|
public sealed class TextureDescriptorSet
|
|
{
|
|
private readonly Dictionary<SubAssetKey, TextureImportParam> _params = new Dictionary<SubAssetKey, TextureImportParam>();
|
|
|
|
public void Add(TextureImportParam param)
|
|
{
|
|
if (_params.ContainsKey(param.SubAssetKey)) return;
|
|
|
|
_params.Add(param.SubAssetKey, param);
|
|
}
|
|
|
|
public IEnumerable<TextureImportParam> GetEnumerable()
|
|
{
|
|
foreach (var kv in _params)
|
|
{
|
|
yield return kv.Value;
|
|
}
|
|
}
|
|
}
|
|
}
|