Skip to content

Commit

Permalink
Merge pull request #79 from Siddhant-Patil0203/main
Browse files Browse the repository at this point in the history
Data transfer between scene tested
  • Loading branch information
UBA-GCOEN authored Oct 1, 2023
2 parents 301541a + fff6307 commit 4532662
Show file tree
Hide file tree
Showing 60 changed files with 5,984 additions and 10,838 deletions.
164 changes: 157 additions & 7 deletions Assets/Scenes/Home.unity
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2075352314}
- {fileID: 871830594}
- {fileID: 1777561027}
- {fileID: 871830594}
- {fileID: 903044315}
- {fileID: 2075352314}
m_Father: {fileID: 261575508}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -340,7 +341,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 364}
m_AnchoredPosition: {x: 128.69, y: 696.3}
m_SizeDelta: {x: 599.1254, y: 106.8564}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &871830595
Expand Down Expand Up @@ -440,6 +441,141 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 871830593}
m_CullTransparentMesh: 1
--- !u!1 &903044314
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 903044315}
- component: {fileID: 903044317}
- component: {fileID: 903044316}
m_Layer: 5
m_Name: Welcome user
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &903044315
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 903044314}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 828965636}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 376}
m_SizeDelta: {x: 900, y: 82}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &903044316
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 903044314}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Welcome, user !
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 80
m_fontSizeBase: 80
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &903044317
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 903044314}
m_CullTransparentMesh: 1
--- !u!1 &1188642983
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -613,6 +749,7 @@ GameObject:
- component: {fileID: 1776942175}
- component: {fileID: 1776942174}
- component: {fileID: 1776942173}
- component: {fileID: 1776942176}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
Expand Down Expand Up @@ -694,6 +831,19 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1776942176
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776942172}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8d9c63ae20acdbb4c8e932d2ccc1fe48, type: 3}
m_Name:
m_EditorClassIdentifier:
welcomeText: {fileID: 903044316}
--- !u!1 &1777561026
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -729,8 +879,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 674}
m_SizeDelta: {x: 473.7383, y: 473.7383}
m_AnchoredPosition: {x: -301, y: 696.3}
m_SizeDelta: {x: 260.2577, y: 260.2577}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1777561028
MonoBehaviour:
Expand Down Expand Up @@ -802,8 +952,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -25.122, y: -208}
m_SizeDelta: {x: 523.9819, y: 942.3911}
m_AnchoredPosition: {x: 0, y: -299}
m_SizeDelta: {x: 540.3773, y: 971.8784}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2075352315
MonoBehaviour:
Expand Down
21 changes: 21 additions & 0 deletions Assets/Scripts/HomeTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;

public class HomeScript : MonoBehaviour
{
public TextMeshProUGUI welcomeText;

void Start()
{
// Retrieve user data from PlayerPrefs
string userName = PlayerPrefs.GetString("UserName", "Guest"); // "Guest" is the default if no user data is found

// Update the UI with the user's name
welcomeText.text = "Welcome, " + userName + "!";

// You can also use the token for any authenticated requests if needed
}

// Rest of your "Home" scene code
}
11 changes: 11 additions & 0 deletions Assets/Scripts/HomeTest.cs.meta

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

10 changes: 9 additions & 1 deletion Assets/Scripts/Login.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
using UnityEngine.Networking;
using UnityEngine.UI;
using System.Text.RegularExpressions;
using UnityEngine.SceneManagement;

