mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-06 21:26:06 -05:00
* MeshUtility を UniGLTF 下に移動 * Assets/VRM10 を追加 * JsonSchemaからのコード生成 UniGLTF/Editor/Generator を追加
24 lines
470 B
C#
24 lines
470 B
C#
using System.Collections.Generic;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
public static class DictionaryExtensions
|
|
{
|
|
public static U GetOrDefault<T, U>(this Dictionary<T, U> d, T key)
|
|
{
|
|
if(key == null)
|
|
{
|
|
return default;
|
|
}
|
|
|
|
if(d.TryGetValue(key, out U value))
|
|
{
|
|
return value;;
|
|
}
|
|
else{
|
|
return default;
|
|
}
|
|
}
|
|
}
|
|
}
|