这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b535637
Revert "automated duplicating imported samples modifications (#595)"
robGG1997 Sep 14, 2023
95fb832
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 14, 2023
e3ab3c2
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 14, 2023
a536df0
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 15, 2023
c12a0de
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 18, 2023
8e1ea0a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 18, 2023
1318cd7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 21, 2023
33b8e52
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 22, 2023
0a205bd
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 25, 2023
df4795a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 29, 2023
abc34f6
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 29, 2023
031e8d3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 18, 2023
3a4bdd9
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 24, 2023
67d871d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 25, 2023
3c1d099
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 30, 2023
ed22cb7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 31, 2023
4c8b282
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 1, 2023
ea609de
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 2, 2023
adcb974
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 2, 2023
77dd93a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 3, 2023
12af139
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 7, 2023
3080de3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 8, 2023
87a1dcc
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 8, 2023
f25d202
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 9, 2023
300d906
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 14, 2023
f28d9f4
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 16, 2023
ab26fa3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 17, 2023
c5c0cb4
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 17, 2023
a1671d7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 20, 2023
a4755d1
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 21, 2023
6ca4ea7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 21, 2023
07cee0a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 22, 2023
f2bb351
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
b064568
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
02606c0
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
6644661
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 27, 2023
93e8fbe
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 6, 2023
5881543
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 7, 2023
a2cdc0e
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 11, 2023
9765f8d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 11, 2023
fc7269a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 12, 2023
5819056
data files now save in persistent data path only and we now have menu…
robGG1997 Dec 12, 2023
db9152b
Auto-duplicate Packages Samples
robGG1997 Dec 12, 2023
68b9832
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 12, 2023
6da9c92
open persistent data path supports more platforms
robGG1997 Dec 12, 2023
bdf1136
Merge branch 'rob/player-data-store-784' of https://github.com/ChainS…
robGG1997 Dec 12, 2023
e1c86a4
Auto-duplicate Packages Samples
robGG1997 Dec 12, 2023
87eb23e
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 12, 2023
0fe7628
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 12, 2023
bba537e
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 13, 2023
9930e97
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 13, 2023
a054de2
merged from main
robGG1997 Dec 13, 2023
feeb435
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 13, 2023
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ private void BuildWalletConnectConfig()
// try and get saved value
SavedSessionTopic = walletConnectConfig?.SavedSessionTopic,
SupportedWallets = supportedWallets,
// save file closer to assets when in editor, more accessible
StoragePath = Application.isEditor ? Application.dataPath : Application.persistentDataPath,
StoragePath = Application.persistentDataPath,
RedirectToWallet = redirectToWallet,
KeepSessionAlive = autoLogin || rememberMeToggle.isOn,
DefaultWallet = defaultWallet,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using ChainSafe.Gaming.WalletConnect;
using Newtonsoft.Json;
#if UNITY_EDITOR
using System.Diagnostics;
using UnityEditor;
#endif
using UnityEngine;
using Debug = UnityEngine.Debug;

/// <summary>
/// Player Data that can be persisted through runtime and sessions in a PlayerData.json file.
Expand All @@ -14,17 +17,7 @@ public class PlayerData
{
#region Save & Load

private string Path
{
get
{
// save closer to assets when in editor
// more accessible
string directory = Application.isEditor ? Application.dataPath : Application.persistentDataPath;

return $"{System.IO.Path.Combine(directory, nameof(PlayerData))}.json";
}
}
private string Path => $"{System.IO.Path.Combine(Application.persistentDataPath, nameof(PlayerData))}.json";

/// <summary>
/// Singleton instance.
Expand Down Expand Up @@ -98,6 +91,8 @@ public static void Clear()
Instance = new PlayerData();

Save();

Debug.Log($"{nameof(PlayerData)} cleared.");
}

#endregion
Expand All @@ -106,4 +101,47 @@ public static void Clear()
/// Saved Wallet Connect Config used for restoring session (Remember Me) Implementation.
/// </summary>
[JsonProperty] public WalletConnectConfig WalletConnectConfig { get; set; }

#if UNITY_EDITOR
[MenuItem("Tools/Player Data/Remove")]
public static void RemovePlayerData()
{
if (File.Exists(Instance.Path))
{
File.Delete(Instance.Path);
}
else
{
Debug.LogError($"{nameof(PlayerData)} not found at {Instance.Path}.");
}

Debug.Log($"{nameof(PlayerData)} Removed.");
}

[MenuItem("Tools/Player Data/Clear")]
public static void ClearPlayerData()
{
Clear();
}

