Skip to content

Commit

Permalink
New version 0.19 Alfa
Browse files Browse the repository at this point in the history
- Update Algorand .NET SDK to 0.2.0.9
- Add Template to start
- Fix some minor issue
  • Loading branch information
Vytek committed Oct 4, 2021
1 parent 75aad68 commit 95fe956
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 74 deletions.
Binary file modified Assets/AlgorandUnitySDK/Plugins/Algorand.dll
Binary file not shown.
67 changes: 1 addition & 66 deletions Assets/AlgorandUnitySDK/Scenes/SampleASASceneAlgorand.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 811781093}
m_IndirectSpecularColor: {r: 0.028840085, g: 0.041848656, b: 0.06760585, a: 1}
m_IndirectSpecularColor: {r: 0.02884026, g: 0.04184885, b: 0.067606226, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -121,71 +121,6 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &74774792
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 101706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_Name
value: ScreenLoggerPrefab
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_RootOrder
value: 18
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: Width
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 11401706, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
propertyPath: StackTraceMessages
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e0aeafd6ca709b5449035c42f4e3879e, type: 3}
--- !u!1 &175613659
GameObject:
m_ObjectHideFlags: 0
Expand Down
45 changes: 45 additions & 0 deletions Assets/AlgorandUnitySDK/Scenes/SampleTemplateSceneAlgorand.unity
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,51 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &801990234
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 801990236}
- component: {fileID: 801990235}
m_Layer: 0
m_Name: StartGameTemplate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &801990235
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 801990234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d000c242dbcc6174ab23493b58c95d6e, type: 3}
m_Name:
m_EditorClassIdentifier:
NewAccount:
NewAddress:
--- !u!4 &801990236
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 801990234}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1141891555
GameObject:
m_ObjectHideFlags: 0
Expand Down
Empty file modified Assets/AlgorandUnitySDK/Scenes/Scripts/StartGameCryptoStore.cs
100644 → 100755
Empty file.
Empty file.
66 changes: 66 additions & 0 deletions Assets/AlgorandUnitySDK/Scenes/Scripts/TemplateSDKAlgorand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using UnityEngine;

