├── .gitignore ├── Assets ├── Animation.meta ├── Animation │ ├── LoadingIndicator.anim │ ├── LoadingIndicator.anim.meta │ ├── LoadingIndicator.controller │ └── LoadingIndicator.controller.meta ├── Images.meta ├── Images │ ├── clipboard.png │ ├── clipboard.png.meta │ ├── qr.png │ └── qr.png.meta ├── Plugins.meta ├── Plugins │ ├── Nethereum.meta │ ├── Nethereum │ │ ├── BouncyCastle.Crypto.dll │ │ ├── BouncyCastle.Crypto.dll.meta │ │ ├── Nethereum.ABI.dll │ │ ├── Nethereum.ABI.dll.meta │ │ ├── Nethereum.Contracts.dll │ │ ├── Nethereum.Contracts.dll.meta │ │ ├── Nethereum.Hex.dll │ │ ├── Nethereum.Hex.dll.meta │ │ ├── Nethereum.JsonRpc.Client.dll │ │ ├── Nethereum.JsonRpc.Client.dll.meta │ │ ├── Nethereum.KeyStore.dll │ │ ├── Nethereum.KeyStore.dll.meta │ │ ├── Nethereum.RLP.dll │ │ ├── Nethereum.RLP.dll.meta │ │ ├── Nethereum.RPC.dll │ │ ├── Nethereum.RPC.dll.meta │ │ ├── Nethereum.Signer.dll │ │ ├── Nethereum.Signer.dll.meta │ │ ├── Nethereum.Unity.dll │ │ ├── Nethereum.Unity.dll.meta │ │ ├── Nethereum.Util.dll │ │ ├── Nethereum.Util.dll.meta │ │ ├── Newtonsoft.Json.dll │ │ ├── Newtonsoft.Json.dll.meta │ │ ├── System.Threading.dll │ │ └── System.Threading.dll.meta │ ├── zxing.meta │ └── zxing │ │ ├── zxing.unity.dll │ │ └── zxing.unity.dll.meta ├── Scenes.meta ├── Scenes │ ├── WalletUI.unity │ └── WalletUI.unity.meta ├── Scripts.meta └── Scripts │ ├── Editor.meta │ ├── Editor │ ├── HelperMenu.cs │ └── HelperMenu.cs.meta │ ├── QRCodeDisplay.cs │ ├── QRCodeDisplay.cs.meta │ ├── QRScanner.cs │ ├── QRScanner.cs.meta │ ├── References.meta │ ├── References │ ├── Account.cs │ ├── Account.cs.meta │ ├── BlockNumber.cs │ ├── BlockNumber.cs.meta │ ├── PingContractService.cs │ ├── PingContractService.cs.meta │ ├── QRGenerator.cs │ ├── QRGenerator.cs.meta │ ├── ScoreContractService.cs │ ├── ScoreContractService.cs.meta │ ├── TopScoreService.cs │ └── TopScoreService.cs.meta │ ├── TokenContractService.cs │ ├── TokenContractService.cs.meta │ ├── UI.meta │ ├── UI │ ├── LogText.cs │ ├── LogText.cs.meta │ ├── PasswordInputField.cs │ └── PasswordInputField.cs.meta │ ├── WalletManager.cs │ └── WalletManager.cs.meta ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md └── Solidity ├── playerscore.sol └── token.sol /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | 7 | # Visual Studio 2015 cache directory 8 | /.vs/ 9 | # Visual Studio Code directory 10 | /.vscode/ 11 | 12 | # Autogenerated VS/MD/Consulo solution and project files 13 | ExportedObj/ 14 | .consulo/ 15 | *.csproj 16 | *.unityproj 17 | *.sln 18 | *.suo 19 | *.tmp 20 | *.user 21 | *.userprefs 22 | *.pidb 23 | *.booproj 24 | *.svd 25 | *.pdb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage 36 | 37 | # OS-specific files 38 | .DS_Store 39 | Thumbs.db* 40 | -------------------------------------------------------------------------------- /Assets/Animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc9730333ed23714cac354648df1eb82 3 | folderAsset: yes 4 | timeCreated: 1510808266 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Animation/LoadingIndicator.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: LoadingIndicator 9 | serializedVersion: 6 10 | m_Legacy: 0 11 | m_Compressed: 0 12 | m_UseHighQualityCurve: 1 13 | m_RotationCurves: [] 14 | m_CompressedRotationCurves: [] 15 | m_EulerCurves: 16 | - curve: 17 | serializedVersion: 2 18 | m_Curve: 19 | - serializedVersion: 2 20 | time: 0 21 | value: {x: 0, y: 0, z: 0} 22 | inSlope: {x: 0, y: 0, z: 0} 23 | outSlope: {x: 0, y: 0, z: 0} 24 | tangentMode: 0 25 | - serializedVersion: 2 26 | time: 0.49166667 27 | value: {x: 0, y: 0, z: -90} 28 | inSlope: {x: 0, y: 0, z: -178.5124} 29 | outSlope: {x: 0, y: 0, z: -178.5124} 30 | tangentMode: 0 31 | - serializedVersion: 2 32 | time: 1.0083333 33 | value: {x: 0, y: 0, z: -180} 34 | inSlope: {x: 0, y: 0, z: -178.5124} 35 | outSlope: {x: 0, y: 0, z: -178.5124} 36 | tangentMode: 0 37 | - serializedVersion: 2 38 | time: 1.5 39 | value: {x: 0, y: 0, z: -270} 40 | inSlope: {x: 0, y: 0, z: -183.05084} 41 | outSlope: {x: 0, y: 0, z: -183.05084} 42 | tangentMode: 0 43 | - serializedVersion: 2 44 | time: 1.9916667 45 | value: {x: 0, y: 0, z: -360} 46 | inSlope: {x: 0, y: 0, z: 0} 47 | outSlope: {x: 0, y: 0, z: 0} 48 | tangentMode: 0 49 | m_PreInfinity: 2 50 | m_PostInfinity: 2 51 | m_RotationOrder: 4 52 | path: 53 | m_PositionCurves: [] 54 | m_ScaleCurves: [] 55 | m_FloatCurves: 56 | - curve: 57 | serializedVersion: 2 58 | m_Curve: 59 | - serializedVersion: 2 60 | time: 0 61 | value: 0 62 | inSlope: 0 63 | outSlope: 0 64 | tangentMode: 136 65 | - serializedVersion: 2 66 | time: 1 67 | value: 1 68 | inSlope: 0 69 | outSlope: 0 70 | tangentMode: 136 71 | - serializedVersion: 2 72 | time: 1.9916667 73 | value: 0 74 | inSlope: 0 75 | outSlope: 0 76 | tangentMode: 136 77 | m_PreInfinity: 2 78 | m_PostInfinity: 2 79 | m_RotationOrder: 4 80 | attribute: m_FillAmount 81 | path: 82 | classID: 114 83 | script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 84 | - curve: 85 | serializedVersion: 2 86 | m_Curve: 87 | - serializedVersion: 2 88 | time: 0 89 | value: 1 90 | inSlope: Infinity 91 | outSlope: Infinity 92 | tangentMode: 103 93 | - serializedVersion: 2 94 | time: 1 95 | value: 0 96 | inSlope: Infinity 97 | outSlope: Infinity 98 | tangentMode: 103 99 | m_PreInfinity: 2 100 | m_PostInfinity: 2 101 | m_RotationOrder: 4 102 | attribute: m_FillClockwise 103 | path: 104 | classID: 114 105 | script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 106 | m_PPtrCurves: [] 107 | m_SampleRate: 120 108 | m_WrapMode: 0 109 | m_Bounds: 110 | m_Center: {x: 0, y: 0, z: 0} 111 | m_Extent: {x: 0, y: 0, z: 0} 112 | m_ClipBindingConstant: 113 | genericBindings: 114 | - serializedVersion: 2 115 | path: 0 116 | attribute: 4 117 | script: {fileID: 0} 118 | typeID: 4 119 | customType: 14 120 | isPPtrCurve: 0 121 | - serializedVersion: 2 122 | path: 0 123 | attribute: 3063383489 124 | script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 125 | typeID: 114 126 | customType: 0 127 | isPPtrCurve: 0 128 | - serializedVersion: 2 129 | path: 0 130 | attribute: 3573148023 131 | script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 132 | typeID: 114 133 | customType: 0 134 | isPPtrCurve: 0 135 | pptrCurveMapping: [] 136 | m_AnimationClipSettings: 137 | serializedVersion: 2 138 | m_AdditiveReferencePoseClip: {fileID: 0} 139 | m_AdditiveReferencePoseTime: 0 140 | m_StartTime: 0 141 | m_StopTime: 1.9916667 142 | m_OrientationOffsetY: 0 143 | m_Level: 0 144 | m_CycleOffset: 0 145 | m_HasAdditiveReferencePose: 0 146 | m_LoopTime: 1 147 | m_LoopBlend: 0 148 | m_LoopBlendOrientation: 0 149 | m_LoopBlendPositionY: 0 150 | m_LoopBlendPositionXZ: 0 151 | m_KeepOriginalOrientation: 0 152 | m_KeepOriginalPositionY: 1 153 | m_KeepOriginalPositionXZ: 0 154 | m_HeightFromFeet: 0 155 | m_Mirror: 0 156 | m_EditorCurves: 157 | - curve: 158 | serializedVersion: 2 159 | m_Curve: 160 | - serializedVersion: 2 161 | time: 0 162 | value: 0 163 | inSlope: 0 164 | outSlope: 0 165 | tangentMode: 136 166 | - serializedVersion: 2 167 | time: 1 168 | value: 1 169 | inSlope: 0 170 | outSlope: 0 171 | tangentMode: 136 172 | - serializedVersion: 2 173 | time: 1.9916667 174 | value: 0 175 | inSlope: 0 176 | outSlope: 0 177 | tangentMode: 136 178 | m_PreInfinity: 2 179 | m_PostInfinity: 2 180 | m_RotationOrder: 4 181 | attribute: m_FillAmount 182 | path: 183 | classID: 114 184 | script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 185 | - curve: 186 | serializedVersion: 2 187 | m_Curve: 188 | - serializedVersion: 2 189 | time: 0 190 | value: 1 191 | inSlope: Infinity 192 | outSlope: Infinity 193 | tangentMode: 103 194 | - serializedVersion: 2 195 | time: 1 196 | value: 0 197 | inSlope: Infinity 198 | outSlope: Infinity 199 | tangentMode: 103 200 | m_PreInfinity: 2 201 | m_PostInfinity: 2 202 | m_RotationOrder: 4 203 | attribute: m_FillClockwise 204 | path: 205 | classID: 114 206 | script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 207 | - curve: 208 | serializedVersion: 2 209 | m_Curve: 210 | - serializedVersion: 2 211 | time: 0 212 | value: 0 213 | inSlope: 0 214 | outSlope: 0 215 | tangentMode: 136 216 | - serializedVersion: 2 217 | time: 0.49166667 218 | value: 0 219 | inSlope: 0 220 | outSlope: 0 221 | tangentMode: 136 222 | - serializedVersion: 2 223 | time: 1.0083333 224 | value: 0 225 | inSlope: 0 226 | outSlope: 0 227 | tangentMode: 136 228 | - serializedVersion: 2 229 | time: 1.5 230 | value: 0 231 | inSlope: 0 232 | outSlope: 0 233 | tangentMode: 136 234 | - serializedVersion: 2 235 | time: 1.9916667 236 | value: 0 237 | inSlope: 0 238 | outSlope: 0 239 | tangentMode: 136 240 | m_PreInfinity: 2 241 | m_PostInfinity: 2 242 | m_RotationOrder: 4 243 | attribute: localEulerAnglesRaw.x 244 | path: 245 | classID: 224 246 | script: {fileID: 0} 247 | - curve: 248 | serializedVersion: 2 249 | m_Curve: 250 | - serializedVersion: 2 251 | time: 0 252 | value: 0 253 | inSlope: 0 254 | outSlope: 0 255 | tangentMode: 136 256 | - serializedVersion: 2 257 | time: 0.49166667 258 | value: 0 259 | inSlope: 0 260 | outSlope: 0 261 | tangentMode: 136 262 | - serializedVersion: 2 263 | time: 1.0083333 264 | value: 0 265 | inSlope: 0 266 | outSlope: 0 267 | tangentMode: 136 268 | - serializedVersion: 2 269 | time: 1.5 270 | value: 0 271 | inSlope: 0 272 | outSlope: 0 273 | tangentMode: 136 274 | - serializedVersion: 2 275 | time: 1.9916667 276 | value: 0 277 | inSlope: 0 278 | outSlope: 0 279 | tangentMode: 136 280 | m_PreInfinity: 2 281 | m_PostInfinity: 2 282 | m_RotationOrder: 4 283 | attribute: localEulerAnglesRaw.y 284 | path: 285 | classID: 224 286 | script: {fileID: 0} 287 | - curve: 288 | serializedVersion: 2 289 | m_Curve: 290 | - serializedVersion: 2 291 | time: 0 292 | value: 0 293 | inSlope: 0 294 | outSlope: 0 295 | tangentMode: 136 296 | - serializedVersion: 2 297 | time: 0.49166667 298 | value: -90 299 | inSlope: -178.5124 300 | outSlope: -178.5124 301 | tangentMode: 136 302 | - serializedVersion: 2 303 | time: 1.0083333 304 | value: -180 305 | inSlope: -178.5124 306 | outSlope: -178.5124 307 | tangentMode: 136 308 | - serializedVersion: 2 309 | time: 1.5 310 | value: -270 311 | inSlope: -183.05084 312 | outSlope: -183.05084 313 | tangentMode: 136 314 | - serializedVersion: 2 315 | time: 1.9916667 316 | value: -360 317 | inSlope: 0 318 | outSlope: 0 319 | tangentMode: 136 320 | m_PreInfinity: 2 321 | m_PostInfinity: 2 322 | m_RotationOrder: 4 323 | attribute: localEulerAnglesRaw.z 324 | path: 325 | classID: 224 326 | script: {fileID: 0} 327 | m_EulerEditorCurves: 328 | - curve: 329 | serializedVersion: 2 330 | m_Curve: [] 331 | m_PreInfinity: 2 332 | m_PostInfinity: 2 333 | m_RotationOrder: 4 334 | attribute: m_LocalEulerAngles.x 335 | path: 336 | classID: 224 337 | script: {fileID: 0} 338 | - curve: 339 | serializedVersion: 2 340 | m_Curve: [] 341 | m_PreInfinity: 2 342 | m_PostInfinity: 2 343 | m_RotationOrder: 4 344 | attribute: m_LocalEulerAngles.y 345 | path: 346 | classID: 224 347 | script: {fileID: 0} 348 | - curve: 349 | serializedVersion: 2 350 | m_Curve: [] 351 | m_PreInfinity: 2 352 | m_PostInfinity: 2 353 | m_RotationOrder: 4 354 | attribute: m_LocalEulerAngles.z 355 | path: 356 | classID: 224 357 | script: {fileID: 0} 358 | m_HasGenericRootTransform: 1 359 | m_HasMotionFloatCurves: 0 360 | m_GenerateMotionCurves: 0 361 | m_Events: [] 362 | -------------------------------------------------------------------------------- /Assets/Animation/LoadingIndicator.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4791acfb271815c4f87d1bcd6a2302ec 3 | timeCreated: 1510808267 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 7400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Animation/LoadingIndicator.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: LoadingIndicator 9 | serializedVersion: 5 10 | m_AnimatorParameters: [] 11 | m_AnimatorLayers: 12 | - serializedVersion: 5 13 | m_Name: Base Layer 14 | m_StateMachine: {fileID: 1107419523384151520} 15 | m_Mask: {fileID: 0} 16 | m_Motions: [] 17 | m_Behaviours: [] 18 | m_BlendingMode: 0 19 | m_SyncedLayerIndex: -1 20 | m_DefaultWeight: 0 21 | m_IKPass: 0 22 | m_SyncedLayerAffectsTiming: 0 23 | m_Controller: {fileID: 9100000} 24 | --- !u!1102 &1102468644722801498 25 | AnimatorState: 26 | serializedVersion: 5 27 | m_ObjectHideFlags: 1 28 | m_PrefabParentObject: {fileID: 0} 29 | m_PrefabInternal: {fileID: 0} 30 | m_Name: LoadingIndicator 31 | m_Speed: 1 32 | m_CycleOffset: 0 33 | m_Transitions: [] 34 | m_StateMachineBehaviours: [] 35 | m_Position: {x: 50, y: 50, z: 0} 36 | m_IKOnFeet: 0 37 | m_WriteDefaultValues: 1 38 | m_Mirror: 0 39 | m_SpeedParameterActive: 0 40 | m_MirrorParameterActive: 0 41 | m_CycleOffsetParameterActive: 0 42 | m_Motion: {fileID: 7400000, guid: 4791acfb271815c4f87d1bcd6a2302ec, type: 2} 43 | m_Tag: 44 | m_SpeedParameter: 45 | m_MirrorParameter: 46 | m_CycleOffsetParameter: 47 | --- !u!1107 &1107419523384151520 48 | AnimatorStateMachine: 49 | serializedVersion: 5 50 | m_ObjectHideFlags: 1 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 0} 53 | m_Name: Base Layer 54 | m_ChildStates: 55 | - serializedVersion: 1 56 | m_State: {fileID: 1102468644722801498} 57 | m_Position: {x: 200, y: 0, z: 0} 58 | m_ChildStateMachines: [] 59 | m_AnyStateTransitions: [] 60 | m_EntryTransitions: [] 61 | m_StateMachineTransitions: {} 62 | m_StateMachineBehaviours: [] 63 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 64 | m_EntryPosition: {x: 50, y: 120, z: 0} 65 | m_ExitPosition: {x: 800, y: 120, z: 0} 66 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 67 | m_DefaultState: {fileID: 1102468644722801498} 68 | -------------------------------------------------------------------------------- /Assets/Animation/LoadingIndicator.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2b7b6838351c07438e7f50144e17d8b 3 | timeCreated: 1510808267 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 9100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3287759d8dbe4f1418b7c0af344984c3 3 | folderAsset: yes 4 | timeCreated: 1510985965 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Images/clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Images/clipboard.png -------------------------------------------------------------------------------- /Assets/Images/clipboard.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0dd8690152c87df43a8ffeb7e216ef71 3 | timeCreated: 1510985967 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 64 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 64 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 64 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | spriteSheet: 83 | serializedVersion: 2 84 | sprites: [] 85 | outline: [] 86 | physicsShape: [] 87 | spritePackingTag: 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Assets/Images/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Images/qr.png -------------------------------------------------------------------------------- /Assets/Images/qr.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81c2bfd0f8e9d934283dad03a2bb905e 3 | timeCreated: 1510985975 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: 1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 1 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 256 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 256 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | - buildTarget: Android 75 | maxTextureSize: 256 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | spriteSheet: 83 | serializedVersion: 2 84 | sprites: [] 85 | outline: [] 86 | physicsShape: [] 87 | spritePackingTag: 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7a29793fa28595408792ac0e8c3971a 3 | folderAsset: yes 4 | timeCreated: 1510160816 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3036c4faa478d1744bfb7a19e1f9c4de 3 | folderAsset: yes 4 | timeCreated: 1510160816 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/BouncyCastle.Crypto.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/BouncyCastle.Crypto.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/BouncyCastle.Crypto.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d719885b4b1a8b4892664eb92a38aa7 3 | timeCreated: 1510135943 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.ABI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.ABI.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.ABI.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b845f4f307fa97468de2496b67657a6 3 | timeCreated: 1510135938 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Contracts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.Contracts.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Contracts.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89b3f26b7b523f647804625273b9eaf3 3 | timeCreated: 1510135940 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Hex.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.Hex.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Hex.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83dc0856f220c5d46be08ed98644725f 3 | timeCreated: 1510135940 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.JsonRpc.Client.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.JsonRpc.Client.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.JsonRpc.Client.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 268b8bb8f740f6c44bee3518191efb87 3 | timeCreated: 1510135937 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.KeyStore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.KeyStore.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.KeyStore.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69339ce36781c98498c4884d5751d0a8 3 | timeCreated: 1510135939 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.RLP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.RLP.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.RLP.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dda6b48b3f3ccc43a9e119bd7f850c9 3 | timeCreated: 1510135939 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.RPC.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.RPC.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.RPC.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8f3dfa893a4dac4a961897ba0466583 3 | timeCreated: 1510135944 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Signer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.Signer.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Signer.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 138a68afef5bbc740b140a8041137f16 3 | timeCreated: 1510135937 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.Unity.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Unity.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9646be5b2590a834ab9cef58c129e158 3 | timeCreated: 1510135942 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Util.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Nethereum.Util.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Nethereum.Util.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b68ee63f6e3323245b1bfa294ecb7c7a 3 | timeCreated: 1510135944 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/Newtonsoft.Json.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42ce00dd201d29f4ebf0d0b6825f3225 3 | timeCreated: 1510135938 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/System.Threading.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/Nethereum/System.Threading.dll -------------------------------------------------------------------------------- /Assets/Plugins/Nethereum/System.Threading.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ac20e7e4cfed3244add8ada65b57651 3 | timeCreated: 1510135943 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/zxing.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6791006701e966c47b88d0678d3189e5 3 | folderAsset: yes 4 | timeCreated: 1510160816 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/zxing/zxing.unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alto-io/unity3d-blockchain-wallet/03d18ea2ba607b35080f157e9d1bf6eba3f1cd9b/Assets/Plugins/zxing/zxing.unity.dll -------------------------------------------------------------------------------- /Assets/Plugins/zxing/zxing.unity.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d50492bd62b856041b02280417e0093b 3 | timeCreated: 1510160830 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fb9191791f0ff44eb73b149ef93affc 3 | folderAsset: yes 4 | timeCreated: 1510207752 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/WalletUI.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10fa4fb9c916e1049b914751bd7d568d 3 | timeCreated: 1510207743 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ec316f5c461f3d429c1a235a9004786 3 | folderAsset: yes 4 | timeCreated: 1510160816 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5772086cecbfa31478bb968ac8d67540 3 | folderAsset: yes 4 | timeCreated: 1510305648 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/HelperMenu.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using System.IO; 4 | using System.Collections.Generic; 5 | 6 | public class HelperMenu : MonoBehaviour 7 | { 8 | [MenuItem("blockchain-wallet/Delete Wallet Data")] 9 | static void DeleteWalletData() 10 | { 11 | List saveLocations = new List 12 | { 13 | "walletcache.data" 14 | }; 15 | 16 | if (EditorUtility.DisplayDialog("Delete Wallet Data?", "Are you sure? This cannot be reverted.", "Yes", "Cancel")) 17 | { 18 | foreach (string filename in saveLocations) 19 | { 20 | string s = Application.persistentDataPath + "/" + filename; 21 | if (File.Exists(s)) 22 | { 23 | File.Delete(s); 24 | Debug.Log(s + " deleted"); 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Assets/Scripts/Editor/HelperMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 605a7f3e2619c24449fcb37e5bbc8892 3 | timeCreated: 1510305665 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/QRCodeDisplay.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using ZXing; 4 | using ZXing.QrCode; 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | 8 | public class QRCodeDisplay : MonoBehaviour { 9 | 10 | public RawImage QRImage; 11 | public GameObject loadingIndicator; 12 | 13 | public void RenderQRCode(string address) 14 | { 15 | QRImage.texture = generateQR(address); 16 | } 17 | 18 | public Texture2D generateQR(string text) 19 | { 20 | var encoded = new Texture2D(256, 256); 21 | var color32 = Encode(text, encoded.width, encoded.height); 22 | encoded.SetPixels32(color32); 23 | encoded.Apply(); 24 | return encoded; 25 | } 26 | 27 | private static Color32[] Encode(string textForEncoding, 28 | int width, int height) 29 | { 30 | var writer = new BarcodeWriter 31 | { 32 | Format = BarcodeFormat.QR_CODE, 33 | Options = new QrCodeEncodingOptions 34 | { 35 | Height = height, 36 | Width = width 37 | } 38 | }; 39 | return writer.Write(textForEncoding); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Scripts/QRCodeDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfd7475a4bace764e99c6fce50734490 3 | timeCreated: 1510991231 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/QRScanner.cs: -------------------------------------------------------------------------------- 1 | using ZXing; 2 | using ZXing.QrCode; 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEngine; 7 | using UnityEngine.UI; 8 | 9 | public class QRScanner : MonoBehaviour { 10 | 11 | private WebCamTexture camTexture; 12 | private Rect screenRect; 13 | public InputField addressToField; 14 | 15 | // Use this for initialization 16 | void Start () { 17 | screenRect = new Rect(0, 0, Screen.width, Screen.height); 18 | camTexture = new WebCamTexture(); 19 | camTexture.requestedHeight = Screen.height; 20 | camTexture.requestedWidth = Screen.width; 21 | if (camTexture != null) 22 | { 23 | camTexture.Play(); 24 | } 25 | 26 | } 27 | 28 | // TODO: Optimize, also has an assertion failure 29 | void OnGUI() 30 | { 31 | // drawing the camera on screen 32 | GUI.DrawTexture(screenRect, camTexture, ScaleMode.ScaleToFit); 33 | // do the reading — you might want to attempt to read less often than you draw on the screen for performance sake 34 | try 35 | { 36 | IBarcodeReader barcodeReader = new BarcodeReader(); 37 | // decode the current frame 38 | var result = barcodeReader.Decode(camTexture.GetPixels32(), 39 | camTexture.width, camTexture.height); 40 | if (result != null) 41 | { 42 | addressToField.text = result.Text; 43 | WalletManager.Instance.ToggleQRScannerDisplay(true); 44 | } 45 | } 46 | catch (Exception ex) { Debug.LogWarning(ex.Message); } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Scripts/QRScanner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22838ec4dbf2c714396a743cf76194f3 3 | timeCreated: 1510994468 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/References.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dc995e9d23f08f4db5777221e232463 3 | folderAsset: yes 4 | timeCreated: 1510751970 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/References/Account.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | using Nethereum.JsonRpc.UnityClient; 5 | using Nethereum.Hex.HexTypes; 6 | using System; 7 | 8 | public class Account : MonoBehaviour 9 | { 10 | 11 | // Here we define accountAddress (the public key; We are going to extract it later from the private key) 12 | private string accountAddress; 13 | // This is the secret key of the address, you should put it yours. 14 | private string accountPrivateKey = "0xe11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e11e"; 15 | // This is the testnet we are going to use for our contract, in this case kovan 16 | private string _url = "https://kovan.infura.io"; 17 | 18 | // We define a new PingContractService (this is the file we are going to create for our contract) 19 | private PingContractService pingContractService = new PingContractService(); 20 | 21 | // Use this for initialization 22 | void Start() 23 | { 24 | // First we'll call this function which will extract and assign the public key from the accountPrivateKey defined above. 25 | importAccountFromPrivateKey(); 26 | 27 | // Then we call getPings to display how many pings we did to the PingFunction. 28 | // This will only read from the blockchain thus consuming 0 gas. (it's free!) 29 | StartCoroutine(getPings()); 30 | 31 | // After this we call the PingTransaction function to actually interact with the contract. 32 | // This function will create a new transaction to our contract, consuming gas to pay for it's computational costs. 33 | StartCoroutine(PingTransaction()); 34 | 35 | StartCoroutine(getAccountBalance(accountAddress, (balance) => { 36 | Debug.Log("Account balance: " + balance); 37 | })); 38 | 39 | // Disables new account creation to speed up and simplify the demo. 40 | // Feel free to remove the if or just change false to true to create a new account. 41 | // Code Comments for account creation and balance checks are available here: 42 | // https://gist.github.com/e11io/88f0ae5831f3aa31651f735278b5b463 43 | var createNewAccount = false; 44 | if (createNewAccount == true) 45 | { 46 | CreateAccount("strong_password", (address, encryptedJson) => { 47 | Debug.Log(address); 48 | Debug.Log(encryptedJson); 49 | StartCoroutine(getAccountBalance(address, (balance) => { 50 | Debug.Log(balance); // This will always give you 0, except if you are imposibly lucky. 51 | })); 52 | }); 53 | } 54 | 55 | } 56 | 57 | public IEnumerator getPings() 58 | { 59 | // We create a new pingsRequest as a new Eth Call Unity Request 60 | var pingsRequest = new EthCallUnityRequest(_url); 61 | 62 | var pingsCallInput = pingContractService.CreatePingsCallInput(); 63 | Debug.Log("Getting pings..."); 64 | // Then we send the request with the pingsCallInput and the most recent block mined to check. 65 | // And we wait for the response... 66 | yield return pingsRequest.SendRequest(pingsCallInput, Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest()); 67 | 68 | if (pingsRequest.Exception == null) 69 | { 70 | // If we don't have exceptions we just display the raw result and the 71 | // result decode it with our function (decodePings) from the service, congrats! 72 | Debug.Log("Pings (HEX): " + pingsRequest.Result); 73 | Debug.Log("Pings (INT):" + pingContractService.DecodePings(pingsRequest.Result)); 74 | } 75 | else 76 | { 77 | // if we had an error in the UnityRequest we just display the Exception error 78 | Debug.Log("Error submitting getPings tx: " + pingsRequest.Exception.Message); 79 | } 80 | } 81 | 82 | public IEnumerator PingTransaction() 83 | { 84 | // Create the transaction input with encoded values for the function 85 | // We will need, the public key (accountAddress), the private key (accountPrivateKey), 86 | // the pingValue we are going to send to our contract (10000), 87 | // the gas amount (50000 in this case), 88 | // the gas price (25), (you can send a gas price of null to get the default value) 89 | // and the ammount of ethers you want to transfer, this contract doesn't receive ethereum transfers, 90 | // so we set it to 0, you can modify it and see how it fails. 91 | var transactionInput = pingContractService.CreatePingTransactionInput( 92 | accountAddress, 93 | accountPrivateKey, 94 | new HexBigInteger(10000), 95 | new HexBigInteger(50000), 96 | new HexBigInteger(25), 97 | new HexBigInteger(0) 98 | ); 99 | 100 | // Here we create a new signed transaction Unity Request with the url, private key, and the user address we get before 101 | // (this will sign the transaction automatically :D ) 102 | var transactionSignedRequest = new TransactionSignedUnityRequest(_url, accountPrivateKey, accountAddress); 103 | 104 | // Then we send it and wait 105 | Debug.Log("Sending Ping transaction..."); 106 | yield return transactionSignedRequest.SignAndSendTransaction(transactionInput); 107 | if (transactionSignedRequest.Exception == null) 108 | { 109 | // If we don't have exceptions we just display the result, congrats! 110 | Debug.Log("Ping tx submitted: " + transactionSignedRequest.Result); 111 | } 112 | else 113 | { 114 | // if we had an error in the UnityRequest we just display the Exception error 115 | Debug.Log("Error submitting Ping tx: " + transactionSignedRequest.Exception.Message); 116 | } 117 | } 118 | 119 | 120 | public void importAccountFromPrivateKey() 121 | { 122 | // Here we try to get the public address from the secretKey we defined 123 | try 124 | { 125 | var address = Nethereum.Signer.EthECKey.GetPublicAddress(accountPrivateKey); 126 | // Then we define the accountAdress private variable with the public key 127 | accountAddress = address; 128 | } 129 | catch (Exception e) 130 | { 131 | // If we catch some error when getting the public address we just display the exception in the console 132 | Debug.Log("Error importing account from PrivateKey: " + e); 133 | } 134 | } 135 | 136 | 137 | 138 | // Code Comments for account creation and balance checks are available here: 139 | // https://gist.github.com/e11io/88f0ae5831f3aa31651f735278b5b463 140 | public void CreateAccount(string password, System.Action callback) 141 | { 142 | var ecKey = Nethereum.Signer.EthECKey.GenerateKey(); 143 | var address = ecKey.GetPublicAddress(); 144 | var privateKey = ecKey.GetPrivateKeyAsBytes(); 145 | 146 | var addr = Nethereum.Signer.EthECKey.GetPublicAddress(privateKey.ToString()); 147 | var keystoreservice = new Nethereum.KeyStore.KeyStoreService(); 148 | var encryptedJson = keystoreservice.EncryptAndGenerateDefaultKeyStoreAsJson(password, privateKey, address); 149 | 150 | callback(address, encryptedJson); 151 | } 152 | 153 | public IEnumerator getAccountBalance(string address, System.Action callback) 154 | { 155 | var getBalanceRequest = new EthGetBalanceUnityRequest(_url); 156 | yield return getBalanceRequest.SendRequest(address, Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest()); 157 | if (getBalanceRequest.Exception == null) 158 | { 159 | var balance = getBalanceRequest.Result.Value; 160 | callback(Nethereum.Util.UnitConversion.Convert.FromWei(balance, 18)); 161 | } 162 | else 163 | { 164 | throw new System.InvalidOperationException("Get balance request failed"); 165 | } 166 | 167 | } 168 | 169 | } -------------------------------------------------------------------------------- /Assets/Scripts/References/Account.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9b6f4b5065248e44afe24e6f91bf740 3 | timeCreated: 1510751971 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/References/BlockNumber.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using Nethereum.Hex.HexTypes; 4 | using Nethereum.JsonRpc.UnityClient; 5 | using Nethereum.RPC.Eth.Blocks; 6 | using UnityEngine; 7 | using UnityEngine.Networking; 8 | using UnityEngine.UI; 9 | 10 | public class BlockNumber : MonoBehaviour { 11 | public Text blockNumberText; 12 | private float blockCheckRate = 3f; 13 | private float lastBlockCheckTime; 14 | private bool supportsProperThreads = false; 15 | 16 | void Start () { 17 | lastBlockCheckTime = 0f; 18 | 19 | if (!supportsProperThreads) { 20 | StartCoroutine (CheckBlockNumber ()); 21 | } 22 | } 23 | 24 | public IEnumerator CheckBlockNumber () { 25 | var wait = 1; 26 | while (true) { 27 | yield return new WaitForSeconds (wait); 28 | wait = 10; 29 | var blockNumberRequest = new EthBlockNumberUnityRequest ("https://rinkeby.infura.io"); 30 | yield return blockNumberRequest.SendRequest (); 31 | if (blockNumberRequest.Exception == null) { 32 | var blockNumber = blockNumberRequest.Result.Value; 33 | blockNumberText.text = "Block: " + blockNumber.ToString (); 34 | } 35 | } 36 | } 37 | 38 | public void Update () { 39 | if (supportsProperThreads) { 40 | lastBlockCheckTime += Time.deltaTime; 41 | 42 | if (lastBlockCheckTime >= blockCheckRate) { 43 | lastBlockCheckTime = 0f; 44 | //CheckBlockNumberOnBackgroundThread(); 45 | } 46 | } 47 | } 48 | 49 | /* 50 | public void CheckBlockNumberOnBackgroundThread() 51 | { 52 | Task.Run(async () => 53 | { 54 | return await web3.Eth.Blocks.GetBlockNumber.SendRequestAsync(); 55 | 56 | }).ContinueWith( blockNumber => 57 | { 58 | blockNumberText.text = "Block: " + blockNumber.Result.Value.ToString(); 59 | }, 60 | TaskScheduler.FromCurrentSynchronizationContext()); 61 | } 62 | 63 | */ 64 | 65 | } -------------------------------------------------------------------------------- /Assets/Scripts/References/BlockNumber.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ada3e0c6c48de5340af4333dd5367a72 3 | timeCreated: 1510751971 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/References/PingContractService.cs: -------------------------------------------------------------------------------- 1 | using Nethereum.Contracts; 2 | using Nethereum.RPC.Eth.DTOs; 3 | using System.Numerics; 4 | using Nethereum.Hex.HexTypes; 5 | using Nethereum.ABI.Encoders; 6 | using Nethereum.Signer; 7 | using Nethereum.Hex.HexConvertors.Extensions; 8 | using UnityEngine; 9 | 10 | 11 | public class PingContractService 12 | { 13 | // We define the ABI of the contract we are going to use. 14 | public static string ABI = @"[{""constant"":true,""inputs"":[],""name"":""pings"",""outputs"":[{""name"":"""",""type"":""uint256""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""value"",""type"":""uint256""}],""name"":""ping"",""outputs"":[],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""anonymous"":false,""inputs"":[{""indexed"":false,""name"":""pong"",""type"":""uint256""}],""name"":""Pong"",""type"":""event""}]"; 15 | 16 | // And we define the contract address here, in this case is a simple ping contract 17 | // (Remember this contract is deployed on the kovan network) 18 | // https://kovan.etherscan.io/address/0xc4b054A90676fea7E8CBb8e311fd1ed086A296e1#code 19 | private static string contractAddress = "0xc4b054A90676fea7E8CBb8e311fd1ed086A296e1"; 20 | 21 | // We define a new contract (Netherum.Contracts) 22 | private Contract contract; 23 | 24 | public PingContractService() 25 | { 26 | // Here we assign the contract as a new contract and we send it the ABI and contact address 27 | this.contract = new Contract(null, ABI, contractAddress); 28 | // Basically, this contract will add 1 each time you call the ping function, 29 | // and then emit a pong event with the sum of (total pings) and (sent value). 30 | // i.e. (first time ever to call the contract) ping 10 => pings = 1; Pong(11); 31 | // ping 55 => pings = 2; Pong(57); ... 32 | } 33 | 34 | public Function GetPingFunction() 35 | { 36 | return contract.GetFunction("ping"); 37 | } 38 | 39 | public Function GetPingsFunction() 40 | { 41 | return contract.GetFunction("pings"); 42 | } 43 | 44 | public TransactionInput CreatePingTransactionInput( 45 | // For this transaction to the contract we are going to use 46 | // the address which is excecuting the transaction (addressFrom), 47 | // the private key of that address (privateKey), 48 | // the ping value we are going to send to this contract (pingValue), 49 | // the maximum amount of gas to consume, 50 | // the price you are willing to pay per each unit of gas consumed, (higher the price, faster the tx will be included) 51 | // and the valueAmount in ETH to send to this contract. 52 | // IMPORTANT: the PingContract doesn't accept eth transfers so this must be 0 or it will throw an error. 53 | string addressFrom, 54 | string privateKey, 55 | BigInteger pingValue, 56 | HexBigInteger gas = null, 57 | HexBigInteger gasPrice = null, 58 | HexBigInteger valueAmount = null) 59 | { 60 | 61 | var function = GetPingFunction(); 62 | return function.CreateTransactionInput(addressFrom, gas, gasPrice, valueAmount, pingValue); 63 | } 64 | 65 | public CallInput CreatePingsCallInput() 66 | { 67 | // For this transaction to the contract we dont need inputs, 68 | // its only to retreive the quantity of Ping transactions we did. (the pings variable on the contract) 69 | var function = GetPingsFunction(); 70 | return function.CreateCallInput(); 71 | } 72 | 73 | public int DecodePings(string pings) 74 | { 75 | // We use this function later to parse the result of encoded pings (Hexadecimal 0x0f) 76 | // into a decoded output for easier readability (Integer 15) 77 | var function = GetPingsFunction(); 78 | return function.DecodeSimpleTypeOutput(pings); 79 | } 80 | } -------------------------------------------------------------------------------- /Assets/Scripts/References/PingContractService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6830a2638510ba94092afea94f561545 3 | timeCreated: 1510751971 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/References/QRGenerator.cs: -------------------------------------------------------------------------------- 1 | using ZXing; 2 | using ZXing.QrCode; 3 | using UnityEngine; 4 | using System; 5 | 6 | public class QRGenerator : MonoBehaviour 7 | { 8 | 9 | private WebCamTexture camTexture; 10 | private Rect screenRect; 11 | void Start() 12 | { 13 | /* 14 | screenRect = new Rect(0, 0, Screen.width, Screen.height); 15 | camTexture = new WebCamTexture(); 16 | camTexture.requestedHeight = Screen.height; 17 | camTexture.requestedWidth = Screen.width; 18 | if (camTexture != null) 19 | { 20 | camTexture.Play(); 21 | } 22 | */ 23 | } 24 | 25 | private static Color32[] Encode(string textForEncoding, 26 | int width, int height) 27 | { 28 | var writer = new BarcodeWriter 29 | { 30 | Format = BarcodeFormat.QR_CODE, 31 | Options = new QrCodeEncodingOptions 32 | { 33 | Height = height, 34 | Width = width 35 | } 36 | }; 37 | return writer.Write(textForEncoding); 38 | } 39 | 40 | 41 | public Texture2D generateQR(string text) 42 | { 43 | var encoded = new Texture2D(256, 256); 44 | var color32 = Encode(text, encoded.width, encoded.height); 45 | encoded.SetPixels32(color32); 46 | encoded.Apply(); 47 | return encoded; 48 | } 49 | 50 | void OnGUI() 51 | { 52 | 53 | Texture2D myQR = generateQR("test"); 54 | if (GUI.Button(new Rect(0, 0, 256, 256), myQR, GUIStyle.none)) { } 55 | 56 | /* 57 | // drawing the camera on screen 58 | GUI.DrawTexture(screenRect, camTexture, ScaleMode.ScaleToFit); 59 | // do the reading — you might want to attempt to read less often than you draw on the screen for performance sake 60 | try 61 | { 62 | IBarcodeReader barcodeReader = new BarcodeReader(); 63 | // decode the current frame 64 | var result = barcodeReader.Decode(camTexture.GetPixels32(), 65 | camTexture.width, camTexture.height); 66 | if (result != null) 67 | { 68 | Debug.Log("DECODED TEXT FROM QR: " + result.Text); 69 | } 70 | } 71 | catch (Exception ex) { Debug.LogWarning(ex.Message); } 72 | */ 73 | } 74 | } -------------------------------------------------------------------------------- /Assets/Scripts/References/QRGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6e0a5a169bdb9049b0eba97893d12ac 3 | timeCreated: 1510160833 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/References/ScoreContractService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Numerics; 5 | using Nethereum.ABI.Encoders; 6 | using Nethereum.ABI.FunctionEncoding.Attributes; 7 | using Nethereum.Contracts; 8 | using Nethereum.Hex.HexConvertors.Extensions; 9 | using Nethereum.Hex.HexTypes; 10 | using Nethereum.JsonRpc.Client; 11 | using Nethereum.JsonRpc.UnityClient; 12 | using Nethereum.RPC.Eth.DTOs; 13 | using Nethereum.RPC.Eth.Transactions; 14 | using Nethereum.Signer; 15 | using UnityEngine; 16 | 17 | 18 | public class ScoreContractService { 19 | public static string ABI = @"[{'constant':false,'inputs':[{'name':'score','type':'int256'},{'name':'v','type':'uint8'},{'name':'r','type':'bytes32'},{'name':'s','type':'bytes32'}],'name':'setTopScore','outputs':[],'payable':false,'type':'function'},{'constant':true,'inputs':[{'name':'','type':'uint256'}],'name':'topScores','outputs':[{'name':'addr','type':'address'},{'name':'score','type':'int256'}],'payable':false,'type':'function'},{'constant':false,'inputs':[],'name':'getCountTopScores','outputs':[{'name':'','type':'uint256'}],'payable':false,'type':'function'},{'constant':true,'inputs':[{'name':'','type':'address'}],'name':'userTopScores','outputs':[{'name':'','type':'int256'}],'payable':false,'type':'function'},{'inputs':[],'payable':false,'type':'constructor'}]"; 20 | 21 | private static string contractAddress = "0x32eb97b8ad202b072fd9066c03878892426320ed"; 22 | private Contract contract; 23 | 24 | public ScoreContractService () { 25 | this.contract = new Contract (null, ABI, contractAddress); 26 | } 27 | 28 | public Function GetUserTopScoresFunction () { 29 | return contract.GetFunction ("userTopScores"); 30 | } 31 | 32 | public Function GetFunctionTopScores () { 33 | return contract.GetFunction ("topScores"); 34 | } 35 | 36 | public Function GetFunctionGetCountTopScores () { 37 | return contract.GetFunction ("getCountTopScores"); 38 | } 39 | 40 | public CallInput CreateUserTopScoreCallInput (string userAddress) { 41 | var 42 | function = GetUserTopScoresFunction (); 43 | return function.CreateCallInput (userAddress); 44 | } 45 | 46 | public CallInput CreateTopScoresCallInput (BigInteger index) { 47 | var 48 | function = GetFunctionTopScores (); 49 | return function.CreateCallInput (index); 50 | } 51 | 52 | public CallInput CreateCountTopScoresCallInput () { 53 | var 54 | function = GetFunctionGetCountTopScores (); 55 | return function.CreateCallInput (); 56 | } 57 | 58 | public Function GetFunctionSetTopScore () { 59 | return contract.GetFunction ("setTopScore"); 60 | } 61 | 62 | public TransactionInput CreateSetTopScoreTransactionInput (string addressFrom, string addressOwner, string privateKey, BigInteger score, HexBigInteger gas = null, HexBigInteger valueAmount = null) { 63 | var numberBytes = new IntTypeEncoder ().Encode (score); 64 | var sha3 = new Nethereum.Util.Sha3Keccack (); 65 | var hash = sha3.CalculateHashFromHex (addressFrom, addressOwner, numberBytes.ToHex ()); 66 | var signer = new MessageSigner (); 67 | var signature = signer.Sign (hash.HexToByteArray (), privateKey); 68 | var ethEcdsa = MessageSigner.ExtractEcdsaSignature (signature); 69 | 70 | var 71 | function = GetFunctionSetTopScore (); 72 | return function.CreateTransactionInput (addressFrom, gas, valueAmount, score, ethEcdsa.V, ethEcdsa.R, ethEcdsa.S); 73 | } 74 | 75 | public int DecodeUserTopScoreOutput (string result) { 76 | var 77 | function = GetUserTopScoresFunction (); 78 | return function.DecodeSimpleTypeOutput (result); 79 | } 80 | 81 | public int DecodeTopScoreCount (string result) { 82 | var 83 | function = GetFunctionGetCountTopScores (); 84 | return function.DecodeSimpleTypeOutput (result); 85 | } 86 | 87 | public TopScoresDTO DecodeTopScoreDTO (string result) { 88 | var 89 | function = GetFunctionTopScores (); 90 | return function.DecodeDTOTypeOutput (result); 91 | } 92 | } 93 | 94 | [FunctionOutput] 95 | public class TopScoresDTO { 96 | [Parameter ("address", "addr", 1)] 97 | public string Addr { get; set; } 98 | 99 | [Parameter ("int256", "score", 2)] 100 | public BigInteger Score { get; set; } 101 | 102 | } -------------------------------------------------------------------------------- /Assets/Scripts/References/ScoreContractService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1348f4e4798ecb64f8bdc1ebb9287a31 3 | timeCreated: 1510751971 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/References/TopScoreService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.InteropServices; 6 | using Nethereum.ABI.FunctionEncoding; 7 | using Nethereum.ABI.Model; 8 | using Nethereum.Contracts; 9 | using Nethereum.Hex.HexTypes; 10 | using Nethereum.JsonRpc.Client; 11 | using Nethereum.JsonRpc.UnityClient; 12 | using Nethereum.Util; 13 | using UnityEngine; 14 | using UnityEngine.Networking; 15 | using UnityEngine.SceneManagement; 16 | using UnityEngine.UI; 17 | 18 | public class TopScoreService : MonoBehaviour { 19 | //This is the Text that displays the user top score 20 | public Text topScoreText; 21 | public Text userAddress; 22 | public Text topScoresAllTimeText; 23 | 24 | private string _addressOwner = "0x12890d2cce102216644c59daE5baed380d84830c"; 25 | private string _userAddress; // = 26 | private byte[] _key; 27 | //Partial private key to sign the transactions 28 | private string _privateKey = "fa002a6a5bc0f42cc9a8806ab109bf5cd2f8bb6c54d4"; 29 | //Url to Ethereum public client (Todo support https for Infura) 30 | private string _url = "https://rinkeby.infura.io"; 31 | //Service to generate, encode and decode CallInput and TransactionInpput 32 | //This includes the contract address, abi,, etc, similar to a generic Nethereum services 33 | private ScoreContractService _scoreContractService; 34 | 35 | #if !UNITY_EDITOR 36 | public bool ExternalProvider = true; 37 | [DllImport ("__Internal")] 38 | private static extern string GetAccount (); 39 | [DllImport ("__Internal")] 40 | private static extern string SendTransaction (string to, string data); 41 | 42 | #else 43 | public bool ExternalProvider = false; 44 | private static string GetAccount () { return null; } 45 | private static string SendTransaction (string to, string data) { return null; } 46 | #endif 47 | 48 | private bool submitting = false; 49 | 50 | void Start () { 51 | _scoreContractService = new ScoreContractService (); 52 | 53 | //Coroutines 54 | // StartCoroutine (GetExternalAccount ()); 55 | StartCoroutine (GetTopScores ()); 56 | // StartCoroutine (CheckTopScore ()); 57 | // StartCoroutine (CheckSubmitScore ()); 58 | } 59 | 60 | public IEnumerator GetTopScores () { 61 | var wait = 0; 62 | while (true) { 63 | yield return new WaitForSeconds (wait); 64 | wait = 20; 65 | 66 | //Create a unity call request (we have a request for each type of rpc operation) 67 | var topScoreRequest = new EthCallUnityRequest (_url); 68 | 69 | //Use the service to create a call input which includes the encoded 70 | var countTopScoresCallInput = _scoreContractService.CreateCountTopScoresCallInput (); 71 | 72 | //Call request sends and yield for response 73 | yield return topScoreRequest.SendRequest (countTopScoresCallInput, Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest ()); 74 | 75 | //decode the top score using the service 76 | var scores = new List (); 77 | 78 | var count = _scoreContractService.DecodeTopScoreCount (topScoreRequest.Result); 79 | for (int i = 0; i < count; i++) { 80 | topScoreRequest = new EthCallUnityRequest (_url); 81 | var topScoreCallInput = _scoreContractService.CreateTopScoresCallInput (i); 82 | yield return topScoreRequest.SendRequest (topScoreCallInput, Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest ()); 83 | 84 | scores.Add (_scoreContractService.DecodeTopScoreDTO (topScoreRequest.Result)); 85 | } 86 | 87 | var orderedScores = scores.OrderByDescending (x => x.Score).ToList (); 88 | 89 | var topScores = "Top Scores" + Environment.NewLine; 90 | 91 | foreach (var score in orderedScores) { 92 | topScores = topScores + score.Score + "-" + score.Addr.Substring (0, 15) + "..." + Environment.NewLine; 93 | 94 | } 95 | topScoresAllTimeText.text = topScores; 96 | } 97 | 98 | } 99 | 100 | //This will be used to get the account using metamask (uport?), we loop to check for account changes on metamask 101 | public IEnumerator GetExternalAccount () { 102 | if (ExternalProvider) { 103 | var wait = 2; 104 | while (true) { 105 | yield return new WaitForSeconds (wait); 106 | wait = 20; 107 | var acc = GetAccount (); 108 | if (acc == "") { 109 | _userAddress = null; 110 | } else { 111 | _userAddress = acc; 112 | } 113 | 114 | userAddress.text = _userAddress; 115 | } 116 | } 117 | } 118 | 119 | //Making a contract call: 120 | 121 | //Check if the user top score has changed on the contract chain every 2 seconds 122 | public IEnumerator CheckTopScore () { 123 | var wait = 0; 124 | while (true) { 125 | yield return new WaitForSeconds (wait); 126 | wait = 2; 127 | 128 | //Create a unity call request (we have a request for each type of rpc operation) 129 | var userTopScoreRequest = new EthCallUnityRequest (_url); 130 | 131 | if (_userAddress != null) { 132 | 133 | //Use the service to create a call input which includes the encoded 134 | var userTopScoreCallInput = _scoreContractService.CreateUserTopScoreCallInput (_userAddress); 135 | //Call request sends and yield for response 136 | yield return userTopScoreRequest.SendRequest (userTopScoreCallInput, Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest ()); 137 | 138 | //Each request has a exception and a result. The exception is set when an error occurs. 139 | //Follows a similar patter to the www and unitywebrequest 140 | 141 | if (userTopScoreRequest.Exception == null) { 142 | //decode the top score using the service 143 | var topScoreUser = _scoreContractService.DecodeUserTopScoreOutput (userTopScoreRequest.Result); 144 | //and set it to the text box 145 | topScoreText.text = "Your top: " + topScoreUser.ToString (); 146 | //set the value on the global worl 147 | // GameControl.instance.TopScoreRecorded = topScoreUser; 148 | wait = 3; 149 | } else { 150 | Debug.Log (userTopScoreRequest.Exception.ToString ()); 151 | } 152 | 153 | } 154 | } 155 | } 156 | 157 | //Making a transaction signed raw request 158 | public IEnumerator CheckSubmitScore () { 159 | var wait = 4; 160 | while (true) { 161 | yield return new WaitForSeconds (wait); 162 | 163 | //Game control sets a signal 164 | if (// GameControl.instance.SubmitTopScore && 165 | !submitting) { 166 | if (_userAddress != null) { 167 | submitting = true; 168 | Debug.Log ("Submitting tx"); 169 | 170 | //Create the transaction input with encoded values for the function 171 | var transactionInput = _scoreContractService.CreateSetTopScoreTransactionInput(_userAddress, _addressOwner, _privateKey, 172 | 0, // GameControl.instance.TopScore, 173 | new HexBigInteger (4712388)); 174 | 175 | if (ExternalProvider) { 176 | Debug.Log ("Submitting tx to score using external: " + transactionInput.Data); 177 | SendTransaction (transactionInput.To, transactionInput.Data); 178 | } else { 179 | //Create Unity Request with the private key, url and user address 180 | //(the address could be recovered from private key as in normal Nethereum, could put this an overload) 181 | // premature optimisation 182 | var transactionSignedRequest = new TransactionSignedUnityRequest (_url, 183 | "", // GameControl.instance.Key, 184 | _userAddress); 185 | 186 | //send and wait 187 | yield return transactionSignedRequest.SignAndSendTransaction (transactionInput); 188 | 189 | if (transactionSignedRequest.Exception == null) { 190 | //get transaction receipt 191 | Debug.Log ("Top score submitted tx: " + transactionSignedRequest.Result); 192 | } else { 193 | Debug.Log ("Error submitted tx: " + transactionSignedRequest.Exception.Message); 194 | } 195 | 196 | } 197 | 198 | } 199 | // GameControl.instance.SubmitTopScore = false; 200 | submitting = false; 201 | } 202 | } 203 | } 204 | } 205 | 206 | public class UserTopScoreRequest : UnityRequest { 207 | private ScoreContractService _scoreContractService; 208 | private string _url; 209 | 210 | public UserTopScoreRequest (ScoreContractService scoreRequestBuilder, string url) { 211 | _scoreContractService = scoreRequestBuilder; 212 | _url = url; 213 | } 214 | 215 | public IEnumerator SendGetUserTopScoreRequest (string userAddress) { 216 | var unityClientService = new EthCallUnityRequest (_url); 217 | yield return unityClientService.SendRequest (_scoreContractService.CreateUserTopScoreCallInput (userAddress), Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest ()); 218 | 219 | Exception = unityClientService.Exception; 220 | 221 | if (!String.IsNullOrEmpty (unityClientService.Result)) { 222 | Debug.Log (unityClientService.Result); 223 | Result = _scoreContractService.DecodeUserTopScoreOutput (unityClientService.Result); 224 | } 225 | } 226 | } -------------------------------------------------------------------------------- /Assets/Scripts/References/TopScoreService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 214d9542d00b18c4b9295a2159e5e5c6 3 | timeCreated: 1510751971 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/TokenContractService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Numerics; 3 | using System.Text; 4 | using Nethereum.Contracts; 5 | using Nethereum.JsonRpc.UnityClient; 6 | using Nethereum.RPC.Eth.DTOs; 7 | using Nethereum.Util; 8 | using Nethereum.Hex.HexTypes; 9 | using UnityEngine; 10 | using Nethereum.ABI.Encoders; 11 | using Nethereum.Hex.HexConvertors.Extensions; 12 | using Nethereum.Signer; 13 | 14 | [System.Serializable] 15 | public struct TokenInfo 16 | { 17 | public string name; 18 | public string symbol; 19 | public int decimals; 20 | public BigInteger totalSupply; 21 | }; 22 | 23 | public class TokenContractService : MonoBehaviour 24 | { 25 | 26 | // create class as singleton 27 | private static TokenContractService instance; 28 | public static TokenContractService Instance { get { return instance; } } 29 | public void OnDestroy() { if (instance == this) instance = null; } 30 | 31 | // this class uses the token contract source found at https://www.ethereum.org/token 32 | 33 | // We define the ABI of the contract we are going to use. One way to get this is by 34 | // going to remix IDE and view contract details 35 | public string ABI; 36 | 37 | // example ABI: 38 | // @"[{""constant"":true, ""inputs"":[],""name"":""name"",""outputs"":[{""name"":"""",""type"":""string""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""_spender"",""type"":""address""},{""name"":""_value"",""type"":""uint256""}],""name"":""approve"",""outputs"":[{""name"":""success"",""type"":""bool""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""constant"":true,""inputs"":[],""name"":""totalSupply"",""outputs"":[{""name"":"""",""type"":""uint256""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""_from"",""type"":""address""},{""name"":""_to"",""type"":""address""},{""name"":""_value"",""type"":""uint256""}],""name"":""transferFrom"",""outputs"":[{""name"":""success"",""type"":""bool""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""constant"":true,""inputs"":[],""name"":""decimals"",""outputs"":[{""name"":"""",""type"":""uint8""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""_value"",""type"":""uint256""}],""name"":""burn"",""outputs"":[{""name"":""success"",""type"":""bool""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""balanceOf"",""outputs"":[{""name"":"""",""type"":""uint256""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""_from"",""type"":""address""},{""name"":""_value"",""type"":""uint256""}],""name"":""burnFrom"",""outputs"":[{""name"":""success"",""type"":""bool""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""constant"":true,""inputs"":[],""name"":""symbol"",""outputs"":[{""name"":"""",""type"":""string""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""_to"",""type"":""address""},{""name"":""_value"",""type"":""uint256""}],""name"":""transfer"",""outputs"":[],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""constant"":false,""inputs"":[{""name"":""_spender"",""type"":""address""},{""name"":""_value"",""type"":""uint256""},{""name"":""_extraData"",""type"":""bytes""}],""name"":""approveAndCall"",""outputs"":[{""name"":""success"",""type"":""bool""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""},{""name"":"""",""type"":""address""}],""name"":""allowance"",""outputs"":[{""name"":"""",""type"":""uint256""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""inputs"":[{""name"":""initialSupply"",""type"":""uint256""},{""name"":""tokenName"",""type"":""string""},{""name"":""tokenSymbol"",""type"":""string""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""constructor""},{""anonymous"":false,""inputs"":[{""indexed"":true,""name"":""from"",""type"":""address""},{""indexed"":true,""name"":""to"",""type"":""address""},{""indexed"":false,""name"":""value"",""type"":""uint256""}],""name"":""Transfer"",""type"":""event""},{""anonymous"":false,""inputs"":[{""indexed"":true,""name"":""from"",""type"":""address""},{""indexed"":false,""name"":""value"",""type"":""uint256""}],""name"":""Burn"",""type"":""event""}]"; 39 | 40 | public string TokenContractAddress; 41 | 42 | // example address: 43 | // "0x1d8338c008fede66018b71b70956766e41da34ea"; 44 | // Etherscan info: https://ropsten.etherscan.io/address/0x1d8338c008fede66018b71b70956766e41da34ea 45 | 46 | 47 | // We define a new contract (Netherum.Contracts) 48 | private Contract contract; 49 | 50 | private string _url; 51 | 52 | 53 | public TokenInfo TokenInfo = new TokenInfo(); 54 | 55 | 56 | 57 | void Awake() 58 | { 59 | if (instance == null) instance = this; 60 | 61 | // retrieve the url from the Wallet Manager 62 | _url = WalletManager.Instance.networkUrl; 63 | 64 | TokenInfo.symbol = "???"; 65 | TokenInfo.decimals = 18; // add default values. TODO: make sure these are populated before checking balance 66 | 67 | // Here we assign the contract as a new contract and we send it the ABI and contact address 68 | this.contract = new Contract(null, ABI, TokenContractAddress); 69 | 70 | WalletManager.Instance.AddInfoText("[Loading Token Info...]", true); 71 | WalletManager.Instance.LoadingIndicator.SetActive(true); 72 | 73 | StartCoroutine(GetTokenInfo()); 74 | 75 | } 76 | 77 | public void SendFundsButtonPressed() 78 | { 79 | WalletData wd = WalletManager.Instance.GetSelectedWalletData(); 80 | 81 | if (wd != null) 82 | { 83 | StartCoroutine(SendFunds(wd.address, WalletManager.Instance.recepientAddressInputField.text, wd.privateKey, 84 | WalletManager.Instance.fundTransferAmountInputField.text)); 85 | } 86 | 87 | else 88 | { 89 | WalletManager.Instance.logText.Log("No Wallet Account Found"); 90 | } 91 | } 92 | 93 | public CallInput CreateCallInput(string variableName, params object[] p) 94 | { 95 | var function = contract.GetFunction(variableName); 96 | return function.CreateCallInput(p); 97 | } 98 | 99 | public T DecodeVariable(string variableName, string result) 100 | { 101 | var function = contract.GetFunction(variableName); 102 | try 103 | { 104 | return function.DecodeSimpleTypeOutput(result); // this results in an error if BigInteger is 0 105 | } 106 | catch 107 | { 108 | return default(T); 109 | } 110 | } 111 | 112 | public TransactionInput CreateTransferFundsTransactionInput( 113 | // For this transaction to the contract we are going to use 114 | // the address which is excecuting the transaction (addressFrom), 115 | // the address which to receive the transfer (addressTo), 116 | // the private key of that address (privateKey), 117 | // the ping value we are going to send to this contract (pingValue), 118 | // the maximum amount of gas to consume, 119 | // the price you are willing to pay per each unit of gas consumed, (higher the price, faster the tx will be included) 120 | // and the valueAmount in ETH to send to this contract. 121 | // IMPORTANT: the contract doesn't accept eth transfers so this must be 0 or it will throw an error. 122 | string addressFrom, 123 | string addressTo, 124 | string privateKey, 125 | BigInteger transferAmount, 126 | HexBigInteger gas = null, 127 | HexBigInteger gasPrice = null, 128 | HexBigInteger valueAmount = null) 129 | { 130 | 131 | var function = contract.GetFunction("transfer"); 132 | return function.CreateTransactionInput(addressFrom, gas, gasPrice, valueAmount, addressTo, transferAmount); 133 | } 134 | 135 | public IEnumerator SendFunds(string addressFrom, string addressTo, string accountPrivateKey, string transferAmount) 136 | { 137 | // Create the transaction input with encoded values for the function 138 | // We will need, the public key of sender and receiver (addressFrom, addressTo),the private key (accountPrivateKey), 139 | // the amount we are going to send to our contract, 140 | // the gas amount (500000 in this case), 141 | // the gas price (10), (you can send a gas price of null to get the default value) 142 | // and the ammount of ethers you want to transfer, this contract doesn't receive ethereum transfers, 143 | // so we set it to 0, you can modify it and see how it fails. 144 | var transactionInput = CreateTransferFundsTransactionInput( 145 | addressFrom, 146 | addressTo, 147 | accountPrivateKey, 148 | BigInteger.Parse(transferAmount), 149 | new HexBigInteger(500000), 150 | new HexBigInteger(10), 151 | null 152 | ); 153 | 154 | // Here we create a new signed transaction Unity Request with the url, private key, and the user address we get before 155 | // (this will sign the transaction automatically :D ) 156 | var transactionSignedRequest = new TransactionSignedUnityRequest(WalletManager.Instance.networkUrl, 157 | accountPrivateKey, addressFrom); 158 | 159 | // Then we send it and wait 160 | WalletManager.Instance.logText.Log("Sending fund transfer transaction..."); 161 | yield return transactionSignedRequest.SignAndSendTransaction(transactionInput); 162 | if (transactionSignedRequest.Exception == null) 163 | { 164 | // If we don't have exceptions we just display the result, congrats! 165 | WalletManager.Instance.logText.Log("transfer tx submitted: " + transactionSignedRequest.Result); 166 | WalletManager.Instance.CopyToClipboard(transactionSignedRequest.Result); 167 | 168 | // TODO: replace prefix of url derived from network url 169 | Application.OpenURL("https://ropsten.etherscan.io/tx/" + transactionSignedRequest.Result); 170 | } 171 | else 172 | { 173 | // if we had an error in the UnityRequest we just display the Exception error 174 | Debug.Log("Error submitting transfer tx: " + transactionSignedRequest.Exception.Message); 175 | } 176 | } 177 | 178 | 179 | 180 | public IEnumerator GetTokenInfo() 181 | { 182 | //Create a unity call request (we have a request for each type of rpc operation) 183 | var currencyInfoRequest = new EthCallUnityRequest(_url); 184 | 185 | // get token symbol (string) 186 | yield return currencyInfoRequest.SendRequest(CreateCallInput("symbol"), BlockParameter.CreateLatest()); 187 | TokenInfo.symbol = DecodeVariable("symbol", currencyInfoRequest.Result); 188 | 189 | // get token decimal places (uint 8) 190 | yield return currencyInfoRequest.SendRequest(CreateCallInput("decimals"), BlockParameter.CreateLatest()); 191 | TokenInfo.decimals = DecodeVariable("decimals", currencyInfoRequest.Result); 192 | 193 | // get token name (string) 194 | yield return currencyInfoRequest.SendRequest(CreateCallInput("name"), BlockParameter.CreateLatest()); 195 | TokenInfo.name = DecodeVariable("name", currencyInfoRequest.Result); 196 | 197 | // get token totalSupply (uint 256) 198 | yield return currencyInfoRequest.SendRequest(CreateCallInput("totalSupply"), BlockParameter.CreateLatest()); 199 | TokenInfo.totalSupply = DecodeVariable("totalSupply", currencyInfoRequest.Result); 200 | 201 | WalletManager.Instance.AddInfoText("Token Address: \n" + TokenContractAddress, true); 202 | WalletManager.Instance.AddInfoText("Name: " + TokenInfo.name + " (" + TokenInfo.symbol + ")"); 203 | WalletManager.Instance.AddInfoText("Decimals: " + TokenInfo.decimals); 204 | WalletManager.Instance.AddInfoText("Total Supply: " + UnitConversion.Convert.FromWei(TokenInfo.totalSupply, TokenInfo.decimals) + " " + TokenInfo.symbol); 205 | 206 | WalletManager.Instance.LoadingIndicator.SetActive(false); 207 | } 208 | 209 | } -------------------------------------------------------------------------------- /Assets/Scripts/TokenContractService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b9ea88fbf725bf4bba33e906bc34367 3 | timeCreated: 1510637356 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc96cdd87a554c444b6142906312a15e 3 | folderAsset: yes 4 | timeCreated: 1510233390 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/LogText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class LogText : MonoBehaviour { 7 | 8 | public void Log(params string[] strings) 9 | { 10 | Text m_logText = gameObject.GetComponent(); 11 | 12 | foreach (string s in strings) 13 | { 14 | m_logText.text += "\n" + s; 15 | } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/LogText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 208c0e20fc7fdbc4dbfd8a9a3d72b418 3 | timeCreated: 1510233374 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/PasswordInputField.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class PasswordInputField : MonoBehaviour { 7 | 8 | public InputField confirmPasswordInputField; 9 | public Button createWalletButton; 10 | 11 | private bool m_passwordConfirmed = false; 12 | 13 | public bool passwordConfirmed() 14 | { 15 | return m_passwordConfirmed; 16 | } 17 | 18 | public void resetFields() 19 | { 20 | gameObject.GetComponent().text = ""; 21 | confirmPasswordInputField.text = ""; 22 | } 23 | 24 | public string passwordString() 25 | { 26 | return gameObject.GetComponent().text; 27 | } 28 | 29 | public void validatePasswordConfirmation() 30 | { 31 | m_passwordConfirmed = passwordString().Equals(confirmPasswordInputField.text); 32 | createWalletButton.interactable = m_passwordConfirmed; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/Scripts/UI/PasswordInputField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 702f67a85be60374999c3334b0f345a1 3 | timeCreated: 1510219773 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/WalletManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Events; 5 | using UnityEngine.UI; 6 | using System.Runtime.Serialization.Formatters.Binary; 7 | using System.IO; 8 | using Nethereum.JsonRpc.UnityClient; 9 | using Nethereum.RPC.Eth.DTOs; 10 | using System.Numerics; 11 | using Nethereum.Util; 12 | 13 | // TODO: IMPORTANT! A serialization bug sometimes makes the walletcache.data broken, fix this! 14 | // for now, always backup walletcache.data 15 | 16 | [System.Serializable] 17 | public class WalletData 18 | { 19 | public string name; 20 | public string address; 21 | 22 | // TODO: stored for convenience, may need to remove for security 23 | public string cachedPassword; 24 | public string encryptedJson; 25 | public string privateKey; 26 | } 27 | 28 | public class WalletManager : MonoBehaviour { 29 | 30 | // create class as singleton 31 | private static WalletManager instance; 32 | public static WalletManager Instance { get { return instance; } } 33 | public void Awake() { if (instance == null) instance = this; } 34 | public void OnDestroy() { if (instance == this) instance = null; } 35 | 36 | [Header("Config")] 37 | 38 | public string networkUrl; 39 | 40 | [Header("UI Components")] 41 | 42 | public PasswordInputField passwordInputField; 43 | public LogText logText; 44 | public InputField recepientAddressInputField; 45 | public InputField fundTransferAmountInputField; 46 | public GameObject createWalletPanel; 47 | public GameObject loadingIndicatorPanel; 48 | public GameObject operationsPanel; 49 | public Dropdown walletSelectionDropdown; 50 | public Dropdown recepientAddressDropdown; 51 | public Text EtherBalanceText; 52 | public Text CustomTokenBalanceText; 53 | 54 | public Text CurrencyInfoText; 55 | public GameObject LoadingIndicator; 56 | public Button CopyToClipboardButton; 57 | public Button ShowQRCodeButton; 58 | 59 | 60 | public GameObject currencyInfoScrollView; 61 | public QRCodeDisplay QRPanel; 62 | 63 | public GameObject MainPanel; 64 | public GameObject QRScannerPanel; 65 | public Button closeQRScannerButton; 66 | 67 | private bool isPaused = false; 68 | private bool dataSaved = false; 69 | 70 | // events 71 | static UnityEvent newAccountAdded; 72 | static UnityEvent loadingFinished; 73 | 74 | private static List walletList = new List(); 75 | 76 | // used for saving 77 | private BinaryFormatter bf; 78 | private FileStream file; 79 | private string filePath; 80 | private const string fileName = "walletcache.data"; 81 | 82 | // show QR Scanner 83 | public void ToggleQRScannerDisplay(bool forceMain = false) 84 | { 85 | if (forceMain) 86 | { 87 | MainPanel.SetActive(true); 88 | QRScannerPanel.SetActive(false); 89 | } 90 | 91 | else 92 | { 93 | MainPanel.SetActive(!MainPanel.activeSelf); 94 | QRScannerPanel.SetActive(!QRScannerPanel.activeSelf); 95 | } 96 | } 97 | 98 | // show QR code display 99 | public void ToogleQRCodeDisplay() 100 | { 101 | currencyInfoScrollView.SetActive(!currencyInfoScrollView.activeSelf); 102 | QRPanel.gameObject.SetActive(!currencyInfoScrollView.activeSelf); 103 | } 104 | 105 | // copy account address to clipboard 106 | public void CopyToClipboard() 107 | { 108 | CopyToClipboard(walletList[walletSelectionDropdown.value].address); 109 | } 110 | 111 | public void CopyToClipboard(string s) 112 | { 113 | TextEditor te = new TextEditor(); 114 | te.text = s; 115 | te.SelectAll(); 116 | te.Copy(); 117 | 118 | logText.Log("Copied to clipboard: \n" + s); 119 | } 120 | 121 | 122 | public void Start() 123 | { 124 | subscribeToEvents(); 125 | LoadWalletsFromFile(); 126 | RefreshTopPanelView(); 127 | } 128 | 129 | private void subscribeToEvents() 130 | { 131 | newAccountAdded = new UnityEvent(); 132 | loadingFinished = new UnityEvent(); 133 | 134 | newAccountAdded.AddListener(RefreshWalletAccountDropdown); 135 | newAccountAdded.AddListener(RefreshTopPanelView); 136 | 137 | loadingFinished.AddListener(hideLoadingIndicatorPanel); 138 | } 139 | 140 | void LoadWalletsFromFile() 141 | { 142 | filePath = (Application.persistentDataPath + "/" + fileName); 143 | 144 | if (File.Exists(filePath)) 145 | { 146 | bf = new BinaryFormatter(); 147 | file = File.Open(filePath, FileMode.Open); 148 | 149 | walletList = (List)bf.Deserialize(file); 150 | 151 | file.Close(); 152 | } 153 | 154 | RefreshWalletAccountDropdown(); 155 | 156 | logText.Log("Loaded " + walletList.Count + " Wallet/s"); 157 | } 158 | 159 | public void RecepientAddressDropdownSelected() 160 | { 161 | if (recepientAddressDropdown.value > 0) 162 | recepientAddressInputField.text = recepientAddressDropdown.options[recepientAddressDropdown.value].text; 163 | 164 | // reset to none when a value is selected 165 | recepientAddressDropdown.value = 0; 166 | } 167 | 168 | public void RefreshRecepientAddressDropdown() 169 | { 170 | recepientAddressDropdown.ClearOptions(); 171 | 172 | // add default none option 173 | recepientAddressDropdown.AddOptions(new List { "-" }); 174 | 175 | int index = 0; 176 | 177 | foreach (WalletData w in walletList) 178 | { 179 | if (index != walletSelectionDropdown.value) 180 | recepientAddressDropdown.AddOptions(new List { w.address }); 181 | 182 | index++; 183 | } 184 | 185 | recepientAddressDropdown.gameObject.SetActive(recepientAddressDropdown.options.Count > 0); 186 | } 187 | 188 | 189 | public void RefreshWalletAccountDropdown() 190 | { 191 | walletSelectionDropdown.ClearOptions(); 192 | 193 | foreach (WalletData w in walletList) 194 | { 195 | walletSelectionDropdown.AddOptions(new List { w.address }); 196 | } 197 | 198 | // add wallet create option 199 | walletSelectionDropdown.AddOptions(new List { "New Wallet" }); 200 | } 201 | 202 | public void RefreshTopPanelView() 203 | { 204 | passwordInputField.resetFields(); 205 | recepientAddressInputField.text = ""; 206 | 207 | RefreshRecepientAddressDropdown(); 208 | 209 | int index = walletSelectionDropdown.value; 210 | 211 | if (index >= walletSelectionDropdown.options.Count - 1) 212 | { 213 | createWalletPanel.SetActive(true); 214 | operationsPanel.SetActive(false); 215 | 216 | EtherBalanceText.text = ""; 217 | CustomTokenBalanceText.text = ""; 218 | CopyToClipboardButton.interactable = false; 219 | ShowQRCodeButton.interactable = false; 220 | 221 | currencyInfoScrollView.SetActive(true); 222 | QRPanel.gameObject.SetActive(false); 223 | 224 | } 225 | 226 | else 227 | { 228 | createWalletPanel.SetActive(false); 229 | operationsPanel.SetActive(true); 230 | 231 | CopyToClipboardButton.interactable = true; 232 | ShowQRCodeButton.interactable = true; 233 | 234 | QRPanel.RenderQRCode(walletList[index].address); 235 | StartCoroutine(CheckAccountBalanceCoroutine(walletList[index].address)); 236 | } 237 | } 238 | 239 | 240 | void SaveDataToFile() 241 | { 242 | 243 | bf = new BinaryFormatter(); 244 | file = File.Create(filePath); 245 | 246 | bf.Serialize(file, walletList); 247 | file.Close(); 248 | 249 | dataSaved = true; 250 | } 251 | 252 | void OnApplicationFocus(bool hasFocus) 253 | { 254 | isPaused = !hasFocus; 255 | } 256 | 257 | void OnApplicationPause(bool pauseStatus) 258 | { 259 | isPaused = pauseStatus; 260 | 261 | if (isPaused) 262 | SaveDataToFile(); 263 | else 264 | dataSaved = false; 265 | } 266 | 267 | void OnApplicationQuit() 268 | { 269 | if (!dataSaved) 270 | SaveDataToFile(); 271 | } 272 | 273 | 274 | private void disableOperationPanels() 275 | { 276 | createWalletPanel.SetActive(false); 277 | } 278 | 279 | private void hideLoadingIndicatorPanel() 280 | { 281 | loadingIndicatorPanel.SetActive(false); 282 | } 283 | 284 | private void showLoadingIndicatorPanel() 285 | { 286 | loadingIndicatorPanel.SetActive(true); 287 | } 288 | 289 | public void CreateWallet() 290 | { 291 | if (passwordInputField.passwordConfirmed()) 292 | { 293 | disableOperationPanels(); 294 | showLoadingIndicatorPanel(); 295 | 296 | // Here we call CreateAccount() and we send it a password to encrypt the new account 297 | StartCoroutine(CreateAccountCoroutine(passwordInputField.passwordString(), 298 | "Account " + (walletList.Count + 1))); 299 | } 300 | 301 | else 302 | { 303 | logText.Log("passwords don't match"); 304 | } 305 | } 306 | 307 | public void AddInfoText(string text, bool clear = false) 308 | { 309 | if (clear) 310 | CurrencyInfoText.text = ""; 311 | else 312 | CurrencyInfoText.text += "\n"; 313 | 314 | CurrencyInfoText.text += text; 315 | 316 | } 317 | 318 | public IEnumerator CheckAccountBalanceCoroutine(string address) 319 | { 320 | EtherBalanceText.text = "Loading Balance..."; 321 | CustomTokenBalanceText.text = ""; 322 | 323 | yield return 0; // allow UI to update 324 | 325 | var getBalanceRequest = new EthGetBalanceUnityRequest(networkUrl); 326 | string etherBalance; 327 | string customTokenBalance; 328 | 329 | yield return getBalanceRequest.SendRequest(address, BlockParameter.CreateLatest()); 330 | if (getBalanceRequest.Exception == null) 331 | { 332 | etherBalance = UnitConversion.Convert.FromWei(getBalanceRequest.Result.Value).ToString(); 333 | } 334 | else 335 | { 336 | throw new System.InvalidOperationException("Get balance request failed"); 337 | } 338 | 339 | var tokenBalanceRequest = new EthCallUnityRequest(networkUrl); 340 | 341 | // get custom token balance (uint 256) 342 | yield return tokenBalanceRequest.SendRequest(TokenContractService.Instance.CreateCallInput("balanceOf", address), 343 | BlockParameter.CreateLatest()); 344 | 345 | customTokenBalance = UnitConversion.Convert.FromWei( 346 | TokenContractService.Instance.DecodeVariable("balanceOf", tokenBalanceRequest.Result), 347 | TokenContractService.Instance.TokenInfo.decimals).ToString(); 348 | 349 | EtherBalanceText.text = "ETH: " + etherBalance; 350 | CustomTokenBalanceText.text = TokenContractService.Instance.TokenInfo.symbol + ": " + customTokenBalance; 351 | } 352 | 353 | // We create the function which will check the balance of the address and return a callback with a decimal variable 354 | public IEnumerator CreateAccountCoroutine(string password, string accountName) 355 | { 356 | yield return 0; // allow UI to update 357 | 358 | CreateAccount(password, (address, encryptedJson, privateKey) => 359 | { 360 | // We just print the address and the encrypted json we just created 361 | Debug.Log(address); 362 | Debug.Log(encryptedJson); 363 | 364 | WalletData w = new WalletData(); 365 | w.name = accountName; 366 | w.address = address; 367 | w.cachedPassword = password; 368 | w.encryptedJson = encryptedJson; 369 | w.privateKey = privateKey; 370 | 371 | walletList.Add(w); 372 | 373 | newAccountAdded.Invoke(); 374 | loadingFinished.Invoke(); 375 | }); 376 | } 377 | 378 | // This function will just execute a callback after it creates and encrypt a new account 379 | public void CreateAccount(string password, System.Action callback) 380 | { 381 | // We use the Nethereum.Signer to generate a new secret key 382 | var ecKey = Nethereum.Signer.EthECKey.GenerateKey(); 383 | 384 | // After creating the secret key, we can get the public address and the private key with 385 | // ecKey.GetPublicAddress() and ecKey.GetPrivateKeyAsBytes() 386 | // (so it return it as bytes to be encrypted) 387 | var address = ecKey.GetPublicAddress(); 388 | var privateKeyBytes = ecKey.GetPrivateKeyAsBytes(); 389 | var privateKey = ecKey.GetPrivateKey(); 390 | 391 | // Then we define a new KeyStore service 392 | var keystoreservice = new Nethereum.KeyStore.KeyStoreService(); 393 | 394 | // And we can proceed to define encryptedJson with EncryptAndGenerateDefaultKeyStoreAsJson(), 395 | // and send it the password, the private key and the address to be encrypted. 396 | var encryptedJson = keystoreservice.EncryptAndGenerateDefaultKeyStoreAsJson(password, privateKeyBytes, address); 397 | // Finally we execute the callback and return our public address and the encrypted json. 398 | // (you will only be able to decrypt the json with the password used to encrypt it) 399 | callback(address, encryptedJson, privateKey); 400 | } 401 | 402 | public WalletData GetSelectedWalletData() 403 | { 404 | int index = walletSelectionDropdown.value; 405 | 406 | if (index >= walletSelectionDropdown.options.Count - 1) 407 | return null; 408 | 409 | else 410 | return walletList[index]; 411 | 412 | } 413 | 414 | 415 | 416 | } 417 | -------------------------------------------------------------------------------- /Assets/Scripts/WalletManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b006e300a4330404b9ed769d2d6716eb 3 | timeCreated: 1510209029 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 0 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | m_CollabEditorSettings: 16 | inProgressEnabled: 1 17 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 42 | type: 0} 43 | m_CustomRenderPipeline: {fileID: 0} 44 | m_TransparencySortMode: 0 45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 46 | m_DefaultRenderingPath: 1 47 | m_DefaultMobileRenderingPath: 1 48 | m_TierSettings: [] 49 | m_LightmapStripping: 0 50 | m_FogStripping: 0 51 | m_InstancingStripping: 0 52 | m_LightmapKeepPlain: 1 53 | m_LightmapKeepDirCombined: 1 54 | m_LightmapKeepDynamicPlain: 1 55 | m_LightmapKeepDynamicDirCombined: 1 56 | m_LightmapKeepShadowMask: 1 57 | m_LightmapKeepSubtractive: 1 58 | m_FogKeepLinear: 1 59 | m_FogKeepExp: 1 60 | m_FogKeepExp2: 1 61 | m_AlbedoSwatchInfos: [] 62 | m_LightsUseLinearIntensity: 0 63 | m_LightsUseColorTemperature: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | m_SettingNames: 89 | - Humanoid 90 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AlwaysShowColliders: 0 28 | m_ShowColliderSleep: 1 29 | m_ShowColliderContacts: 0 30 | m_ShowColliderAABB: 0 31 | m_ContactArrowScale: 0.2 32 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 33 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 34 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 35 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 36 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 37 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | productGUID: d404410d95445de4b809733c8b2d91db 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 4 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: polats 14 | productName: unity3d-blockchain-wallet 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 18 | m_ShowUnitySplashScreen: 1 19 | m_ShowUnitySplashLogo: 1 20 | m_SplashScreenOverlayOpacity: 1 21 | m_SplashScreenAnimation: 1 22 | m_SplashScreenLogoStyle: 1 23 | m_SplashScreenDrawMode: 0 24 | m_SplashScreenBackgroundAnimationZoom: 1 25 | m_SplashScreenLogoAnimationZoom: 1 26 | m_SplashScreenBackgroundLandscapeAspect: 1 27 | m_SplashScreenBackgroundPortraitAspect: 1 28 | m_SplashScreenBackgroundLandscapeUvs: 29 | serializedVersion: 2 30 | x: 0 31 | y: 0 32 | width: 1 33 | height: 1 34 | m_SplashScreenBackgroundPortraitUvs: 35 | serializedVersion: 2 36 | x: 0 37 | y: 0 38 | width: 1 39 | height: 1 40 | m_SplashScreenLogos: [] 41 | m_SplashScreenBackgroundLandscape: {fileID: 0} 42 | m_SplashScreenBackgroundPortrait: {fileID: 0} 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_MobileMTRendering: 0 53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 54 | iosShowActivityIndicatorOnLoading: -1 55 | androidShowActivityIndicatorOnLoading: -1 56 | tizenShowActivityIndicatorOnLoading: -1 57 | iosAppInBackgroundBehavior: 0 58 | displayResolutionDialog: 1 59 | iosAllowHTTPDownload: 1 60 | allowedAutorotateToPortrait: 1 61 | allowedAutorotateToPortraitUpsideDown: 1 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | disableDepthAndStencilBuffers: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 0 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 1 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | n3dsDisableStereoscopicView: 0 99 | n3dsEnableSharedListOpt: 1 100 | n3dsEnableVSync: 0 101 | ignoreAlphaClear: 0 102 | xboxOneResolution: 0 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | videoMemoryForVertexBuffers: 0 107 | psp2PowerMode: 0 108 | psp2AcquireBGM: 1 109 | wiiUTVResolution: 0 110 | wiiUGamePadMSAA: 1 111 | wiiUSupportsNunchuk: 0 112 | wiiUSupportsClassicController: 0 113 | wiiUSupportsBalanceBoard: 0 114 | wiiUSupportsMotionPlus: 0 115 | wiiUSupportsProController: 0 116 | wiiUAllowScreenCapture: 1 117 | wiiUControllerCount: 0 118 | m_SupportedAspectRatios: 119 | 4:3: 1 120 | 5:4: 1 121 | 16:10: 1 122 | 16:9: 1 123 | Others: 1 124 | bundleVersion: 1.0 125 | preloadedAssets: [] 126 | metroInputSource: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | hololens: 138 | depthFormat: 1 139 | protectGraphicsMemory: 0 140 | useHDRDisplay: 0 141 | targetPixelDensity: 0 142 | resolutionScalingMode: 0 143 | applicationIdentifier: 144 | Android: com.polats.ethwallet 145 | buildNumber: {} 146 | AndroidBundleVersionCode: 1 147 | AndroidMinSdkVersion: 16 148 | AndroidTargetSdkVersion: 0 149 | AndroidPreferredInstallLocation: 1 150 | aotOptions: 151 | stripEngineCode: 1 152 | iPhoneStrippingLevel: 0 153 | iPhoneScriptCallOptimization: 0 154 | ForceInternetPermission: 0 155 | ForceSDCardPermission: 0 156 | CreateWallpaper: 0 157 | APKExpansionFiles: 0 158 | keepLoadedShadersAlive: 0 159 | StripUnusedMeshComponents: 0 160 | VertexChannelCompressionMask: 161 | serializedVersion: 2 162 | m_Bits: 238 163 | iPhoneSdkVersion: 988 164 | iOSTargetOSVersionString: 165 | tvOSSdkVersion: 0 166 | tvOSRequireExtendedGameController: 0 167 | tvOSTargetOSVersionString: 168 | uIPrerenderedIcon: 0 169 | uIRequiresPersistentWiFi: 0 170 | uIRequiresFullScreen: 1 171 | uIStatusBarHidden: 1 172 | uIExitOnSuspend: 0 173 | uIStatusBarStyle: 0 174 | iPhoneSplashScreen: {fileID: 0} 175 | iPhoneHighResSplashScreen: {fileID: 0} 176 | iPhoneTallHighResSplashScreen: {fileID: 0} 177 | iPhone47inSplashScreen: {fileID: 0} 178 | iPhone55inPortraitSplashScreen: {fileID: 0} 179 | iPhone55inLandscapeSplashScreen: {fileID: 0} 180 | iPadPortraitSplashScreen: {fileID: 0} 181 | iPadHighResPortraitSplashScreen: {fileID: 0} 182 | iPadLandscapeSplashScreen: {fileID: 0} 183 | iPadHighResLandscapeSplashScreen: {fileID: 0} 184 | appleTVSplashScreen: {fileID: 0} 185 | tvOSSmallIconLayers: [] 186 | tvOSLargeIconLayers: [] 187 | tvOSTopShelfImageLayers: [] 188 | tvOSTopShelfImageWideLayers: [] 189 | iOSLaunchScreenType: 0 190 | iOSLaunchScreenPortrait: {fileID: 0} 191 | iOSLaunchScreenLandscape: {fileID: 0} 192 | iOSLaunchScreenBackgroundColor: 193 | serializedVersion: 2 194 | rgba: 0 195 | iOSLaunchScreenFillPct: 100 196 | iOSLaunchScreenSize: 100 197 | iOSLaunchScreenCustomXibPath: 198 | iOSLaunchScreeniPadType: 0 199 | iOSLaunchScreeniPadImage: {fileID: 0} 200 | iOSLaunchScreeniPadBackgroundColor: 201 | serializedVersion: 2 202 | rgba: 0 203 | iOSLaunchScreeniPadFillPct: 100 204 | iOSLaunchScreeniPadSize: 100 205 | iOSLaunchScreeniPadCustomXibPath: 206 | iOSDeviceRequirements: [] 207 | iOSURLSchemes: [] 208 | iOSBackgroundModes: 0 209 | iOSMetalForceHardShadows: 0 210 | metalEditorSupport: 1 211 | metalAPIValidation: 1 212 | iOSRenderExtraFrameOnPause: 0 213 | appleDeveloperTeamID: 214 | iOSManualSigningProvisioningProfileID: 215 | tvOSManualSigningProvisioningProfileID: 216 | appleEnableAutomaticSigning: 0 217 | AndroidTargetDevice: 0 218 | AndroidSplashScreenScale: 0 219 | androidSplashScreen: {fileID: 0} 220 | AndroidKeystoreName: 221 | AndroidKeyaliasName: 222 | AndroidTVCompatibility: 1 223 | AndroidIsGame: 1 224 | androidEnableBanner: 1 225 | m_AndroidBanners: 226 | - width: 320 227 | height: 180 228 | banner: {fileID: 0} 229 | androidGamepadSupportLevel: 0 230 | resolutionDialogBanner: {fileID: 0} 231 | m_BuildTargetIcons: [] 232 | m_BuildTargetBatching: [] 233 | m_BuildTargetGraphicsAPIs: [] 234 | m_BuildTargetVRSettings: [] 235 | openGLRequireES31: 0 236 | openGLRequireES31AEP: 0 237 | webPlayerTemplate: APPLICATION:Default 238 | m_TemplateCustomTags: {} 239 | wiiUTitleID: 0005000011000000 240 | wiiUGroupID: 00010000 241 | wiiUCommonSaveSize: 4096 242 | wiiUAccountSaveSize: 2048 243 | wiiUOlvAccessKey: 0 244 | wiiUTinCode: 0 245 | wiiUJoinGameId: 0 246 | wiiUJoinGameModeMask: 0000000000000000 247 | wiiUCommonBossSize: 0 248 | wiiUAccountBossSize: 0 249 | wiiUAddOnUniqueIDs: [] 250 | wiiUMainThreadStackSize: 3072 251 | wiiULoaderThreadStackSize: 1024 252 | wiiUSystemHeapSize: 128 253 | wiiUTVStartupScreen: {fileID: 0} 254 | wiiUGamePadStartupScreen: {fileID: 0} 255 | wiiUDrcBufferDisabled: 0 256 | wiiUProfilerLibPath: 257 | playModeTestRunnerEnabled: 0 258 | actionOnDotNetUnhandledException: 1 259 | enableInternalProfiler: 0 260 | logObjCUncaughtExceptions: 1 261 | enableCrashReportAPI: 0 262 | cameraUsageDescription: 263 | locationUsageDescription: 264 | microphoneUsageDescription: 265 | switchNetLibKey: 266 | switchSocketMemoryPoolSize: 6144 267 | switchSocketAllocatorPoolSize: 128 268 | switchSocketConcurrencyLimit: 14 269 | switchScreenResolutionBehavior: 2 270 | switchUseCPUProfiler: 0 271 | switchApplicationID: 0x01004b9000490000 272 | switchNSODependencies: 273 | switchTitleNames_0: 274 | switchTitleNames_1: 275 | switchTitleNames_2: 276 | switchTitleNames_3: 277 | switchTitleNames_4: 278 | switchTitleNames_5: 279 | switchTitleNames_6: 280 | switchTitleNames_7: 281 | switchTitleNames_8: 282 | switchTitleNames_9: 283 | switchTitleNames_10: 284 | switchTitleNames_11: 285 | switchPublisherNames_0: 286 | switchPublisherNames_1: 287 | switchPublisherNames_2: 288 | switchPublisherNames_3: 289 | switchPublisherNames_4: 290 | switchPublisherNames_5: 291 | switchPublisherNames_6: 292 | switchPublisherNames_7: 293 | switchPublisherNames_8: 294 | switchPublisherNames_9: 295 | switchPublisherNames_10: 296 | switchPublisherNames_11: 297 | switchIcons_0: {fileID: 0} 298 | switchIcons_1: {fileID: 0} 299 | switchIcons_2: {fileID: 0} 300 | switchIcons_3: {fileID: 0} 301 | switchIcons_4: {fileID: 0} 302 | switchIcons_5: {fileID: 0} 303 | switchIcons_6: {fileID: 0} 304 | switchIcons_7: {fileID: 0} 305 | switchIcons_8: {fileID: 0} 306 | switchIcons_9: {fileID: 0} 307 | switchIcons_10: {fileID: 0} 308 | switchIcons_11: {fileID: 0} 309 | switchSmallIcons_0: {fileID: 0} 310 | switchSmallIcons_1: {fileID: 0} 311 | switchSmallIcons_2: {fileID: 0} 312 | switchSmallIcons_3: {fileID: 0} 313 | switchSmallIcons_4: {fileID: 0} 314 | switchSmallIcons_5: {fileID: 0} 315 | switchSmallIcons_6: {fileID: 0} 316 | switchSmallIcons_7: {fileID: 0} 317 | switchSmallIcons_8: {fileID: 0} 318 | switchSmallIcons_9: {fileID: 0} 319 | switchSmallIcons_10: {fileID: 0} 320 | switchSmallIcons_11: {fileID: 0} 321 | switchManualHTML: 322 | switchAccessibleURLs: 323 | switchLegalInformation: 324 | switchMainThreadStackSize: 1048576 325 | switchPresenceGroupId: 326 | switchLogoHandling: 0 327 | switchReleaseVersion: 0 328 | switchDisplayVersion: 1.0.0 329 | switchStartupUserAccount: 0 330 | switchTouchScreenUsage: 0 331 | switchSupportedLanguagesMask: 0 332 | switchLogoType: 0 333 | switchApplicationErrorCodeCategory: 334 | switchUserAccountSaveDataSize: 0 335 | switchUserAccountSaveDataJournalSize: 0 336 | switchApplicationAttribute: 0 337 | switchCardSpecSize: -1 338 | switchCardSpecClock: -1 339 | switchRatingsMask: 0 340 | switchRatingsInt_0: 0 341 | switchRatingsInt_1: 0 342 | switchRatingsInt_2: 0 343 | switchRatingsInt_3: 0 344 | switchRatingsInt_4: 0 345 | switchRatingsInt_5: 0 346 | switchRatingsInt_6: 0 347 | switchRatingsInt_7: 0 348 | switchRatingsInt_8: 0 349 | switchRatingsInt_9: 0 350 | switchRatingsInt_10: 0 351 | switchRatingsInt_11: 0 352 | switchLocalCommunicationIds_0: 353 | switchLocalCommunicationIds_1: 354 | switchLocalCommunicationIds_2: 355 | switchLocalCommunicationIds_3: 356 | switchLocalCommunicationIds_4: 357 | switchLocalCommunicationIds_5: 358 | switchLocalCommunicationIds_6: 359 | switchLocalCommunicationIds_7: 360 | switchParentalControl: 0 361 | switchAllowsScreenshot: 1 362 | switchDataLossConfirmation: 0 363 | switchSupportedNpadStyles: 3 364 | switchSocketConfigEnabled: 0 365 | switchTcpInitialSendBufferSize: 32 366 | switchTcpInitialReceiveBufferSize: 64 367 | switchTcpAutoSendBufferSizeMax: 256 368 | switchTcpAutoReceiveBufferSizeMax: 256 369 | switchUdpSendBufferSize: 9 370 | switchUdpReceiveBufferSize: 42 371 | switchSocketBufferEfficiency: 4 372 | switchSocketInitializeEnabled: 1 373 | switchNetworkInterfaceManagerInitializeEnabled: 1 374 | switchPlayerConnectionEnabled: 1 375 | ps4NPAgeRating: 12 376 | ps4NPTitleSecret: 377 | ps4NPTrophyPackPath: 378 | ps4ParentalLevel: 11 379 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 380 | ps4Category: 0 381 | ps4MasterVersion: 01.00 382 | ps4AppVersion: 01.00 383 | ps4AppType: 0 384 | ps4ParamSfxPath: 385 | ps4VideoOutPixelFormat: 0 386 | ps4VideoOutInitialWidth: 1920 387 | ps4VideoOutBaseModeInitialWidth: 1920 388 | ps4VideoOutReprojectionRate: 120 389 | ps4PronunciationXMLPath: 390 | ps4PronunciationSIGPath: 391 | ps4BackgroundImagePath: 392 | ps4StartupImagePath: 393 | ps4SaveDataImagePath: 394 | ps4SdkOverride: 395 | ps4BGMPath: 396 | ps4ShareFilePath: 397 | ps4ShareOverlayImagePath: 398 | ps4PrivacyGuardImagePath: 399 | ps4NPtitleDatPath: 400 | ps4RemotePlayKeyAssignment: -1 401 | ps4RemotePlayKeyMappingDir: 402 | ps4PlayTogetherPlayerCount: 0 403 | ps4EnterButtonAssignment: 1 404 | ps4ApplicationParam1: 0 405 | ps4ApplicationParam2: 0 406 | ps4ApplicationParam3: 0 407 | ps4ApplicationParam4: 0 408 | ps4DownloadDataSize: 0 409 | ps4GarlicHeapSize: 2048 410 | ps4ProGarlicHeapSize: 2560 411 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 412 | ps4pnSessions: 1 413 | ps4pnPresence: 1 414 | ps4pnFriends: 1 415 | ps4pnGameCustomData: 1 416 | playerPrefsSupport: 0 417 | restrictedAudioUsageRights: 0 418 | ps4UseResolutionFallback: 0 419 | ps4ReprojectionSupport: 0 420 | ps4UseAudio3dBackend: 0 421 | ps4SocialScreenEnabled: 0 422 | ps4ScriptOptimizationLevel: 0 423 | ps4Audio3dVirtualSpeakerCount: 14 424 | ps4attribCpuUsage: 0 425 | ps4PatchPkgPath: 426 | ps4PatchLatestPkgPath: 427 | ps4PatchChangeinfoPath: 428 | ps4PatchDayOne: 0 429 | ps4attribUserManagement: 0 430 | ps4attribMoveSupport: 0 431 | ps4attrib3DSupport: 0 432 | ps4attribShareSupport: 0 433 | ps4attribExclusiveVR: 0 434 | ps4disableAutoHideSplash: 0 435 | ps4videoRecordingFeaturesUsed: 0 436 | ps4contentSearchFeaturesUsed: 0 437 | ps4attribEyeToEyeDistanceSettingVR: 0 438 | ps4IncludedModules: [] 439 | monoEnv: 440 | psp2Splashimage: {fileID: 0} 441 | psp2NPTrophyPackPath: 442 | psp2NPSupportGBMorGJP: 0 443 | psp2NPAgeRating: 12 444 | psp2NPTitleDatPath: 445 | psp2NPCommsID: 446 | psp2NPCommunicationsID: 447 | psp2NPCommsPassphrase: 448 | psp2NPCommsSig: 449 | psp2ParamSfxPath: 450 | psp2ManualPath: 451 | psp2LiveAreaGatePath: 452 | psp2LiveAreaBackroundPath: 453 | psp2LiveAreaPath: 454 | psp2LiveAreaTrialPath: 455 | psp2PatchChangeInfoPath: 456 | psp2PatchOriginalPackage: 457 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 458 | psp2KeystoneFile: 459 | psp2MemoryExpansionMode: 0 460 | psp2DRMType: 0 461 | psp2StorageType: 0 462 | psp2MediaCapacity: 0 463 | psp2DLCConfigPath: 464 | psp2ThumbnailPath: 465 | psp2BackgroundPath: 466 | psp2SoundPath: 467 | psp2TrophyCommId: 468 | psp2TrophyPackagePath: 469 | psp2PackagedResourcesPath: 470 | psp2SaveDataQuota: 10240 471 | psp2ParentalLevel: 1 472 | psp2ShortTitle: Not Set 473 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 474 | psp2Category: 0 475 | psp2MasterVersion: 01.00 476 | psp2AppVersion: 01.00 477 | psp2TVBootMode: 0 478 | psp2EnterButtonAssignment: 2 479 | psp2TVDisableEmu: 0 480 | psp2AllowTwitterDialog: 1 481 | psp2Upgradable: 0 482 | psp2HealthWarning: 0 483 | psp2UseLibLocation: 0 484 | psp2InfoBarOnStartup: 0 485 | psp2InfoBarColor: 0 486 | psp2ScriptOptimizationLevel: 0 487 | psmSplashimage: {fileID: 0} 488 | splashScreenBackgroundSourceLandscape: {fileID: 0} 489 | splashScreenBackgroundSourcePortrait: {fileID: 0} 490 | spritePackerPolicy: 491 | webGLMemorySize: 256 492 | webGLExceptionSupport: 1 493 | webGLNameFilesAsHashes: 0 494 | webGLDataCaching: 0 495 | webGLDebugSymbols: 0 496 | webGLEmscriptenArgs: 497 | webGLModulesDirectory: 498 | webGLTemplate: APPLICATION:Default 499 | webGLAnalyzeBuildSize: 0 500 | webGLUseEmbeddedResources: 0 501 | webGLUseWasm: 0 502 | webGLCompressionFormat: 1 503 | scriptingDefineSymbols: {} 504 | platformArchitecture: {} 505 | scriptingBackend: {} 506 | incrementalIl2cppBuild: {} 507 | additionalIl2CppArgs: 508 | scriptingRuntimeVersion: 0 509 | apiCompatibilityLevelPerPlatform: {} 510 | m_RenderingPath: 1 511 | m_MobileRenderingPath: 1 512 | metroPackageName: DIG 513 | metroPackageVersion: 514 | metroCertificatePath: 515 | metroCertificatePassword: 516 | metroCertificateSubject: 517 | metroCertificateIssuer: 518 | metroCertificateNotAfter: 0000000000000000 519 | metroApplicationDescription: DIG 520 | wsaImages: {} 521 | metroTileShortName: 522 | metroCommandLineArgsFile: 523 | metroTileShowName: 0 524 | metroMediumTileShowName: 0 525 | metroLargeTileShowName: 0 526 | metroWideTileShowName: 0 527 | metroDefaultTileSize: 1 528 | metroTileForegroundText: 2 529 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 530 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 531 | a: 1} 532 | metroSplashScreenUseBackgroundColor: 0 533 | platformCapabilities: {} 534 | metroFTAName: 535 | metroFTAFileTypes: [] 536 | metroProtocolName: 537 | metroCompilationOverrides: 1 538 | tizenProductDescription: 539 | tizenProductURL: 540 | tizenSigningProfileName: 541 | tizenGPSPermissions: 0 542 | tizenMicrophonePermissions: 0 543 | tizenDeploymentTarget: 544 | tizenDeploymentTargetType: -1 545 | tizenMinOSVersion: 1 546 | n3dsUseExtSaveData: 0 547 | n3dsCompressStaticMem: 1 548 | n3dsExtSaveDataNumber: 0x12345 549 | n3dsStackSize: 131072 550 | n3dsTargetPlatform: 2 551 | n3dsRegion: 7 552 | n3dsMediaSize: 0 553 | n3dsLogoStyle: 3 554 | n3dsTitle: GameName 555 | n3dsProductCode: 556 | n3dsApplicationId: 0xFF3FF 557 | stvDeviceAddress: 558 | stvProductDescription: 559 | stvProductAuthor: 560 | stvProductAuthorEmail: 561 | stvProductLink: 562 | stvProductCategory: 0 563 | XboxOneProductId: 564 | XboxOneUpdateKey: 565 | XboxOneSandboxId: 566 | XboxOneContentId: 567 | XboxOneTitleId: 568 | XboxOneSCId: 569 | XboxOneGameOsOverridePath: 570 | XboxOnePackagingOverridePath: 571 | XboxOneAppManifestOverridePath: 572 | XboxOnePackageEncryption: 0 573 | XboxOnePackageUpdateGranularity: 2 574 | XboxOneDescription: 575 | XboxOneLanguage: 576 | - enus 577 | XboxOneCapability: [] 578 | XboxOneGameRating: {} 579 | XboxOneIsContentPackage: 0 580 | XboxOneEnableGPUVariability: 0 581 | XboxOneSockets: {} 582 | XboxOneSplashScreen: {fileID: 0} 583 | XboxOneAllowedProductIds: [] 584 | XboxOnePersistentLocalStorageSize: 0 585 | xboxOneScriptCompiler: 0 586 | vrEditorSettings: 587 | daydream: 588 | daydreamIconForeground: {fileID: 0} 589 | daydreamIconBackground: {fileID: 0} 590 | cloudServicesEnabled: {} 591 | facebookSdkVersion: 7.9.4 592 | apiCompatibilityLevel: 2 593 | cloudProjectId: da388d3c-14b4-4ba7-8687-31884d6c8f55 594 | projectName: DIG 595 | organizationId: polats 596 | cloudEnabled: 0 597 | enableNativePlatformBackendsForNewInputSystem: 0 598 | disableOldInputManagerSupport: 0 599 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.1f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Samsung TV: 2 185 | Standalone: 5 186 | Tizen: 2 187 | Web: 5 188 | WebGL: 3 189 | WiiU: 5 190 | Windows Store Apps: 5 191 | XboxOne: 5 192 | iPhone: 2 193 | tvOS: 2 194 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 0 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # unity3d-blockchain-wallet 2 | 3 | Create wallets and perform transactions on custom ERC20 tokens via Unity3D 4 | 5 | ## Getting Started 6 | 7 | https://medium.com/@polats/lets-build-a-decentralized-game-economy-using-blockchains-cf0a80e43da1 8 | -------------------------------------------------------------------------------- /Solidity/playerscore.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.10 2 | 3 | contract PlayerScore { 4 | 5 | uint maxTopScores = 5; 6 | address owner; 7 | 8 | struct TopScore{ 9 | address addr; 10 | int score; 11 | } 12 | 13 | function PlayerScore(){ 14 | owner = msg.sender; 15 | } 16 | 17 | TopScore[] public topScores; 18 | 19 | mapping (address=>int) public userTopScores; 20 | 21 | function setTopScore(int256 score, uint8 v, bytes32 r, bytes32 s) { 22 | var hash = sha3(msg.sender, owner, score); 23 | var addressCheck = ecrecover(hash, v, r, s); 24 | 25 | if(addressCheck != owner) throw; 26 | 27 | var currentTopScore = userTopScores[msg.sender]; 28 | if(currentTopScore < score){ 29 | userTopScores[msg.sender] = score; 30 | } 31 | 32 | if(topScores.length < maxTopScores){ 33 | var topScore = TopScore(msg.sender, score); 34 | topScores.push(topScore); 35 | }else{ 36 | int lowestScore = 0; 37 | uint lowestScoreIndex = 0; 38 | for (uint i = 0; i < topScores.length; i++) 39 | { 40 | TopScore currentScore = topScores[i]; 41 | if(i == 0){ 42 | lowestScore = currentScore.score; 43 | lowestScoreIndex = i; 44 | }else{ 45 | if(lowestScore > currentScore.score){ 46 | lowestScore = currentScore.score; 47 | lowestScoreIndex = i; 48 | } 49 | } 50 | } 51 | if(score > lowestScore){ 52 | var newtopScore = TopScore(msg.sender, score); 53 | topScores[lowestScoreIndex] = newtopScore; 54 | } 55 | } 56 | } 57 | 58 | function getCountTopScores() returns(uint) { 59 | return topScores.length; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Solidity/token.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.16; 2 | 3 | interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } 4 | 5 | contract TokenERC20 { 6 | // Public variables of the token 7 | string public name; 8 | string public symbol; 9 | uint8 public decimals = 18; 10 | // 18 decimals is the strongly suggested default, avoid changing it 11 | uint256 public totalSupply; 12 | 13 | // This creates an array with all balances 14 | mapping (address => uint256) public balanceOf; 15 | mapping (address => mapping (address => uint256)) public allowance; 16 | 17 | // This generates a public event on the blockchain that will notify clients 18 | event Transfer(address indexed from, address indexed to, uint256 value); 19 | 20 | // This notifies clients about the amount burnt 21 | event Burn(address indexed from, uint256 value); 22 | 23 | /** 24 | * Constrctor function 25 | * 26 | * Initializes contract with initial supply tokens to the creator of the contract 27 | */ 28 | function TokenERC20( 29 | uint256 initialSupply, 30 | string tokenName, 31 | string tokenSymbol 32 | ) public { 33 | totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount 34 | balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens 35 | name = tokenName; // Set the name for display purposes 36 | symbol = tokenSymbol; // Set the symbol for display purposes 37 | } 38 | 39 | /** 40 | * Internal transfer, only can be called by this contract 41 | */ 42 | function _transfer(address _from, address _to, uint _value) internal { 43 | // Prevent transfer to 0x0 address. Use burn() instead 44 | require(_to != 0x0); 45 | // Check if the sender has enough 46 | require(balanceOf[_from] >= _value); 47 | // Check for overflows 48 | require(balanceOf[_to] + _value > balanceOf[_to]); 49 | // Save this for an assertion in the future 50 | uint previousBalances = balanceOf[_from] + balanceOf[_to]; 51 | // Subtract from the sender 52 | balanceOf[_from] -= _value; 53 | // Add the same to the recipient 54 | balanceOf[_to] += _value; 55 | Transfer(_from, _to, _value); 56 | // Asserts are used to use static analysis to find bugs in your code. They should never fail 57 | assert(balanceOf[_from] + balanceOf[_to] == previousBalances); 58 | } 59 | 60 | /** 61 | * Transfer tokens 62 | * 63 | * Send `_value` tokens to `_to` from your account 64 | * 65 | * @param _to The address of the recipient 66 | * @param _value the amount to send 67 | */ 68 | function transfer(address _to, uint256 _value) public { 69 | _transfer(msg.sender, _to, _value); 70 | } 71 | 72 | /** 73 | * Transfer tokens from other address 74 | * 75 | * Send `_value` tokens to `_to` in behalf of `_from` 76 | * 77 | * @param _from The address of the sender 78 | * @param _to The address of the recipient 79 | * @param _value the amount to send 80 | */ 81 | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { 82 | require(_value <= allowance[_from][msg.sender]); // Check allowance 83 | allowance[_from][msg.sender] -= _value; 84 | _transfer(_from, _to, _value); 85 | return true; 86 | } 87 | 88 | /** 89 | * Set allowance for other address 90 | * 91 | * Allows `_spender` to spend no more than `_value` tokens in your behalf 92 | * 93 | * @param _spender The address authorized to spend 94 | * @param _value the max amount they can spend 95 | */ 96 | function approve(address _spender, uint256 _value) public 97 | returns (bool success) { 98 | allowance[msg.sender][_spender] = _value; 99 | return true; 100 | } 101 | 102 | /** 103 | * Set allowance for other address and notify 104 | * 105 | * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it 106 | * 107 | * @param _spender The address authorized to spend 108 | * @param _value the max amount they can spend 109 | * @param _extraData some extra information to send to the approved contract 110 | */ 111 | function approveAndCall(address _spender, uint256 _value, bytes _extraData) 112 | public 113 | returns (bool success) { 114 | tokenRecipient spender = tokenRecipient(_spender); 115 | if (approve(_spender, _value)) { 116 | spender.receiveApproval(msg.sender, _value, this, _extraData); 117 | return true; 118 | } 119 | } 120 | 121 | /** 122 | * Destroy tokens 123 | * 124 | * Remove `_value` tokens from the system irreversibly 125 | * 126 | * @param _value the amount of money to burn 127 | */ 128 | function burn(uint256 _value) public returns (bool success) { 129 | require(balanceOf[msg.sender] >= _value); // Check if the sender has enough 130 | balanceOf[msg.sender] -= _value; // Subtract from the sender 131 | totalSupply -= _value; // Updates totalSupply 132 | Burn(msg.sender, _value); 133 | return true; 134 | } 135 | 136 | /** 137 | * Destroy tokens from other account 138 | * 139 | * Remove `_value` tokens from the system irreversibly on behalf of `_from`. 140 | * 141 | * @param _from the address of the sender 142 | * @param _value the amount of money to burn 143 | */ 144 | function burnFrom(address _from, uint256 _value) public returns (bool success) { 145 | require(balanceOf[_from] >= _value); // Check if the targeted balance is enough 146 | require(_value <= allowance[_from][msg.sender]); // Check allowance 147 | balanceOf[_from] -= _value; // Subtract from the targeted balance 148 | allowance[_from][msg.sender] -= _value; // Subtract from the sender's allowance 149 | totalSupply -= _value; // Update totalSupply 150 | Burn(_from, _value); 151 | return true; 152 | } 153 | } 154 | --------------------------------------------------------------------------------