public class Login : MonoBehaviour
{
private string baseURL = "https://arrowserver.vercel.app";
private string baseURL = "https://arrowserver.vercel.app";
// private string baseURL = "http://localhost:5000"; // To run server locally.
[SerializeField] private string apiEndpoint;
[SerializeField] private TMP_InputField email;
[SerializeField] private TMP_InputField password;
Expand Down Expand Up @@ -52,8 +54,14 @@ private IEnumerator TryLogin()
if (request.result == UnityWebRequest.Result.Success)
{
SigninResponse response = JsonUtility.FromJson<SigninResponse>(request.downloadHandler.text);
Debug.LogError(response.success);
Debug.LogError(response.result);
Debug.LogError(response.token);
Debug.LogError(response.msg);

PlayerPrefs.SetString("UserName", response.result);

SceneManager.LoadScene("Home");
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SigninResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public class SigninResponse
public bool success;
public string result;
public string token;
public string csrfToken;
// public string csrfToken;
public string msg;
}
Binary file modified Library/ArtifactDB
Binary file not shown.
2 changes: 1 addition & 1 deletion Library/Bee/1300b0aE-inputdata.json

Large diffs are not rendered by default.

Binary file modified Library/Bee/1300b0aE.dag
Binary file not shown.
7 changes: 4 additions & 3 deletions Library/Bee/1300b0aE.dag.json
Original file line number Diff line number Diff line change
Expand Up @@ -45167,7 +45167,7 @@
"DisplayName": "Writing Assembly-CSharp.rsp",
"ActionType": "WriteFile",
"PayloadOffset": 3428274,
"PayloadLength": 38411,
"PayloadLength": 38441,
"PayloadDebugContentSnippet": "-target:library\r\n-out:\"Library",
"Inputs": [],
"Outputs": [
Expand All @@ -45179,7 +45179,7 @@
"Annotation": "WriteText Library/Bee/artifacts/1300b0aE.dag/Assembly-CSharp.rsp2",
"DisplayName": "Writing Assembly-CSharp.rsp2",
"ActionType": "WriteFile",
"PayloadOffset": 3466772,
"PayloadOffset": 3466802,
"PayloadLength": 0,
"PayloadDebugContentSnippet": "",
"Inputs": [],
Expand Down Expand Up @@ -45465,6 +45465,7 @@
"Library/Bee/artifacts/1300b0aE.dag/UnityEngine.XR.MagicLeap.ref.dll",
"Assets/ExampleAssets/Scripts/AnchorCreator.cs",
"Assets/ExampleAssets/Scripts/ARFeatheredPlaneMeshVisualizer.cs",
"Assets/Scripts/HomeTest.cs",
"Assets/Scripts/Login.cs",
"Assets/Scripts/SceneLoader.cs",
"Assets/Scripts/SigninResponse.cs",
Expand Down Expand Up @@ -46033,7 +46034,7 @@
"Annotation": "WriteText Library/Bee/artifacts/1300b0aE.dag/Assembly-CSharp.dll.mvfrm.rsp",
"DisplayName": "Writing Assembly-CSharp.dll.mvfrm.rsp",
"ActionType": "WriteFile",
"PayloadOffset": 3466868,
"PayloadOffset": 3466898,
"PayloadLength": 12911,
"PayloadDebugContentSnippet": "Library\\Bee\\artifacts\\mvdfrm\\U",
"Inputs": [],
Expand Down
Binary file modified Library/Bee/1300b0aE.dag.payloads
Binary file not shown.
Binary file modified Library/Bee/1300b0aE.dag_derived
Binary file not shown.
Binary file modified Library/Bee/TundraBuildState.state
Binary file not shown.
Binary file modified Library/Bee/TundraBuildState.state.map
Binary file not shown.
Binary file modified Library/Bee/artifacts/1300b0aE.dag/Assembly-CSharp.dll
Binary file not shown.
Binary file modified Library/Bee/artifacts/1300b0aE.dag/Assembly-CSharp.pdb
Binary file not shown.
Binary file modified Library/Bee/artifacts/1300b0aE.dag/Assembly-CSharp.ref.dll
Binary file not shown.
1 change: 1 addition & 0 deletions Library/Bee/artifacts/1300b0aE.dag/Assembly-CSharp.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
-analyzer:"C:/Program Files/Unity/Hub/Editor/2022.3.4f1/Editor/Data/Tools/Unity.SourceGenerators/Unity.SourceGenerators.dll"
"Assets/ExampleAssets/Scripts/AnchorCreator.cs"
"Assets/ExampleAssets/Scripts/ARFeatheredPlaneMeshVisualizer.cs"
"Assets/Scripts/HomeTest.cs"
"Assets/Scripts/Login.cs"
"Assets/Scripts/SceneLoader.cs"
"Assets/Scripts/SigninResponse.cs"
Expand Down
Loading

0 comments on commit 4532662

Please sign in to comment.