Skip to content

Commit

Permalink
名前空間の明示と、バージョン確認の無効化(UniVRM0.120対応)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsnmeajp committed Mar 16, 2024
1 parent 903e35c commit 8213aff
Show file tree
Hide file tree
Showing 22 changed files with 17 additions and 19 deletions.
1 change: 0 additions & 1 deletion EVMC4U/CameraReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;

namespace EVMC4U
{
Expand Down
2 changes: 1 addition & 1 deletion EVMC4U/CommunicationValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;


namespace EVMC4U
{
Expand Down
2 changes: 1 addition & 1 deletion EVMC4U/DeviceReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;


namespace EVMC4U
{
Expand Down
2 changes: 1 addition & 1 deletion EVMC4U/DirectionalLightReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;


namespace EVMC4U
{
Expand Down
3 changes: 1 addition & 2 deletions EVMC4U/Editor/Tutorial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@
using UnityEditor;
using UnityEditor.AnimatedValues;
using UnityEngine.Events;
using VRM;
using System.Linq;

namespace EVMC4U
{
public class Tutorial : EditorWindow
{
const bool check = VRMVersion.MAJOR != 0 || VRMVersion.MINOR != 99;
const bool check = false; //バージョンチェック条件式があったが、バージョン番号がなくなったので無効化
const int window_w = 400;
const int window_h = 400;

Expand Down
2 changes: 1 addition & 1 deletion EVMC4U/ExternalController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;


namespace EVMC4U
{
Expand Down
20 changes: 10 additions & 10 deletions EVMC4U/ExternalReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;

using UniGLTF;

namespace EVMC4U
Expand Down Expand Up @@ -346,7 +346,7 @@ public class ExternalReceiver : MonoBehaviour, IExternalReceiver
//ボーン情報取得
Animator animator = null;
//VRMのブレンドシェーププロキシ
VRMBlendShapeProxy blendShapeProxy = null;
VRM.VRMBlendShapeProxy blendShapeProxy = null;

//ボーンENUM情報テーブル
Dictionary<string, HumanBodyBones> HumanBodyBonesTable = new Dictionary<string, HumanBodyBones>();
Expand All @@ -356,8 +356,8 @@ public class ExternalReceiver : MonoBehaviour, IExternalReceiver
Dictionary<HumanBodyBones, Quaternion> HumanBodyBonesRotationTable = new Dictionary<HumanBodyBones, Quaternion>();

//ブレンドシェープ変換テーブル
Dictionary<string, BlendShapeKey> StringToBlendShapeKeyDictionary = new Dictionary<string, BlendShapeKey>();
Dictionary<BlendShapeKey, float> BlendShapeToValueDictionary = new Dictionary<BlendShapeKey, float>();
Dictionary<string, VRM.BlendShapeKey> StringToBlendShapeKeyDictionary = new Dictionary<string, VRM.BlendShapeKey>();
Dictionary<VRM.BlendShapeKey, float> BlendShapeToValueDictionary = new Dictionary<VRM.BlendShapeKey, float>();


//uOSCサーバー
Expand Down Expand Up @@ -456,7 +456,7 @@ public void Update()
//VRMモデルからBlendShapeProxyを取得(タイミングの問題)
if (blendShapeProxy == null && Model != null)
{
blendShapeProxy = Model.GetComponent<VRMBlendShapeProxy>();
blendShapeProxy = Model.GetComponent<VRM.VRMBlendShapeProxy>();
}

//ルート位置がない場合
Expand Down Expand Up @@ -484,7 +484,7 @@ public void Update()
if (OldModel != Model && Model != null)
{
animator = Model.GetComponent<Animator>();
blendShapeProxy = Model.GetComponent<VRMBlendShapeProxy>();
blendShapeProxy = Model.GetComponent<VRM.VRMBlendShapeProxy>();
OldModel = Model;

Debug.Log("[ExternalReceiver] New model detected");
Expand All @@ -503,7 +503,7 @@ public void Update()
string key = "";
bool unknown = false;
//プリセットかどうかを調べる
if (c.Preset == BlendShapePreset.Unknown) {
if (c.Preset == VRM.BlendShapePreset.Unknown) {
//非プリセット(Unknown)であれば、Unknown用の名前変数を参照する
key = c.BlendShapeName;
unknown = true;
Expand Down Expand Up @@ -832,7 +832,7 @@ private void ProcessMessage(ref uOSC.Message message)
string lowerKey = key.ToLower();

//キーに該当するBSKeyが存在するかチェックする
BlendShapeKey bskey;
VRM.BlendShapeKey bskey;
if (StringToBlendShapeKeyDictionary.TryGetValue(lowerKey, out bskey)){
//キーに対して値を登録する
BlendShapeToValueDictionary[bskey] = value;
Expand Down Expand Up @@ -900,8 +900,8 @@ public void LoadVRMFromData(byte[] VRMdata)
//読み込み
GlbLowLevelParser glbLowLevelParser = new GlbLowLevelParser(null, VRMdata);
GltfData gltfData = glbLowLevelParser.Parse();
VRMData vrm = new VRMData(gltfData);
VRMImporterContext vrmImporter = new VRMImporterContext(vrm);
VRM.VRMData vrm = new VRM.VRMData(gltfData);
VRM.VRMImporterContext vrmImporter = new VRM.VRMImporterContext(vrm);

isLoading = true;

Expand Down
2 changes: 1 addition & 1 deletion EVMC4U/InputReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
using VRM;


namespace EVMC4U
{
Expand Down
2 changes: 1 addition & 1 deletion EVMC4U/class/EVMC4Ustructs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public struct MidiCCValue
public struct MidiCCButton
{
public int knob;
public int active;
public float active;
}

public enum CalibrationState
Expand Down
Binary file removed EVMC4U/manual/スライド0.png
Binary file not shown.
Binary file removed EVMC4U/manual/スライド1.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド10.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド11.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド12.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド2.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド3.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド4.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド5.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド6.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド7.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド8.PNG
Binary file not shown.
Binary file removed EVMC4U/manual/スライド9.PNG
Binary file not shown.

0 comments on commit 8213aff

Please sign in to comment.