public class TemplateSDKAlgorand : MonoBehaviour
{
[TextArea]
public string NewAccount = string.Empty;
public string NewAddress = string.Empty;
//Internal Password
private const string _InternalPassword = "0sIhlNRkMfDH8J9cC0Ky";

// Start is called before the first frame update
void Start()
{
//Check if encrypted Playprefs is loaded
if (!PlayerPrefs.HasKey("AlgorandAccountSDK"))
{
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";
//Load Algorand Account from encrypted PlayerPrefs
AlgorandManager.Instance.LoadAccountFromPassphrase(TestPassPhrase);
NewAddress = AlgorandManager.Instance.GetAddressAccount();
//Show Algorand Account Address
Debug.Log(NewAddress);
//Get Mnemonic Algorand Account Passphrase
Debug.Log(AlgorandManager.Instance.GetMnemonicPassphrase());
NewAccount = AlgorandManager.Instance.GetMnemonicPassphrase();
//Get Algorand Account Address from AlgorandManager Instances
Debug.Log(AlgorandManager.Instance.GetAddressAccount());
//Verify Algorand Account Address passed
Debug.Log("Valid Algorand Address: " + AlgorandManager.Instance.AddressIsValid(NewAddress));
//Show URL ENDPOINT ALGOD
Debug.Log("URL ENDPOINT: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT);
//Show URL ENDPOINT INDEXER
Debug.Log("URL ENPOINT INDEXER: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT_INDEXER);
//Show Token Used
Debug.Log("Token Used: " + AlgorandManager.Instance.ALGOD_TOKEN);
//SaveData
AlgorandManager.Instance.SaveAccountInPlayerPrefs(NewAccount);
}
else
{
//Delete all PlayPrefs
AlgorandManager.Instance.DeleteAccountFromPlayerPrefs();
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";
//Load Algorand Account from encrypted PlayerPrefs
AlgorandManager.Instance.LoadAccountFromPassphrase(TestPassPhrase);
NewAddress = AlgorandManager.Instance.GetAddressAccount();
//Show Algorand Account Address
Debug.Log(NewAddress);
//Get Mnemonic Algorand Account Passphrase
Debug.Log(AlgorandManager.Instance.GetMnemonicPassphrase());
NewAccount = AlgorandManager.Instance.GetMnemonicPassphrase();
//Get Algorand Account Address from AlgorandManager Instances
Debug.Log(AlgorandManager.Instance.GetAddressAccount());
//Verify Algorand Account Address passed
Debug.Log("Valid Algorand Address: " + AlgorandManager.Instance.AddressIsValid(NewAddress));
//Show URL ENDPOINT ALGOD
Debug.Log("URL ENDPOINT: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT);
//Show URL ENDPOINT INDEXER
Debug.Log("URL ENPOINT INDEXER: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT_INDEXER);
//Show Token Used
Debug.Log("Token Used: " + AlgorandManager.Instance.ALGOD_TOKEN);
//SaveData
AlgorandManager.Instance.SaveAccountInPlayerPrefs(NewAccount);
}
}
}
11 changes: 11 additions & 0 deletions Assets/AlgorandUnitySDK/Scenes/Scripts/TemplateSDKAlgorand.cs.meta

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

Empty file modified Assets/AlgorandUnitySDK/Scripts/AESGCM.cs
100644 → 100755
Empty file.
Empty file modified Assets/AlgorandUnitySDK/Scripts/AESGCM.cs.meta
100644 → 100755
Empty file.
6 changes: 5 additions & 1 deletion Assets/AlgorandUnitySDK/Scripts/AlgorandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class AlgorandManager : Singleton<AlgorandManager>
[Header("Player Configuration:")]
[SerializeField]
protected string m_PlayerName;
protected string _Version = "0.18 Alfa";
protected string _Version = "0.19 Alfa";
protected Account _AMAccount = null;
private const string _InternalPassword = "0sIhlNRkMfDH8J9cC0Ky";

Expand Down Expand Up @@ -350,6 +350,10 @@ public string LoadAccountFromPlayerPrefs()
{
if (_AMAccount == null)
{
//Debug
//Debug.Log("Start debug decrypt...");
//string TestDecrypt = RijndaelEncryption.Decrypt(PlayerPrefs.GetString("AlgorandAccountSDK"), SystemInfo.deviceUniqueIdentifier + _InternalPassword);
//Debug.LogWarning(TestDecrypt);
_AMAccount = new Account(RijndaelEncryption.Decrypt(PlayerPrefs.GetString("AlgorandAccountSDK"), SystemInfo.deviceUniqueIdentifier + _InternalPassword));
return _AMAccount.Address.ToString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Material:
m_Offset: {x: 0, y: 0}
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _FaceDilate: 0
- _GradientScale: 10
- _MaskSoftnessX: 0
Expand Down Expand Up @@ -74,15 +73,14 @@ MonoBehaviour:
m_EditorClassIdentifier:
hashCode: 231247347
material: {fileID: 2180264}
materialHashCode: 198912371
materialHashCode: -1183942120
m_Version: 1.1.0
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
type: 3}
m_SourceFontFile: {fileID: 0}
m_AtlasPopulationMode: 0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
Expand Down Expand Up @@ -4607,8 +4605,6 @@ MonoBehaviour:
m_AtlasTextures:
- {fileID: 28684132378477856}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 0
m_ClearDynamicDataOnBuild: 0
m_UsedGlyphRects:
- m_X: 0
m_Y: 0
Expand Down Expand Up @@ -7802,8 +7798,6 @@ Texture2D:
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 0
m_IgnoreMasterTextureLimit: 0
m_IsPreProcessed: 0
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: -92
m_AlphaIsTransparency: 0
Expand Down

0 comments on commit 95fe956

Please sign in to comment.