With Oculus Link, I can not see my hand
Hello, everyone! I am currently using unity for development,and want to debug my program in unity editor.But with oculus link , I can not see my hand. I just can see the Handle controller,I turned on gesture tracking in the Settings, and the program can run normally after export562Views0likes0CommentsQuestion about data saving
Hello, how to save the game data in progress (ex. virtual helmet rotation y-axis) in the Oculus Quest2 helmet, and be able to open the folder to find the stored file data after the end. I use this C# but not woking, how to test that data can save in helmet : using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; using UnityEngine.UI; // private List<string[]> dataList = new List<string[]>(); // // private string[] header = { "Name", "Age", "Gender" }; // // private string filePath; // save path public class DataRecorder : MonoBehaviour { private float[] yRotations; private int currentIndex = 0; public DataRecorder dataRecorder; private void Awake() { yRotations = new float[1000]; // } public void RecordData(float yRotation) { yRotations[currentIndex++] = yRotation; } public string SaveDataToFile() { string filePath = Path.Combine(Application.persistentDataPath, "data.csv"); using (StreamWriter writer = new StreamWriter(filePath)) { for (int i = 0; i < currentIndex; i++) { writer.WriteLine(yRotations[i]); } } return filePath; } public void OnButtonClick() { float yRotation = transform.rotation.eulerAngles.y; dataRecorder.RecordData(yRotation); } } /* public float loggingInterval = 1f; // record time(sec) public string logFileName = "head_rotation_log.txt"; // private float timer = 0f; private float lastYRotation = 0f; private float currentYRotation = 0f; private string logFilePath; TimerController IOtime;*/ /*void Start() { logFilePath = Path.Combine(Application.dataPath, logFileName); IOtime.timeElapsed = timer; }*/ /* void Update() { currentYRotation = transform.rotation.eulerAngles.y; // timer += Time.deltaTime; if (timer >= loggingInterval) { float yRotationDelta = currentYRotation - lastYRotation; Debug.Log("Y Rotation: " + yRotationDelta + " degrees in " + loggingInterval + " seconds"); using (StreamWriter writer = new StreamWriter(logFilePath, true)) { writer.WriteLine("Y Rotation: " + yRotationDelta + " degrees in " + loggingInterval + " seconds"); } lastYRotation = currentYRotation; timer = 0f; } }*/883Views0likes0CommentsDebugUI AddLabel issues
DebugUIBuilder.instance.AddSlider("Gain", 0.0f, 4.0f, SliderPressed, false, 2); 1) When this Slider appears in the panel, the slider label is set to "slider label" - should it not read "Gain"? To get it to read "Gain" I have to set it explicitly var sliderPrefab = DebugUIBuilder.instance.AddSlider("Gain", 0.0f, 4.0f, SliderPressed, false, 2); var textElementsInSlider = sliderPrefab.GetComponentsInChildren<Text>(); Assert.AreEqual(textElementsInSlider.Length, 2, "Slider prefab format requires 2 text components (label + value)"); sliderText = textElementsInSlider[1]; Assert.IsNotNull(sliderText, "No text component on slider prefab"); textElementsInSlider[0].text = "Gain"; 2) How can I set the initial value of the slider? For example, in this use the initial value of Gain is 1.0f but the slider is set at 0. It's not a show stopper, but useful to have this default value to be set somewhere in the range.493Views0likes0Comments