mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-28 10:15:06 +08:00
feat: SetOrInherit mode in MA Mesh Settings for EasySetupOutfit (#981)
* feat: SetOrInherit for MA Mesh Settings * chore: use SetOrInherit in EasySetupOutfit * test: fix test data * Delete Editor/CheckBoneMapping.cs
This commit is contained in:
parent
e2e0b88dfa
commit
f4ab86fedc
3
Editor/CheckBoneMapping.cs.meta
Normal file
3
Editor/CheckBoneMapping.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6445045a83084d77a5f455165ded177d
|
||||
timeCreated: 1714652822
|
@ -204,8 +204,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
rootBone = avatarRoot.transform;
|
||||
}
|
||||
|
||||
meshSettings.InheritProbeAnchor = ModularAvatarMeshSettings.InheritMode.Set;
|
||||
meshSettings.InheritBounds = ModularAvatarMeshSettings.InheritMode.Set;
|
||||
meshSettings.InheritProbeAnchor = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||
meshSettings.InheritBounds = ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||
|
||||
meshSettings.ProbeAnchor = new AvatarObjectReference();
|
||||
meshSettings.ProbeAnchor.referencePath = RuntimeUtil.RelativePath(avatarRoot, probeAnchor.gameObject);
|
||||
|
@ -54,7 +54,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
|
||||
EditorGUILayout.LabelField(G("mesh_settings.header_probe_anchor"), EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(_prop_inherit_probe_anchor, G("mesh_settings.inherit_probe_anchor"));
|
||||
if (_prop_inherit_probe_anchor.enumValueIndex == (int) ModularAvatarMeshSettings.InheritMode.Set)
|
||||
if (_prop_inherit_probe_anchor.enumValueIndex is (int) ModularAvatarMeshSettings.InheritMode.Set or (int) ModularAvatarMeshSettings.InheritMode.SetOrInherit)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_prop_probe_anchor, G("mesh_settings.probe_anchor"));
|
||||
}
|
||||
@ -72,7 +72,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
|
||||
EditorGUILayout.LabelField(G("mesh_settings.header_bounds"), EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(_prop_inherit_bounds, G("mesh_settings.inherit_bounds"));
|
||||
if (_prop_inherit_bounds.enumValueIndex == (int) ModularAvatarMeshSettings.InheritMode.Set)
|
||||
if (_prop_inherit_bounds.enumValueIndex is (int) ModularAvatarMeshSettings.InheritMode.Set or (int) ModularAvatarMeshSettings.InheritMode.SetOrInherit)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_prop_root_bone, G("mesh_settings.root_bone"));
|
||||
EditorGUILayout.PropertyField(_prop_bounds, G("mesh_settings.bounds"));
|
||||
|
@ -126,6 +126,7 @@
|
||||
"mesh_settings.inherit_mode.Inherit": "Inherit",
|
||||
"mesh_settings.inherit_mode.Set": "Set",
|
||||
"mesh_settings.inherit_mode.DontSet": "Don't Set (use mesh as-is)",
|
||||
"mesh_settings.inherit_mode.SetOrInherit": "Set or inherit if set by parent",
|
||||
"pb_blocker.help": "This object will not be affected by PhysBones attached to parents.",
|
||||
"hint.bad_vrcsdk": "Incompatible version of VRCSDK detected.\n\nPlease try upgrading your VRCSDK; if this does not work, check for a newer version of Modular Avatar as well.",
|
||||
"error.stack_trace": "Stack trace (provide this when reporting bugs!)",
|
||||
|
@ -122,6 +122,7 @@
|
||||
"mesh_settings.inherit_mode.Inherit": "継承",
|
||||
"mesh_settings.inherit_mode.Set": "設定",
|
||||
"mesh_settings.inherit_mode.DontSet": "設定しない(メッシュ本体の設定のまま)",
|
||||
"mesh_settings.inherit_mode.SetOrInherit": "親が指定されてる時は継承、または設定",
|
||||
"pb_blocker.help": "このオブジェクトは親のPhysBoneから影響を受けなくなります。",
|
||||
"hint.bad_vrcsdk": "使用中のVRCSDKのバージョンとは互換性がありません。\n\nVRCSDKを更新してみてください。それでもだめでしたら、Modular Avatarにも最新版が出てないかチェックしてください。",
|
||||
"error.stack_trace": "スタックトレース(バグを報告する時は必ず添付してください!)",
|
||||
|
@ -7,7 +7,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
{
|
||||
internal static bool NotFinal(this ModularAvatarMeshSettings.InheritMode mode)
|
||||
{
|
||||
return mode == ModularAvatarMeshSettings.InheritMode.Inherit;
|
||||
return mode is ModularAvatarMeshSettings.InheritMode.Inherit or ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,15 +37,45 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
public Bounds Bounds;
|
||||
}
|
||||
|
||||
private static bool Inherit(ref ModularAvatarMeshSettings.InheritMode mode,
|
||||
ModularAvatarMeshSettings.InheritMode srcmode)
|
||||
// current Mode is the mode of current value, and the current value is came from MA Mesh Settings of child GameObject
|
||||
// the srcMode is the mode of currently processing MA Mesh Settings, which is the parent component of the current value
|
||||
private static bool ShouldUseSrcValue(
|
||||
ref ModularAvatarMeshSettings.InheritMode currentMode,
|
||||
ModularAvatarMeshSettings.InheritMode srcMode)
|
||||
{
|
||||
if (mode != ModularAvatarMeshSettings.InheritMode.Inherit ||
|
||||
srcmode == ModularAvatarMeshSettings.InheritMode.Inherit)
|
||||
return false;
|
||||
switch (currentMode, srcMode)
|
||||
{
|
||||
// invalid cases
|
||||
case (not (ModularAvatarMeshSettings.InheritMode.Set
|
||||
or ModularAvatarMeshSettings.InheritMode.Inherit
|
||||
or ModularAvatarMeshSettings.InheritMode.DontSet
|
||||
or ModularAvatarMeshSettings.InheritMode.SetOrInherit), _):
|
||||
throw new System.InvalidOperationException($"Logic failure: invalid InheritMode: {currentMode}");
|
||||
case (_, not (ModularAvatarMeshSettings.InheritMode.Set
|
||||
or ModularAvatarMeshSettings.InheritMode.Inherit
|
||||
or ModularAvatarMeshSettings.InheritMode.DontSet
|
||||
or ModularAvatarMeshSettings.InheritMode.SetOrInherit)):
|
||||
throw new System.ArgumentOutOfRangeException(nameof(srcMode), $"Invalid InheritMode: {srcMode}");
|
||||
|
||||
mode = srcmode;
|
||||
return true;
|
||||
// If current value is came from Set or DontSet, it should not be changed
|
||||
case (ModularAvatarMeshSettings.InheritMode.Set, _):
|
||||
case (ModularAvatarMeshSettings.InheritMode.DontSet, _):
|
||||
return false;
|
||||
// If srcMode is Inherit, it should not be changed
|
||||
case (_, ModularAvatarMeshSettings.InheritMode.Inherit):
|
||||
return false;
|
||||
|
||||
// If srcMode is DontSet, the value will not be used but mode should be used
|
||||
case (_, ModularAvatarMeshSettings.InheritMode.DontSet):
|
||||
currentMode = srcMode;
|
||||
return true;
|
||||
|
||||
// if SrcMode is Set or SetOrInherit, it should be used.
|
||||
case (_, ModularAvatarMeshSettings.InheritMode.Set):
|
||||
case (_, ModularAvatarMeshSettings.InheritMode.SetOrInherit):
|
||||
currentMode = srcMode;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
internal static MergedSettings MergeSettings(Transform avatarRoot, Transform referenceObject)
|
||||
@ -74,20 +104,20 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Inherit(ref inheritProbeAnchor, settings.InheritProbeAnchor))
|
||||
if (ShouldUseSrcValue(ref inheritProbeAnchor, settings.InheritProbeAnchor))
|
||||
{
|
||||
merged.ProbeAnchor = settings.ProbeAnchor.Get(settings)?.transform;
|
||||
}
|
||||
|
||||
if (Inherit(ref inheritBounds, settings.InheritBounds))
|
||||
if (ShouldUseSrcValue(ref inheritBounds, settings.InheritBounds))
|
||||
{
|
||||
merged.RootBone = settings.RootBone.Get(settings)?.transform;
|
||||
merged.Bounds = settings.Bounds;
|
||||
}
|
||||
} while (current != null && (inheritProbeAnchor.NotFinal() || inheritBounds.NotFinal()));
|
||||
|
||||
merged.SetAnchor = inheritProbeAnchor == ModularAvatarMeshSettings.InheritMode.Set;
|
||||
merged.SetBounds = inheritBounds == ModularAvatarMeshSettings.InheritMode.Set;
|
||||
merged.SetAnchor = inheritProbeAnchor is ModularAvatarMeshSettings.InheritMode.Set or ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||
merged.SetBounds = inheritBounds is ModularAvatarMeshSettings.InheritMode.Set or ModularAvatarMeshSettings.InheritMode.SetOrInherit;
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
@ -15,7 +15,9 @@ namespace nadena.dev.modular_avatar.core
|
||||
{
|
||||
Inherit,
|
||||
Set,
|
||||
DontSet
|
||||
DontSet,
|
||||
// Inherit if there is parent settings, set otherwise
|
||||
SetOrInherit,
|
||||
}
|
||||
|
||||
//[Header("Probe anchor configuration")]
|
||||
|
@ -171,8 +171,7 @@ MonoBehaviour:
|
||||
isDefault: 1
|
||||
- isEnabled: 0
|
||||
type: 5
|
||||
animatorController: {fileID: 9100000, guid: 1be58bb091803cb488c7005def284caa,
|
||||
type: 2}
|
||||
animatorController: {fileID: 9100000, guid: 1be58bb091803cb488c7005def284caa, type: 2}
|
||||
mask: {fileID: 0}
|
||||
isDefault: 0
|
||||
specialAnimationLayers:
|
||||
@ -333,98 +332,79 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 3825275463613500751}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.023681391
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.0559628
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.6872994
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071067
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_DirtyAABB
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_AABB.m_Extent.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_AABB.m_Extent.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_AABB.m_Extent.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BaseMesh
|
||||
objectReference: {fileID: 0}
|
||||
@ -435,8 +415,7 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
--- !u!4 &3646968714803193661 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
m_PrefabInstance: {fileID: 3825275463173128406}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &3825275463971368607
|
||||
@ -447,103 +426,83 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 3825275463613500751}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.023681391
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.0559628
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.6872994
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071067
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_DirtyAABB
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_AABB.m_Extent.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_AABB.m_Extent.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_AABB.m_Extent.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: -3887185075125053422, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_BlendShapeWeights.Array.size
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- target: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: SyncedMesh
|
||||
objectReference: {fileID: 0}
|
||||
@ -551,21 +510,18 @@ PrefabInstance:
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 3825275463971368602}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
--- !u!4 &3646968713996568948 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
m_PrefabInstance: {fileID: 3825275463971368607}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &4167925416990528462 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047,
|
||||
type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 14ac2ad30c5d3444ca37f76cea5a7047, type: 3}
|
||||
m_PrefabInstance: {fileID: 3825275463971368607}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &3825275463971368602
|
||||
|
@ -21,11 +21,13 @@ namespace modular_avatar_tests
|
||||
var obj2 = prefab.transform.Find("ProbeTargetRenderers/MeshRenderer").GetComponent<Renderer>();
|
||||
var obj3 = prefab.transform.Find("ProbeTargetRenderers/ParticleSystemRenderer").GetComponent<Renderer>();
|
||||
var obj4 = prefab.transform.Find("ProbeTargetRenderers/TrailRenderer").GetComponent<Renderer>();
|
||||
var obj5 = prefab.transform.Find("ProbeTargetRenderers/SetOrInherit").GetComponent<Renderer>();
|
||||
|
||||
Assert.AreEqual(target, obj1.probeAnchor);
|
||||
Assert.AreEqual(target, obj2.probeAnchor);
|
||||
Assert.AreEqual(target, obj3.probeAnchor);
|
||||
Assert.AreEqual(target, obj4.probeAnchor);
|
||||
Assert.AreEqual(target, obj5.probeAnchor);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -37,9 +39,11 @@ namespace modular_avatar_tests
|
||||
|
||||
var noninherit = prefab.transform.Find("ProbeTargetRenderers/NonInherited").GetComponent<MeshRenderer>();
|
||||
var overrideset = prefab.transform.Find("ProbeTargetRenderers/OverrideSet").GetComponent<MeshRenderer>();
|
||||
var setOrInherit = prefab.transform.Find("ProbeTargetRenderers SetOrInherit No Parent").GetComponent<MeshRenderer>();
|
||||
|
||||
Assert.AreEqual(noninherit.transform.Find("Target"), noninherit.probeAnchor);
|
||||
Assert.AreEqual(overrideset.transform.Find("Target"), overrideset.probeAnchor);
|
||||
Assert.AreEqual(setOrInherit.transform.Find("Target"), setOrInherit.probeAnchor);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user