Yes, it is possible to access and update data on the internal storage of Oculus Go using Unity. You can use the Unity's File API to read and write data to the internal storage. However, you need to request permission from the user to access the internal storage using Android's permission system.
Here is an example of reading and writing a file on Oculus Go's internal storage using Unity:
// Request permission to access the internal storage
yield return Application.RequestUserAuthorization(UserAuthorization.ExternalStorageWrite);
if (Application.HasUserAuthorization(UserAuthorization.ExternalStorageWrite))
{
// Path to the file on the internal storage
string filePath = Path.Combine(Application.persistentDataPath, "example.txt");
// Write data to the file
File.WriteAllText(filePath, "Hello, World!");
// Read data from the file
string data = File.ReadAllText(filePath);
Debug.Log("Data read from file: " + data);
}
else
{
Debug.LogError("Unable to access internal storage.");
}
Note that when running the application on the Oculus Go, you need to build your application with the Android SDK and set up the Oculus Go developer mode to install and run your application on the device.
Asked: 2022-04-28 11:00:00 +0000
Seen: 9 times
Last updated: Sep 18 '21