Merge pull request #1902 from Santarh/removeWarnings

Remove warnings
This commit is contained in:
ousttrue
2022-11-04 13:57:37 +09:00
committed by GitHub
23 changed files with 4359 additions and 28 deletions

View File

@@ -5,7 +5,7 @@ namespace UniHumanoid
{
public class HumanPoseClip : ScriptableObject
{
public const string TPoseResourcePath = "T-Pose.pose";
public const string TPoseResourcePath = "UniHumanoid/T-Pose.pose";
public Vector3 bodyPosition;

View File

@@ -1,8 +1,6 @@
fileFormatVersion: 2
guid: c61106d290c827b49b7a6e3f6497bd3f
guid: b4f2ed33f96cfdd4ab1057fccbe1d9e1
folderAsset: yes
timeCreated: 1519379142
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3c8d7024b7589844a9bbd3d632b5853e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -33,16 +33,6 @@ namespace UniGLTF.Utils
}
}
/// <summary>
/// bool を返して out 変数に結果を返すのが TryXXX なので、Try ではない。
/// </summary>
[Obsolete("use ParseOrDefault")]
public static T TryParseOrDefault<T>(string name, bool ignoreCase = false, T defaultValue = default)
where T : struct, Enum
{
return ParseOrDefault<T>(name, ignoreCase: ignoreCase);
}
public static T[] GetValues<T>() where T : struct, Enum
{
return CachedEnumType<T>.Values;

View File

@@ -23,6 +23,7 @@ TextureImporter:
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -54,9 +55,12 @@ TextureImporter:
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3

View File

@@ -23,6 +23,7 @@ TextureImporter:
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -54,9 +55,12 @@ TextureImporter:
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3

View File

@@ -23,6 +23,7 @@ TextureImporter:
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -54,9 +55,12 @@ TextureImporter:
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3

View File

@@ -11,8 +11,8 @@ namespace UniGLTF
[Test]
public void CacheEnumTestSimplePasses()
{
Assert.AreEqual(default(HumanBodyBones), CachedEnum.TryParseOrDefault<HumanBodyBones>("xxx"));
Assert.AreEqual(HumanBodyBones.UpperChest, CachedEnum.TryParseOrDefault<HumanBodyBones>("upperchest", true));
Assert.AreEqual(default(HumanBodyBones), CachedEnum.ParseOrDefault<HumanBodyBones>("xxx"));
Assert.AreEqual(HumanBodyBones.UpperChest, CachedEnum.ParseOrDefault<HumanBodyBones>("upperchest", true));
Assert.AreEqual(CachedEnum.GetValues<HumanBodyBones>().First(x => x == HumanBodyBones.Hips), HumanBodyBones.Hips);
}
}

View File

@@ -127,7 +127,7 @@ namespace VRM
{
if (x.mesh == index)
{
return CachedEnum.TryParseOrDefault<FirstPersonFlag>(x.firstPersonFlag, true);
return CachedEnum.ParseOrDefault<FirstPersonFlag>(x.firstPersonFlag, true);
}
}

View File

@@ -72,7 +72,7 @@ namespace VRM
{
get
{
return CachedEnum.TryParseOrDefault<LookAtType>(lookAtTypeName, true);
return CachedEnum.ParseOrDefault<LookAtType>(lookAtTypeName, true);
}
set { lookAtTypeName = value.ToString(); }
}

View File

