Example #1
0
 // Use this for initialization
 void Start()
 {
     // if jointmapper was not set, try to find one.
     if (this.JointMapper == null)
     {
         GameObject[] objs = UnityEngine.Object.FindObjectsOfType(typeof(GameObject)) as GameObject[];
         foreach (var obj in objs)
         {
             this.JointMapper = obj.GetComponent <JointMapping>();;
             if (this.JointMapper != null)
             {
                 break;
             }
         }
     }
 }
Example #2
0
        public void OnEnable()
        {
            jointMapperSO = new SerializedObject(target);

            this.jointMapList = target as JointMapping;
            if (null != this.jointMapList)
            {
                this.jointTypeNames = this.jointMapList.JointTypeNames;
                if (null != this.jointMapList.BoneNames && this.jointMapList.BoneNames.Count != 0)
                {
                    this.boneNames = this.jointMapList.BoneNames.ToArray();
                }
                else
                {
                    this.boneNames = null;
                }
            }
        }
Example #3
0
 public static void MakeKinectMapper()
 {
     JointMapping.Create(Selection.activeGameObject);
 }