浏览代码

Bug fix AutoSetupTwoBoneIK.cs for use with prefabs

/main
Dave Hunt 5 年前
当前提交
50345f5c
共有 2 个文件被更改,包括 33 次插入7 次删除
  1. 4
      Assets/AnimationRiggingWorkshop/Editor/TwoBoneIKAutoSetup.cs
  2. 36
      Assets/AnimationRiggingWorkshop/Scenes/NinjaMegacityDemo.unity

4
Assets/AnimationRiggingWorkshop/Editor/TwoBoneIKAutoSetup.cs


{
Undo.RecordObject(constraint, "Setup mid bone for TwoBoneIK");
constraint.data.mid = tip.parent;
if (PrefabUtility.IsPartOfPrefabInstance(constraint)) EditorUtility.SetDirty(constraint);
}
if (!constraint.data.root)

if (PrefabUtility.IsPartOfPrefabInstance(constraint)) EditorUtility.SetDirty(constraint);
}
if (!constraint.data.target)

t.name = constraint.gameObject.name + "_target";
Undo.SetTransformParent(t.transform, constraint.transform, "Set new parent");
target = t.transform;
if (PrefabUtility.IsPartOfPrefabInstance(constraint)) EditorUtility.SetDirty(constraint);
}
constraint.data.target = target;
}

hint = t.transform;
}
constraint.data.hint = hint;
if (PrefabUtility.IsPartOfPrefabInstance(constraint)) EditorUtility.SetDirty(constraint);
}
// align target and hint to bones

36
Assets/AnimationRiggingWorkshop/Scenes/NinjaMegacityDemo.unity


m_Item7:
transform: {fileID: 0}
weight: 0
m_PositionOffset: {x: 0, y: 0, z: 0}
m_RotationOffset: {x: 0, y: 0, z: 0, w: 1}
m_ConstrainedPositionAxes:
x: 1
y: 1

z: 1
m_MaintainPositionOffset: 0
m_MaintainRotationOffset: 0
m_SoloMode: 0
m_SourceObjectsGUIToggle: 1
m_SettingsGUIToggle: 1
--- !u!1001 &386096663

objectReference: {fileID: 0}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.size
value: 48
value: 49
objectReference: {fileID: 0}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Transform
value:
objectReference: {fileID: 1732088091}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Style.shape
value:
objectReference: {fileID: 4300000, guid: e050c2b16fe384bd994474655a4b4968, type: 2}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Style.color.r
value: 0
objectReference: {fileID: 0}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Style.color.a
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Style.size
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Visible
value: 1
objectReference: {fileID: 0}
- target: {fileID: 772315689, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}
propertyPath: m_Effectors.Array.data[48].m_Style.color.b
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5fd80ff0c777aee40a0461cf5165b893, type: 3}

m_Item7:
transform: {fileID: 0}
weight: 0
m_PositionOffset: {x: 0, y: 0, z: 0}
m_RotationOffset: {x: 0, y: 0, z: 0, w: 1}
m_ConstrainedPositionAxes:
x: 1
y: 1

z: 1
m_MaintainPositionOffset: 0
m_MaintainRotationOffset: 0
m_SoloMode: 0
m_SourceObjectsGUIToggle: 1
m_SettingsGUIToggle: 1
--- !u!1001 &1296538010

正在加载...
取消
保存