@@ -36,7 +36,7 @@ namespace VRM
{
static UssageLicense FromString(string src)
{
return CachedEnum.TryParseOrDefault<UssageLicense>(src, true);
return CachedEnum.ParseOrDefault<UssageLicense>(src, true);
}
[JsonSchema(Description = "Title of VRM model")]
@@ -69,7 +69,7 @@ namespace VRM
{
get
{
return CachedEnum.TryParseOrDefault<AllowedUser>(allowedUserName, true);
return CachedEnum.ParseOrDefault<AllowedUser>(allowedUserName, true);
}
set
{
@@ -135,7 +135,7 @@ namespace VRM
{
get
{
return CachedEnum.TryParseOrDefault<LicenseType>(licenseName, true);
return CachedEnum.ParseOrDefault<LicenseType>(licenseName, true);
}
set
{

View File

@@ -153,12 +153,12 @@ namespace VRM
if (group != null)
{
asset.BlendShapeName = groupName;
asset.Preset = CachedEnum.TryParseOrDefault<BlendShapePreset>(group.presetName, true);
asset.Preset = CachedEnum.ParseOrDefault<BlendShapePreset>(group.presetName, true);
asset.IsBinary = group.isBinary;
if (asset.Preset == BlendShapePreset.Unknown)
{
// fallback
asset.Preset = CachedEnum.TryParseOrDefault<BlendShapePreset>(group.name, true);
asset.Preset = CachedEnum.ParseOrDefault<BlendShapePreset>(group.name, true);
}
asset.Values = group.binds.Select(x =>
{

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b092f2ba86c6ec247afd37d38108bf03
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 08df5151e71aed748b13547492fb8b9a
timeCreated: 1546851178
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -5572,7 +5572,7 @@ MonoBehaviour:
m_src: {fileID: 0}
m_target: {fileID: 802105000}
Root: {fileID: 0}
m_motion: {fileID: 4900000, guid: 7d2617171adc40b41ac50228f101e178, type: 3}
m_motion: {fileID: 4900000, guid: 08df5151e71aed748b13547492fb8b9a, type: 3}
m_texts:
m_textModelTitle: {fileID: 1111491925}
m_textModelVersion: {fileID: 1045380263}
@@ -5591,7 +5591,6 @@ MonoBehaviour:
ToggleMotionTPose: {fileID: 1791103380}
ToggleMotionBVH: {fileID: 1311520910}
ToggleMotion: {fileID: 224350194}
m_pose: {fileID: 11400000, guid: 879e332f84a378c4da3b87af13da3e85, type: 2}
--- !u!1 &1791103378
GameObject:
m_ObjectHideFlags: 0

View File

@@ -168,9 +168,6 @@ namespace UniVRM10.VRM10Viewer
[SerializeField]
UIFields m_ui = default;
[SerializeField]
HumanPoseClip m_pose = default;
private void Reset()
{
var buttons = GameObject.FindObjectsOfType<Button>();

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 79cea8265d53aaf47b16fff91ee9a5d6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
{
"templatePinStates": [],
"dependencyTypeInfos": [
{
"userAdded": false,
"type": "UnityEngine.AnimationClip",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEditor.Animations.AnimatorController",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.AnimatorOverrideController",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEditor.Audio.AudioMixerController",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.ComputeShader",
"ignore": true,
"defaultInstantiationMode": 1,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Cubemap",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.GameObject",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEditor.LightingDataAsset",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": false
},
{
"userAdded": false,
"type": "UnityEngine.LightingSettings",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Material",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEditor.MonoScript",
"ignore": true,
"defaultInstantiationMode": 1,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.PhysicMaterial",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.PhysicsMaterial2D",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Rendering.VolumeProfile",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEditor.SceneAsset",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": false
},
{
"userAdded": false,
"type": "UnityEngine.Shader",
"ignore": true,
"defaultInstantiationMode": 1,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.ShaderVariantCollection",
"ignore": true,
"defaultInstantiationMode": 1,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Texture",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Texture2D",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
},
{
"userAdded": false,
"type": "UnityEngine.Timeline.TimelineAsset",
"ignore": false,
"defaultInstantiationMode": 0,
"supportsModification": true
}
],
"defaultDependencyTypeInfo": {
"userAdded": false,
"type": "<default_scene_template_dependencies>",
"ignore": false,
"defaultInstantiationMode": 1,
"supportsModification": true
},
"newSceneOverride": 0
}