void Awake()
 {
     this.tracker = GetComponent<SkeletonCapturing>();
     var controller = FindObjectOfType<Kinect2Controlling>();
     if(controller != null)
     {
         this.outputDirectory = Path.Combine(controller.Config.DataDirectory,OutputSubDirectory);
     }
     else
     {
         this.outputDirectory = Path.Combine(Environment.CurrentDirectory,OutputSubDirectory);
     }
     this.enabled = this.tracker != null && this.tracker.CanRecord;
 }
        // Use this for initialization
        void Start()
        {
            // Get the WIMUs manager
            receiver = GameObject.Find("WIMUs Server").GetComponent<ShimmerReceiving>();

            // Get our exporters
            fusionCapturer = this.GetComponent<FusionCapturing>();
            kinectCapturer = this.GetComponent<SkeletonCapturing>();

            // Init rotational reference + Reset orientations
            for( int i = 0; i < receiver.SensorsCount; ++i ) {
                isFirstOrientation[ i ] = true;
            }

            headingDelay = headingEstimationDelay;

            // Standalone code
            fusedView.enableRendering ();

            // Here we adapt our WIMUs configuration
            switch( FusedConfiguration.CurrentFusionType ) {
            case FusedConfiguration.FusionType.FUSION_LOWERBODY:
                fusionWIMUs[ 0 ] = JointType.SpineMid;
                fusionWIMUs[ 1 ] = JointType.SpineBase;
                fusionWIMUs[ 2 ] = JointType.KneeRight;
                fusionWIMUs[ 3 ] = JointType.AnkleRight;
                fusionWIMUs[ 4 ] = JointType.KneeLeft;
                fusionWIMUs[ 5 ] = JointType.AnkleLeft;
                fusionWIMUs[ 6 ] = JointType.FootRight;
                fusionWIMUs[ 7 ] = JointType.FootLeft;
                fusionPrecedentWIMUs[ 0 ] = JointType.SpineMid;
                fusionPrecedentWIMUs[ 1 ] = JointType.SpineBase;
                fusionPrecedentWIMUs[ 2 ] = JointType.HipRight;
                fusionPrecedentWIMUs[ 3 ] = JointType.KneeRight;
                fusionPrecedentWIMUs[ 4 ] = JointType.HipLeft;
                fusionPrecedentWIMUs[ 5 ] = JointType.KneeLeft;
                fusionPrecedentWIMUs[ 6 ] = JointType.AnkleRight;
                fusionPrecedentWIMUs[ 7 ] = JointType.AnkleLeft;

                // TODO Fill with missing joints
                wimusJointCount = 8;

                // Fill the other ones with unused joint
                for(int i = 8; i < wimusJointCount; ++i) {
                    fusionWIMUs[ i ] = (JointType) (-1);
                }
                break;
            default: // Keep it the way it was initialized.
                break;
            };
        }