mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
Merge branch 'master' of github.com:vrm-c/UniVRM
This commit is contained in:
commit
af7c58aba2
|
|
@ -30,17 +30,17 @@ namespace VRM.Samples
|
|||
{
|
||||
for (var value = 0.0f; value <= 1.0f; value += velocity)
|
||||
{
|
||||
BlendShapes.ImmediatelySetValue(preset, value);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), value);
|
||||
yield return null;
|
||||
}
|
||||
BlendShapes.ImmediatelySetValue(preset, 1.0f);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), 1.0f);
|
||||
yield return new WaitForSeconds(wait);
|
||||
for (var value = 1.0f; value >= 0; value -= velocity)
|
||||
{
|
||||
BlendShapes.ImmediatelySetValue(preset, value);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), value);
|
||||
yield return null;
|
||||
}
|
||||
BlendShapes.ImmediatelySetValue(preset, 0);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(preset), 0);
|
||||
yield return new WaitForSeconds(wait * 2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace VRM.Samples
|
|||
|
||||
public class VRMRuntimeExporter : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Button m_loadButton;
|
||||
[SerializeField] Button m_loadButton = default;
|
||||
|
||||
[SerializeField] Button m_exportButton;
|
||||
[SerializeField] Button m_exportButton = default;
|
||||
|
||||
GameObject m_model;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ namespace VRM.Samples
|
|||
public class VRMRuntimeLoader : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
bool m_loadAsync;
|
||||
bool m_loadAsync = default;
|
||||
|
||||
[SerializeField, Header("GUI")]
|
||||
CanvasManager m_canvas;
|
||||
CanvasManager m_canvas = default;
|
||||
|
||||
[SerializeField]
|
||||
LookTarget m_faceCamera;
|
||||
LookTarget m_faceCamera = default;
|
||||
|
||||
[SerializeField, Header("loader")]
|
||||
UniHumanoid.HumanPoseTransfer m_source;
|
||||
|
|
|
|||
|
|
@ -12,58 +12,58 @@ namespace VRM.Samples
|
|||
{
|
||||
#region UI
|
||||
[SerializeField]
|
||||
Text m_version;
|
||||
Text m_version = default;
|
||||
|
||||
[SerializeField]
|
||||
Button m_open;
|
||||
Button m_open = default;
|
||||
|
||||
[SerializeField]
|
||||
Toggle m_enableLipSync;
|
||||
Toggle m_enableLipSync = default;
|
||||
|
||||
[SerializeField]
|
||||
Toggle m_enableAutoBlink;
|
||||
Toggle m_enableAutoBlink = default;
|
||||
#endregion
|
||||
|
||||
[SerializeField]
|
||||
HumanPoseTransfer m_src;
|
||||
HumanPoseTransfer m_src = default;
|
||||
|
||||
[SerializeField]
|
||||
GameObject m_target;
|
||||
GameObject m_target = default;
|
||||
|
||||
[SerializeField]
|
||||
GameObject Root;
|
||||
GameObject Root = default;
|
||||
|
||||
[Serializable]
|
||||
struct TextFields
|
||||
class TextFields
|
||||
{
|
||||
[SerializeField, Header("Info")]
|
||||
Text m_textModelTitle;
|
||||
Text m_textModelTitle = default;
|
||||
[SerializeField]
|
||||
Text m_textModelVersion;
|
||||
Text m_textModelVersion = default;
|
||||
[SerializeField]
|
||||
Text m_textModelAuthor;
|
||||
Text m_textModelAuthor = default;
|
||||
[SerializeField]
|
||||
Text m_textModelContact;
|
||||
Text m_textModelContact = default;
|
||||
[SerializeField]
|
||||
Text m_textModelReference;
|
||||
Text m_textModelReference = default;
|
||||
[SerializeField]
|
||||
RawImage m_thumbnail;
|
||||
RawImage m_thumbnail = default;
|
||||
|
||||
[SerializeField, Header("CharacterPermission")]
|
||||
Text m_textPermissionAllowed;
|
||||
Text m_textPermissionAllowed = default;
|
||||
[SerializeField]
|
||||
Text m_textPermissionViolent;
|
||||
Text m_textPermissionViolent = default;
|
||||
[SerializeField]
|
||||
Text m_textPermissionSexual;
|
||||
Text m_textPermissionSexual = default;
|
||||
[SerializeField]
|
||||
Text m_textPermissionCommercial;
|
||||
Text m_textPermissionCommercial = default;
|
||||
[SerializeField]
|
||||
Text m_textPermissionOther;
|
||||
Text m_textPermissionOther = default;
|
||||
|
||||
[SerializeField, Header("DistributionLicense")]
|
||||
Text m_textDistributionLicense;
|
||||
Text m_textDistributionLicense = default;
|
||||
[SerializeField]
|
||||
Text m_textDistributionOther;
|
||||
Text m_textDistributionOther = default;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
|
@ -106,21 +106,21 @@ namespace VRM.Samples
|
|||
}
|
||||
}
|
||||
[SerializeField]
|
||||
TextFields m_texts;
|
||||
TextFields m_texts = default;
|
||||
|
||||
[Serializable]
|
||||
struct UIFields
|
||||
class UIFields
|
||||
{
|
||||
[SerializeField]
|
||||
Toggle ToggleMotionTPose;
|
||||
Toggle ToggleMotionTPose = default;
|
||||
|
||||
[SerializeField]
|
||||
Toggle ToggleMotionBVH;
|
||||
Toggle ToggleMotionBVH = default;
|
||||
|
||||
[SerializeField]
|
||||
ToggleGroup ToggleMotion;
|
||||
ToggleGroup ToggleMotion = default;
|
||||
|
||||
Toggle m_activeToggleMotion;
|
||||
Toggle m_activeToggleMotion = default;
|
||||
|
||||
public void UpdateToggle(Action onBvh, Action onTPose)
|
||||
{
|
||||
|
|
@ -144,10 +144,10 @@ namespace VRM.Samples
|
|||
}
|
||||
}
|
||||
[SerializeField]
|
||||
UIFields m_ui;
|
||||
UIFields m_ui = default;
|
||||
|
||||
[SerializeField]
|
||||
HumanPoseClip m_pose;
|
||||
HumanPoseClip m_pose = default;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -705,7 +705,7 @@ namespace UniGLTF
|
|||
[Serializable]
|
||||
class Dummy
|
||||
{
|
||||
public CantConstruct Value;
|
||||
public CantConstruct Value = default;
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ namespace UniHumanoid
|
|||
public class RuntimeBvhLoader : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
Button m_openButton;
|
||||
Button m_openButton = default;
|
||||
|
||||
[SerializeField]
|
||||
HumanPoseTransfer m_dst;
|
||||
HumanPoseTransfer m_dst = default;
|
||||
|
||||
UnityAction m_onClick;
|
||||
|
||||
|
|
|
|||
|
|
@ -210,17 +210,8 @@ namespace UniHumanoid
|
|||
}
|
||||
|
||||
// Create or update Main Asset
|
||||
if (File.Exists(path))
|
||||
{
|
||||
Debug.LogFormat("replace prefab: {0}", path);
|
||||
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
||||
PrefabUtility.ReplacePrefab(Root, prefab, ReplacePrefabOptions.ReplaceNameBased);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogFormat("create prefab: {0}", path);
|
||||
PrefabUtility.CreatePrefab(path, Root);
|
||||
}
|
||||
Debug.LogFormat("create prefab: {0}", path);
|
||||
PrefabUtility.SaveAsPrefabAssetAndConnect(Root, path, InteractionMode.AutomatedAction);
|
||||
|
||||
AssetDatabase.ImportAsset(path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ namespace VRM
|
|||
break;
|
||||
}
|
||||
|
||||
BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, value);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), value);
|
||||
yield return null;
|
||||
}
|
||||
BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, 1.0f);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), 1.0f);
|
||||
|
||||
// wait...
|
||||
yield return new WaitForSeconds(m_closingTime);
|
||||
|
|
@ -90,10 +90,10 @@ namespace VRM
|
|||
break;
|
||||
}
|
||||
|
||||
BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, value);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), value);
|
||||
yield return null;
|
||||
}
|
||||
BlendShapes.ImmediatelySetValue(BlendShapePreset.Blink, 0);
|
||||
BlendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace VRM
|
|||
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace VRM
|
|||
public string m_comment;
|
||||
|
||||
[SerializeField, Header("Gizmo")]
|
||||
bool m_drawGizmo;
|
||||
bool m_drawGizmo = default;
|
||||
|
||||
[SerializeField]
|
||||
Color m_gizmoColor = Color.yellow;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user