mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-03-24 19:34:42 -05:00
* MeshUtility を UniGLTF 下に移動 * Assets/VRM10 を追加 * JsonSchemaからのコード生成 UniGLTF/Editor/Generator を追加
23 lines
465 B
C#
23 lines
465 B
C#
namespace UniVRM10
|
|
{
|
|
public static class IndexExtensions
|
|
{
|
|
public static bool TryGetValidIndex(this int value, int count, out int index)
|
|
{
|
|
if (value < 0)
|
|
{
|
|
index = -1;
|
|
return false;
|
|
}
|
|
if (value >= count)
|
|
{
|
|
index = -1;
|
|
return false;
|
|
}
|
|
|
|
index = value;
|
|
return true;
|
|
}
|
|
}
|
|
}
|