mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Fixed transform constraints.
This commit is contained in:
parent
7211cc3c7b
commit
3a7a4a642b
@ -152,11 +152,11 @@ namespace Spine {
|
|||||||
|
|
||||||
// Transform constraints.
|
// Transform constraints.
|
||||||
if (root.ContainsKey("transform")) {
|
if (root.ContainsKey("transform")) {
|
||||||
foreach (Dictionary<String, Object> transformMap in (List<Object>)root["ik"]) {
|
foreach (Dictionary<String, Object> transformMap in (List<Object>)root["transform"]) {
|
||||||
TransformConstraintData transformConstraintData = new TransformConstraintData((String)transformMap["name"]);
|
TransformConstraintData transformConstraintData = new TransformConstraintData((String)transformMap["name"]);
|
||||||
|
|
||||||
String boneName = (String)transformMap["bone"];
|
String boneName = (String)transformMap["bone"];
|
||||||
transformConstraintData.target = skeletonData.FindBone(boneName);
|
transformConstraintData.bone = skeletonData.FindBone(boneName);
|
||||||
if (transformConstraintData.target == null) throw new Exception("Bone not found: " + boneName);
|
if (transformConstraintData.target == null) throw new Exception("Bone not found: " + boneName);
|
||||||
|
|
||||||
String targetName = (String)transformMap["target"];
|
String targetName = (String)transformMap["target"];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user