[MenuItem("Tools/Open Persistent Data Path")]
public static void OpenPersistentDataPath()
{
switch (Application.platform)
{
case RuntimePlatform.WindowsEditor:
Process.Start(Application.persistentDataPath);
break;
case RuntimePlatform.LinuxEditor:
Process.Start("xdg-open", Application.persistentDataPath);
break;
case RuntimePlatform.OSXEditor:
Process.Start("open", Application.persistentDataPath);
break;
default:
Debug.LogError($"Can't open on {Application.platform} Platform.");
break;
}
}
#endif
}
7 changes: 0 additions & 7 deletions src/UnitySampleProject/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ crashlytics-build.properties
/Assets/WebGLTemplates
/Assets/WebGLTemplates.meta

# Ignore generated data files
/Assets/PayerData.json
/Assets/PayerData.json.meta

/Assets/walletconnect.json
/Assets/walletconnect.json.meta

# Ignore the project config since it can always be rebuilt
/Assets/Resources.meta
/Assets/Resources/ProjectConfigData.asset
Expand Down
8 changes: 0 additions & 8 deletions src/UnitySampleProject/Assets/Plugins.meta

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ private void BuildWalletConnectConfig()
// try and get saved value
SavedSessionTopic = walletConnectConfig?.SavedSessionTopic,
SupportedWallets = supportedWallets,
// save file closer to assets when in editor, more accessible
StoragePath = Application.isEditor ? Application.dataPath : Application.persistentDataPath,
StoragePath = Application.persistentDataPath,
RedirectToWallet = redirectToWallet,
KeepSessionAlive = autoLogin || rememberMeToggle.isOn,
DefaultWallet = defaultWallet,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using ChainSafe.Gaming.WalletConnect;
using Newtonsoft.Json;
#if UNITY_EDITOR
using System.Diagnostics;
using UnityEditor;
#endif
using UnityEngine;
using Debug = UnityEngine.Debug;

/// <summary>
/// Player Data that can be persisted through runtime and sessions in a PlayerData.json file.
Expand All @@ -14,17 +17,7 @@ public class PlayerData
{
#region Save & Load

private string Path
{
get
{
// save closer to assets when in editor
// more accessible
string directory = Application.isEditor ? Application.dataPath : Application.persistentDataPath;

return $"{System.IO.Path.Combine(directory, nameof(PlayerData))}.json";
}
}
private string Path => $"{System.IO.Path.Combine(Application.persistentDataPath, nameof(PlayerData))}.json";

/// <summary>
/// Singleton instance.
Expand Down Expand Up @@ -98,6 +91,8 @@ public static void Clear()
Instance = new PlayerData();

Save();

Debug.Log($"{nameof(PlayerData)} cleared.");
}

#endregion
Expand All @@ -106,4 +101,47 @@ public static void Clear()
/// Saved Wallet Connect Config used for restoring session (Remember Me) Implementation.
/// </summary>
[JsonProperty] public WalletConnectConfig WalletConnectConfig { get; set; }

#if UNITY_EDITOR
[MenuItem("Tools/Player Data/Remove")]
public static void RemovePlayerData()
{
if (File.Exists(Instance.Path))
{
File.Delete(Instance.Path);
}
else
{
Debug.LogError($"{nameof(PlayerData)} not found at {Instance.Path}.");
}

Debug.Log($"{nameof(PlayerData)} Removed.");
}

[MenuItem("Tools/Player Data/Clear")]
public static void ClearPlayerData()
{
Clear();
}

[MenuItem("Tools/Open Persistent Data Path")]
public static void OpenPersistentDataPath()
{
switch (Application.platform)
{
case RuntimePlatform.WindowsEditor:
Process.Start(Application.persistentDataPath);
break;
case RuntimePlatform.LinuxEditor:
Process.Start("xdg-open", Application.persistentDataPath);
break;
case RuntimePlatform.OSXEditor:
Process.Start("open", Application.persistentDataPath);
break;
default:
Debug.LogError($"Can't open on {Application.platform} Platform.");
break;
}
}
#endif
}
10 changes: 0 additions & 10 deletions src/UnitySampleProject/ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Samples/web3.unity SDK Web3Auth/2.5.2/Web3.Unity Web3Auth Samples/Scenes/SampleLogin
- Web3Auth.Unity
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Samples/web3.unity SDK/2.5.4/Web3.Unity Samples/Scenes/SampleLogin.Unity
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Samples/web3.unity SDK/2.5.4/Web3.Unity Samples/Scenes/SampleMain.Unity
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Samples/web3.unity SDK Web3Auth/2.5.1/Web3.Unity Web3Auth Samples/Scenes/SampleLogin
- Web3Auth.unity
Expand Down