Skip to content

Commit 95fe956

Browse files
committed
New version 0.19 Alfa
- Update Algorand .NET SDK to 0.2.0.9 - Add Template to start - Fix some minor issue
1 parent 75aad68 commit 95fe956

File tree

11 files changed

+129
-74
lines changed

11 files changed

+129
-74
lines changed
17 KB
Binary file not shown.

Assets/AlgorandUnitySDK/Scenes/SampleASASceneAlgorand.unity

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RenderSettings:
3838
m_ReflectionIntensity: 1
3939
m_CustomReflection: {fileID: 0}
4040
m_Sun: {fileID: 811781093}
41-
m_IndirectSpecularColor: {r: 0.028840085, g: 0.041848656, b: 0.06760585, a: 1}
41+
m_IndirectSpecularColor: {r: 0.02884026, g: 0.04184885, b: 0.067606226, a: 1}
4242
m_UseRadianceAmbientProbe: 0
4343
--- !u!157 &3
4444
LightmapSettings:
@@ -121,71 +121,6 @@ NavMeshSettings:
121121
debug:
122122
m_Flags: 0
123123
m_NavMeshData: {fileID: 0}
124-
--- !u!1001 &74774792
125-
PrefabInstance:
126-
m_ObjectHideFlags: 0
127-
serializedVersion: 2
128-
m_Modification:
129-
m_TransformParent: {fileID: 0}
130-
m_Modifications:
131-
- target: {fileID: 101706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
132-
propertyPath: m_Name
133-
value: ScreenLoggerPrefab
134-
objectReference: {fileID: 0}
135-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
136-
propertyPath: m_RootOrder
137-
value: 18
138-
objectReference: {fileID: 0}
139-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
140-
propertyPath: m_LocalPosition.x
141-
value: 0
142-
objectReference: {fileID: 0}
143-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
144-
propertyPath: m_LocalPosition.y
145-
value: 0
146-
objectReference: {fileID: 0}
147-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
148-
propertyPath: m_LocalPosition.z
149-
value: 0
150-
objectReference: {fileID: 0}
151-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
152-
propertyPath: m_LocalRotation.w
153-
value: 1
154-
objectReference: {fileID: 0}
155-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
156-
propertyPath: m_LocalRotation.x
157-
value: 0
158-
objectReference: {fileID: 0}
159-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
160-
propertyPath: m_LocalRotation.y
161-
value: 0
162-
objectReference: {fileID: 0}
163-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
164-
propertyPath: m_LocalRotation.z
165-
value: 0
166-
objectReference: {fileID: 0}
167-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
168-
propertyPath: m_LocalEulerAnglesHint.x
169-
value: 0
170-
objectReference: {fileID: 0}
171-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
172-
propertyPath: m_LocalEulerAnglesHint.y
173-
value: 0
174-
objectReference: {fileID: 0}
175-
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
176-
propertyPath: m_LocalEulerAnglesHint.z
177-
value: 0
178-
objectReference: {fileID: 0}
179-
- target: {fileID: 11401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
180-
propertyPath: Width
181-
value: 0.6
182-
objectReference: {fileID: 0}
183-
- target: {fileID: 11401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
184-
propertyPath: StackTraceMessages
185-
value: 0
186-
objectReference: {fileID: 0}
187-
m_RemovedComponents: []
188-
m_SourcePrefab: {fileID: 100100000, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
189124
--- !u!1 &175613659
190125
GameObject:
191126
m_ObjectHideFlags: 0

Assets/AlgorandUnitySDK/Scenes/SampleTemplateSceneAlgorand.unity

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,51 @@ Transform:
260260
m_Father: {fileID: 0}
261261
m_RootOrder: 2
262262
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
263+
--- !u!1 &801990234
264+
GameObject:
265+
m_ObjectHideFlags: 0
266+
m_CorrespondingSourceObject: {fileID: 0}
267+
m_PrefabInstance: {fileID: 0}
268+
m_PrefabAsset: {fileID: 0}
269+
serializedVersion: 6
270+
m_Component:
271+
- component: {fileID: 801990236}
272+
- component: {fileID: 801990235}
273+
m_Layer: 0
274+
m_Name: StartGameTemplate
275+
m_TagString: Untagged
276+
m_Icon: {fileID: 0}
277+
m_NavMeshLayer: 0
278+
m_StaticEditorFlags: 0
279+
m_IsActive: 1
280+
--- !u!114 &801990235
281+
MonoBehaviour:
282+
m_ObjectHideFlags: 0
283+
m_CorrespondingSourceObject: {fileID: 0}
284+
m_PrefabInstance: {fileID: 0}
285+
m_PrefabAsset: {fileID: 0}
286+
m_GameObject: {fileID: 801990234}
287+
m_Enabled: 1
288+
m_EditorHideFlags: 0
289+
m_Script: {fileID: 11500000, guid: d000c242dbcc6174ab23493b58c95d6e, type: 3}
290+
m_Name:
291+
m_EditorClassIdentifier:
292+
NewAccount:
293+
NewAddress:
294+
--- !u!4 &801990236
295+
Transform:
296+
m_ObjectHideFlags: 0
297+
m_CorrespondingSourceObject: {fileID: 0}
298+
m_PrefabInstance: {fileID: 0}
299+
m_PrefabAsset: {fileID: 0}
300+
m_GameObject: {fileID: 801990234}
301+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
302+
m_LocalPosition: {x: 0, y: 0, z: 0}
303+
m_LocalScale: {x: 1, y: 1, z: 1}
304+
m_Children: []
305+
m_Father: {fileID: 0}
306+
m_RootOrder: 4
307+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
263308
--- !u!1 &1141891555
264309
GameObject:
265310
m_ObjectHideFlags: 0

Assets/AlgorandUnitySDK/Scenes/Scripts/StartGameCryptoStore.cs

100644100755
File mode changed.

Assets/AlgorandUnitySDK/Scenes/Scripts/StartGameCryptoStore.cs.meta

100644100755
File mode changed.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
using UnityEngine;
2+
3+
public class TemplateSDKAlgorand : MonoBehaviour
4+
{
5+
[TextArea]
6+
public string NewAccount = string.Empty;
7+
public string NewAddress = string.Empty;
8+
//Internal Password
9+
private const string _InternalPassword = "0sIhlNRkMfDH8J9cC0Ky";
10+
11+
// Start is called before the first frame update
12+
void Start()
13+
{
14+
//Check if encrypted Playprefs is loaded
15+
if (!PlayerPrefs.HasKey("AlgorandAccountSDK"))
16+
{
17+
string TestPassPhrase = "course claim donor embark section tribe latin quiz few version solid pizza thought snake often mandate brand act useful reopen speak palace disorder ability amount";
18+
//Load Algorand Account from encrypted PlayerPrefs
19+
AlgorandManager.Instance.LoadAccountFromPassphrase(TestPassPhrase);
20+
NewAddress = AlgorandManager.Instance.GetAddressAccount();
21+
//Show Algorand Account Address
22+
Debug.Log(NewAddress);
23+
//Get Mnemonic Algorand Account Passphrase
24+
Debug.Log(AlgorandManager.Instance.GetMnemonicPassphrase());
25+
NewAccount = AlgorandManager.Instance.GetMnemonicPassphrase();
26+
//Get Algorand Account Address from AlgorandManager Instances
27+
Debug.Log(AlgorandManager.Instance.GetAddressAccount());
28+
//Verify Algorand Account Address passed
29+
Debug.Log("Valid Algorand Address: " + AlgorandManager.Instance.AddressIsValid(NewAddress));
30+
//Show URL ENDPOINT ALGOD
31+
Debug.Log("URL ENDPOINT: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT);
32+
//Show URL ENDPOINT INDEXER
33+
Debug.Log("URL ENPOINT INDEXER: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT_INDEXER);
34+
//Show Token Used
35+
Debug.Log("Token Used: " + AlgorandManager.Instance.ALGOD_TOKEN);
36+
//SaveData
37+
AlgorandManager.Instance.SaveAccountInPlayerPrefs(NewAccount);
38+
}
39+
else
40+
{
41+
//Delete all PlayPrefs
42+
AlgorandManager.Instance.DeleteAccountFromPlayerPrefs();
43+
string TestPassPhrase = "course claim donor embark section tribe latin quiz few version solid pizza thought snake often mandate brand act useful reopen speak palace disorder ability amount";
44+
//Load Algorand Account from encrypted PlayerPrefs
45+
AlgorandManager.Instance.LoadAccountFromPassphrase(TestPassPhrase);
46+
NewAddress = AlgorandManager.Instance.GetAddressAccount();
47+
//Show Algorand Account Address
48+
Debug.Log(NewAddress);
49+
//Get Mnemonic Algorand Account Passphrase
50+
Debug.Log(AlgorandManager.Instance.GetMnemonicPassphrase());
51+
NewAccount = AlgorandManager.Instance.GetMnemonicPassphrase();
52+
//Get Algorand Account Address from AlgorandManager Instances
53+
Debug.Log(AlgorandManager.Instance.GetAddressAccount());
54+
//Verify Algorand Account Address passed
55+
Debug.Log("Valid Algorand Address: " + AlgorandManager.Instance.AddressIsValid(NewAddress));
56+
//Show URL ENDPOINT ALGOD
57+
Debug.Log("URL ENDPOINT: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT);
58+
//Show URL ENDPOINT INDEXER
59+
Debug.Log("URL ENPOINT INDEXER: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT_INDEXER);
60+
//Show Token Used
61+
Debug.Log("Token Used: " + AlgorandManager.Instance.ALGOD_TOKEN);
62+
//SaveData
63+
AlgorandManager.Instance.SaveAccountInPlayerPrefs(NewAccount);
64+
}
65+
}
66+
}

Assets/AlgorandUnitySDK/Scenes/Scripts/TemplateSDKAlgorand.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AlgorandUnitySDK/Scripts/AESGCM.cs

100644100755
File mode changed.

Assets/AlgorandUnitySDK/Scripts/AESGCM.cs.meta

100644100755
File mode changed.

Assets/AlgorandUnitySDK/Scripts/AlgorandManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class AlgorandManager : Singleton<AlgorandManager>
4646
[Header("Player Configuration:")]
4747
[SerializeField]
4848
protected string m_PlayerName;
49-
protected string _Version = "0.18 Alfa";
49+
protected string _Version = "0.19 Alfa";
5050
protected Account _AMAccount = null;
5151
private const string _InternalPassword = "0sIhlNRkMfDH8J9cC0Ky";
5252

@@ -350,6 +350,10 @@ public string LoadAccountFromPlayerPrefs()
350350
{
351351
if (_AMAccount == null)
352352
{
353+
//Debug
354+
//Debug.Log("Start debug decrypt...");
355+
//string TestDecrypt = RijndaelEncryption.Decrypt(PlayerPrefs.GetString("AlgorandAccountSDK"), SystemInfo.deviceUniqueIdentifier + _InternalPassword);
356+
//Debug.LogWarning(TestDecrypt);
353357
_AMAccount = new Account(RijndaelEncryption.Decrypt(PlayerPrefs.GetString("AlgorandAccountSDK"), SystemInfo.deviceUniqueIdentifier + _InternalPassword));
354358
return _AMAccount.Address.ToString();
355359
}

0 commit comments

Comments
 (0)