Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .idea/.gitignore

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

4 changes: 4 additions & 0 deletions .idea/encodings.xml

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

8 changes: 8 additions & 0 deletions .idea/indexLayout.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

32 changes: 32 additions & 0 deletions Documentation/LoadSave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# LoadSave. By Sathya Regunathan

## Overview

The scripts under `Assets/Scripts/DataVault` contain the implementation of the load/ save system to both device's persistent file and to firebase firestore.

Attach `DataManager.cs` to an empty game object; this integrates both the local and database saving functionality. It looks for objects that implement `IDataManager`, which provides an interface for implementing what attributes to load/ save based on the scenario's requirements. Follow the code in `Scenario1Manager.cs` for a rough outline on how to create your own ScenarioManager using the `IDataManager` interface.

## Overview of Each Component

**GameData.cs**
- The C# object that will be compressed into a JSON file containing game-relevant data. The game-relevant data are:
- TransformSnapshot structure consisting of the player's position and rotation.
- The scenario's name.
- Whether the scenario is completed or not.
- A dictionary containing the scenario name mapped to all the quests in the scenario and their completion status.
- Each scenario gets its own GameData instance, keeping the scenario's persistent state isolated from the others.

**ScenarioDefaults.cs**
- Contains the default values for each scenario's starting transform (position + rotation) and flags.

**DataManager.cs**
- Contains the functions that loads and saves game data.
- Loads data when game is launched.
- Saves data when application is quit.

**IDataManager.cs**
- Interface used to describe the functions used to load and save data.

**FileDataHandler.cs**
- Saves the entire game progress (GameDataCollection object consists of multiple GameData objects for each scenario) locally.
- Contain's optional XOR encryption.
161 changes: 156 additions & 5 deletions Gyroscope Testing/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
# Standard Unity Gitignore: Latest at https://github.com/github/gitignore/blob/main/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
Expand All @@ -17,12 +17,12 @@
# Recordings can get excessive in size
/[Rr]ecordings/

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
/.idea/

# https://github-wiki-see.page/m/interaction-lab/MoveToCode/wiki/Firebase-Setup
/[Aa]ssets/Data*
/[Aa]ssets/Firebase*

# Visual Studio cache directory
.vs/
Expand Down Expand Up @@ -71,3 +71,154 @@ crashlytics-build.properties
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

# Google Mechahamster .gitignore: Latest at https://github.com/google/mechahamster/blob/master/.gitignore
# Firebase stuff
/Assets/Firebase/
/Assets/PlayServicesResolver/
/Assets/Editor\ Default\ Resources/
/Assets/Firebase.meta
/Assets/PlayServicesResolver.meta
/Assets/Editor\ Default\ Resources.meta
/Assets/Plugins/Android/android.arch.*
/Assets/Plugins/Android/com.android.*
/Assets/Plugins/Android/com.crashlytics.*
/Assets/Plugins/Android/com.google.*
/Assets/Plugins/Android/firebase*
/Assets/Plugins/Android/Firebase.meta
/Assets/Plugins/Android/io.fabric.*
/Assets/Plugins/Android/libmessaging_unity_player_activity.jar
/Assets/Plugins/Android/libmessaging_unity_player_activity.jar.meta
/Assets/Plugins/Android/play-services-appinvite-*
/Assets/Plugins/Android/play-services-base-*
/Assets/Plugins/Android/play-services-basement-*
/Assets/Plugins/Android/play-services-tasks-*
/Assets/Plugins/Android/support-annotations-*
/Assets/Plugins/Android/support-*
/Assets/Plugins/Android/Firebase/
/Assets/Plugins/Android/Firebase*
/Assets/Plugins/iOS/Firebase/
/Assets/Plugins/iOS/Firebase*
/Assets/Plugins/x86_64/Firebase/
/Assets/Plugins/x86_64/Firebase*
/Assets/Parse/
/Assets/Parse.meta
/remote_config_data

# Mechahamster: https://github.com/google/mechahamster/blob/master/.gitignore
# Firebase Stuff
/Assets/Firebase/
/Assets/PlayServicesResolver/
/Assets/Editor\ Default\ Resources/
/Assets/Firebase.meta
/Assets/PlayServicesResolver.meta
/Assets/Editor\ Default\ Resources.meta
/Assets/Plugins/Android/android.arch.*
/Assets/Plugins/Android/com.android.*
/Assets/Plugins/Android/com.crashlytics.*
/Assets/Plugins/Android/com.google.*
/Assets/Plugins/Android/firebase*
/Assets/Plugins/Android/Firebase.meta
/Assets/Plugins/Android/io.fabric.*
/Assets/Plugins/Android/libmessaging_unity_player_activity.jar
/Assets/Plugins/Android/libmessaging_unity_player_activity.jar.meta
/Assets/Plugins/Android/play-services-appinvite-*
/Assets/Plugins/Android/play-services-base-*
/Assets/Plugins/Android/play-services-basement-*
/Assets/Plugins/Android/play-services-tasks-*
/Assets/Plugins/Android/support-annotations-*
/Assets/Plugins/Android/support-*
/Assets/Plugins/Android/Firebase/
/Assets/Plugins/Android/Firebase*
/Assets/Plugins/iOS/Firebase/
/Assets/Plugins/iOS/Firebase*
/Assets/Plugins/x86_64/Firebase/
/Assets/Plugins/x86_64/Firebase*
/Assets/Parse/
/Assets/Parse.meta
/remote_config_data

# Android SDK
Assets/Plugins/Android/com.google.firebase.*
Assets/Plugins/Android/com.google.android.gms.*
Assets/Plugins/Android/com.android.support.*
Assets/Plugins/Android/com.google.games.*
ProjectSettings/AndroidResolverDependencies.xml
ProjectSettings/GvhProjectSettings.xml

# Credential files:
**/GoogleService-Info*.plist*
**/google-services*.json*
/Assets/StreamingAssets*
/Assets/StreamingAssets/

# Keystore
*.keystore

# iOS system files
.DS_Store

# Docs output
/docs/html/

# Firebase CLI
**/node_modules/*
**/npm-debug.log
console/.firebaserc
console/firebase-debug.log

# Visual Studio
.vs

# Visual Studio Code
.vscode

#=====================================
# Additions: Place all additional items here.
#=====================================
# Asset Store
/Assets/AssetStoreTools*

# Crashlytics Symbols
*.symbols.zip

# UPM Sources (optional but suggested locations)
/PackagesSource/*
/PackageSourceFiles/*

# UPM Local
/[Pp]ackages/

# Generated Local
Assets/GeneratedLocalRepo.meta
Assets/GeneratedLocalRepo/*

###
# OS generated
###
*.DS_Store
*.DS_Store?

###
# Local Only Files and Dirs
###
.crashlytics/
nuget/
omnisharp.json

###
# Plugins: Consider making this more specific/narrower if you use plugins beyond/on top of Firebase ones.
###
Assets/GoogleMobileAds*
Assets/ExternalDependencyManager/
Assets/ExternalDependencyManager*
Assets/Plugins/Android*
Assets/Plugins/iOS*
Assets/Plugins/Android/
Assets/Plugins/iOS/
# Removes an erroneous meta file inclusion.
Assets/Plugins.meta

# If this is setup for a game team, you usually need to include
# those mainTemplate.gradle
# and even downloaded libraries
Loading