private void Reset() { boneRenderer = gameObject.GetComponent <BoneRenderer>(); if (rootObject == null) { rootObject = gameObject.transform.Find("Root").gameObject; } }
public void loadFromFile(string filename) { bvhParser = new BVHParser(File.ReadAllText(filename)); SkeletonConverter converter = new SkeletonConverter(); converter.createFromBVH(bvhParser); this.size = converter.size; root = converter.rootObj.transform; foreach (Transform child in this.transform) { UnityEngine.Object.DestroyImmediate(child.gameObject); } root.parent = this.transform; UnityEngine.Animations.Rigging.BoneRenderer myBoneRenderer = this.GetComponent <UnityEngine.Animations.Rigging.BoneRenderer>(); if (converter != null && converter.rootObj != null && myBoneRenderer != null) { myBoneRenderer.transforms = converter.transforms.ToArray(); } }
public static void OnBoneRendererDisabled(BoneRenderer obj) { s_BoneRendererComponents.Remove(obj); }
public static void OnBoneRendererEnabled(BoneRenderer obj) { s_BoneRendererComponents.Add(obj); }