Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
Former-commit-id: 47f6ce6 [formerly 9d510cd]
Former-commit-id: c364a91
  • Loading branch information
akshat-khare committed Mar 11, 2024
1 parent 6858ff5 commit 64cc5b6
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 34 deletions.
8 changes: 8 additions & 0 deletions Assets/ExternalDependencyManager.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/ExternalDependencyManager/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/ExternalDependencyManager/Editor/1.2.177.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Firebase.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Firebase/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Firebase/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Firebase/Plugins/iOS.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Assets/InsightXR/Network/DataHandleLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public class DataHandleLayer : MonoBehaviour

private void OnEnable()
{
if (!Directory.Exists(Application.persistentDataPath + "/Saves"))
{
Directory.CreateDirectory(Application.persistentDataPath + "/Saves");
}
if (Application.platform != RuntimePlatform.WebGLPlayer)
{
Debug.Log("Not running on WebGL");
Expand Down Expand Up @@ -74,10 +78,7 @@ private void OnDisable()
{
//Create a Save File incase the Application wants to close
DataCollector.CollectionRequestEvent -= SortAndStoreData;
if (Directory.Exists(Application.persistentDataPath + "/Saves"))
{
Directory.CreateDirectory(Application.persistentDataPath + "/Saves");
}

Debug.Log("Record Count: "+ UserInstanceData.First().Value.Count);
File.WriteAllText(Application.persistentDataPath + "/Saves/Save.json",JsonConvert.SerializeObject(UserInstanceData));
// //We can instead call it directly with the file path and create a stream like that, but for now, this will do
Expand Down
6 changes: 3 additions & 3 deletions Assets/InsightXR/Network/NetworkUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace InsightXR.Network
public class NetworkUploader : MonoBehaviour
{
public IAmazonS3 s3Client;
private string awsAccessKeyId = "AKIAXQOF2EHXCW6YVEPP";
private string awsSecretAccessKey = "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";
private string bucketName = "shyreyanshaws";
public string awsAccessKeyId;
public string awsSecretAccessKey;
public string bucketName;

private void Start()
{
Expand Down
42 changes: 15 additions & 27 deletions Assets/InsightXR/VR/LoadCamData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,19 @@ private void OnEnable()
// Start is called before the first frame update
void Start()
{
// if (UnityEngine.Device.Application.platform == RuntimePlatform.WebGLPlayer)
// { GetCamData(Application.persistentDataPath + "/Saves", gameObject.name, "callback", "fallback","https://shivam1807.s3.ap-south-1.amazonaws.com/Replay+Data");
// }
// else
// {
// callback(File.ReadAllText(UnityEngine.Device.Application.persistentDataPath + "/Saves/Save.json"));
// }



// Debug.Log("Check");
// MotionPackage loadedData =
// JsonConvert.DeserializeObject<MotionPackage>(
// File.ReadAllText(Application.dataPath + "/Saves/Save.json"));
//
// Debug.Log(loadedData.Playerdata);
//
// MotionRecord = loadedData.GetPlayerData();
// loaded = true;
// totalframes = MotionRecord.Count;
// frame = 0;
// Debug.Log("Loaded Data");
//
// loaded = true;
if (UnityEngine.Device.Application.platform == RuntimePlatform.WebGLPlayer)
{
//GetCamData(Application.persistentDataPath + "/Saves", gameObject.name, "callback", "fallback", "https://shyreyanshaws.s3.ap-south-1.amazonaws.com/Replay+Data.json");
Debug.Log("Cam data function if available was executed");
}
else
{
callback(File.ReadAllText(UnityEngine.Device.Application.persistentDataPath + "/Saves/Save.json"));
}




}

// Update is called once per frame
Expand Down Expand Up @@ -90,9 +79,8 @@ void FixedUpdate()
}


// [DllImport("__Internal")]
// public static extern void GetCamData(string path, string ObjectName, string callback, string fallback,
// string url);
//[DllImport("__Internal")]
//public static extern void GetCamData(string path, string ObjectName, string callback, string fallback, string url);

public void callback(string camdata)
{
Expand Down

0 comments on commit 64cc5b6

Please sign in to comment.