public override void Load(string fileName) { m_ClipList = new List <BaseRecordData>(); string filePath = Application.streamingAssetsPath + "/Behaviors/" + fileName + "_" + recordName + ".txt"; if (new FileInfo(filePath).Exists == false) { return; } using (FileStream fs = File.OpenRead(filePath)) { using (StreamReader sr = new StreamReader(fs)) { String line; while ((line = sr.ReadLine()) != null) { string[] elements = line.Trim().Split('#'); int index = int.Parse(elements[0]); float timeStamp = Convert.ToSingle(elements[1]); string[] s = elements[2].Trim().Split('/'); Matrix4x4 m = Matrix4x4.zero; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { m[i, j] = Convert.ToSingle(s[i * 4 + j]); } } m_ClipList.Add(new TransformRecordData(index, timeStamp, m)); } } } // disable steam vr input Valve.VR.SteamVR_Behaviour_Pose pos = GetComponent <Valve.VR.SteamVR_Behaviour_Pose>(); if (pos != null) { pos.poseAction = Valve.VR.SteamVR_Input.GetAction <Valve.VR.SteamVR_Action_Pose>(""); } UnityEngine.SpatialTracking.TrackedPoseDriver driver = GetComponent <UnityEngine.SpatialTracking.TrackedPoseDriver>(); if (driver != null) { driver.trackingType = (UnityEngine.SpatialTracking.TrackedPoseDriver.TrackingType) 3; } }