mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-12 05:48:47 -05:00
MeshUtility.Humanoid を UniHumanoid.Humanoid に移動
This commit is contained in:
@@ -6,7 +6,7 @@ using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
namespace UniGLTF.MeshUtility
|
||||
namespace UniHumanoid
|
||||
{
|
||||
[CustomEditor(typeof(Humanoid))]
|
||||
public class HumanoidEditor : Editor
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57cc7b16eb4146c4ab5631f538e2489f
|
||||
guid: ee7ea50401b78f64a950f59564838270
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UniGLTF.MeshUtility
|
||||
namespace UniHumanoid
|
||||
{
|
||||
/// <summary>
|
||||
/// Bone割り当てを保持する。
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 889d98e41c0e8ff48bae50d1a729c2df
|
||||
guid: 97a39af5b64ede64e86b92b5bf94a0e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UniGLTF.MeshUtility
|
||||
namespace UniHumanoid
|
||||
{
|
||||
public static class HumanoidLoader
|
||||
{
|
||||
@@ -37,16 +37,6 @@ namespace UniGLTF.MeshUtility
|
||||
return AvatarBuilder.BuildHumanAvatar(root.gameObject, description);
|
||||
}
|
||||
|
||||
static SkeletonBone ToSkeletonBone(this Transform t)
|
||||
{
|
||||
var sb = new SkeletonBone();
|
||||
sb.name = t.name;
|
||||
sb.position = t.localPosition;
|
||||
sb.rotation = t.localRotation;
|
||||
sb.scale = t.localScale;
|
||||
return sb;
|
||||
}
|
||||
|
||||
static HumanBodyBones TraitToHumanBone(string x)
|
||||
{
|
||||
return (HumanBodyBones)Enum.Parse(typeof(HumanBodyBones), x.Replace(" ", ""), true);
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12453a111483e4145852e3b057e065d9
|
||||
guid: 7b88d4c3436f9894ebc69f162d804cd4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -30,10 +30,10 @@ namespace UniVRM10
|
||||
|
||||
// humanoid
|
||||
{
|
||||
var humanoid = root.GetComponent<UniGLTF.MeshUtility.Humanoid>();
|
||||
var humanoid = root.GetComponent<UniHumanoid.Humanoid>();
|
||||
if (humanoid is null)
|
||||
{
|
||||
humanoid = root.AddComponent<UniGLTF.MeshUtility.Humanoid>();
|
||||
humanoid = root.AddComponent<UniHumanoid.Humanoid>();
|
||||
humanoid.AssignBonesFromAnimator();
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace UniVRM10
|
||||
Root.name = "VRM1";
|
||||
|
||||
// humanoid
|
||||
var humanoid = Root.AddComponent<UniGLTF.MeshUtility.Humanoid>();
|
||||
var humanoid = Root.AddComponent<UniHumanoid.Humanoid>();
|
||||
humanoid.AssignBones(m_map.Nodes.Select(x => (ToUnity(x.Key.HumanoidBone.GetValueOrDefault()), x.Value.transform)));
|
||||
m_humanoid = humanoid.CreateAvatar();
|
||||
m_humanoid.name = "humanoid";
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
"MToon",
|
||||
"UniGLTF",
|
||||
"VRMShaders.GLTF.IO.Runtime",
|
||||
"VRMShaders.VRM10.Format.Runtime"
|
||||
"VRMShaders.VRM10.Format.Runtime",
|
||||
"UniHumanoid"
|
||||
],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
"defineConstraints": []
|
||||
}
|
||||
Reference in New Issue
Block a user