bug fix
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 668efe4a54d94f244a2f44a5a3947550
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0738b70a6f9235d4fa3ee1907af514cc
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class UnityCameraVMDRecorder : MonoBehaviour
|
public class UnityCameraVMDRecorder : MonoBehaviour
|
||||||
@@ -167,7 +165,7 @@ public class UnityCameraVMDRecorder : MonoBehaviour
|
|||||||
/// 呼び出す際は先にStopRecordingを呼び出すこと
|
/// 呼び出す際は先にStopRecordingを呼び出すこと
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filePath">保存先の絶対ファイルパス</param>
|
/// <param name="filePath">保存先の絶対ファイルパス</param>
|
||||||
public async void SaveVMD()
|
public void SaveVMD()
|
||||||
{
|
{
|
||||||
string fileName = Application.dataPath + "/../VMDRecords/" + string.Format("Camera_{0}.vmd", DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));
|
string fileName = Application.dataPath + "/../VMDRecords/" + string.Format("Camera_{0}.vmd", DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));
|
||||||
if (IsRecording)
|
if (IsRecording)
|
||||||
@@ -184,8 +182,7 @@ public class UnityCameraVMDRecorder : MonoBehaviour
|
|||||||
bool isOrthographic = targetCamera.orthographic;
|
bool isOrthographic = targetCamera.orthographic;
|
||||||
|
|
||||||
Debug.Log(targetCameraTransform.name + "VMDファイル作成開始");
|
Debug.Log(targetCameraTransform.name + "VMDファイル作成開始");
|
||||||
await Task.Run(() =>
|
|
||||||
{
|
|
||||||
//ファイルの書き込み
|
//ファイルの書き込み
|
||||||
using (FileStream fileStream = new FileStream(fileName, FileMode.Create))
|
using (FileStream fileStream = new FileStream(fileName, FileMode.Create))
|
||||||
using (BinaryWriter binaryWriter = new BinaryWriter(fileStream))
|
using (BinaryWriter binaryWriter = new BinaryWriter(fileStream))
|
||||||
@@ -280,8 +277,8 @@ public class UnityCameraVMDRecorder : MonoBehaviour
|
|||||||
binaryWriter.Close();
|
binaryWriter.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
Debug.Log(targetCameraTransform.name + "VMDファイル作成終了");
|
Debug.Log(targetCameraTransform.name + "VMDファイル作成終了");
|
||||||
|
Destroy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
using System.Collections;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Gallop;
|
using Gallop;
|
||||||
|
|
||||||
//初期ポーズ(T,Aポーズ)の時点でアタッチ、有効化されている必要がある
|
//初期ポーズ(T,Aポーズ)の時点でアタッチ、有効化されている必要がある
|
||||||
@@ -365,7 +363,7 @@ public class UnityHumanoidVMDRecorder : MonoBehaviour
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="modelName">VMDファイルに記載される専用モデル名</param>
|
/// <param name="modelName">VMDファイルに記載される専用モデル名</param>
|
||||||
/// <param name="filePath">保存先の絶対ファイルパス</param>
|
/// <param name="filePath">保存先の絶対ファイルパス</param>
|
||||||
public async void SaveVMD(string modelName, string filePath)
|
public void SaveVMD(string modelName, string filePath)
|
||||||
{
|
{
|
||||||
if (IsRecording)
|
if (IsRecording)
|
||||||
{
|
{
|
||||||
@@ -376,8 +374,6 @@ public class UnityHumanoidVMDRecorder : MonoBehaviour
|
|||||||
if (KeyReductionLevel <= 0) { KeyReductionLevel = 1; }
|
if (KeyReductionLevel <= 0) { KeyReductionLevel = 1; }
|
||||||
|
|
||||||
Debug.Log(transform.name + "VMDファイル作成開始");
|
Debug.Log(transform.name + "VMDファイル作成開始");
|
||||||
await Task.Run(() =>
|
|
||||||
{
|
|
||||||
//ファイルの書き込み
|
//ファイルの書き込み
|
||||||
using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
|
using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
|
||||||
using (BinaryWriter binaryWriter = new BinaryWriter(fileStream))
|
using (BinaryWriter binaryWriter = new BinaryWriter(fileStream))
|
||||||
@@ -563,8 +559,6 @@ public class UnityHumanoidVMDRecorder : MonoBehaviour
|
|||||||
binaryWriter.Close();
|
binaryWriter.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
Destroy(this);
|
Destroy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user