├── .gitignore
├── Packages
└── manifest.json
├── ProjectSettings
├── ProjectVersion.txt
├── ClusterInputManager.asset
├── PresetManager.asset
├── EditorBuildSettings.asset
├── NetworkManager.asset
├── TimeManager.asset
├── AudioManager.asset
├── EditorSettings.asset
├── TagManager.asset
├── DynamicsManager.asset
├── UnityConnectSettings.asset
├── Physics2DSettings.asset
├── NavMeshAreas.asset
├── GraphicsSettings.asset
├── QualitySettings.asset
├── InputManager.asset
└── ProjectSettings.asset
├── .gitattributes
├── Assets
├── Plugins
│ ├── UnityEngine.dll
│ ├── Nethereum.ABI.dll
│ ├── Nethereum.Hex.dll
│ ├── Nethereum.RLP.dll
│ ├── Nethereum.RPC.dll
│ ├── Nethereum.Unity.dll
│ ├── Nethereum.Util.dll
│ ├── Newtonsoft.Json.dll
│ ├── Nethereum.Signer.dll
│ ├── System.Threading.dll
│ ├── BouncyCastle.Crypto.dll
│ ├── Nethereum.Contracts.dll
│ ├── Nethereum.KeyStore.dll
│ ├── Nethereum.JsonRpc.Client.dll
│ ├── Readme.txt
│ ├── Readme.txt.meta
│ ├── Nethereum.ABI.dll.meta
│ ├── Nethereum.Hex.dll.meta
│ ├── Nethereum.RLP.dll.meta
│ ├── Nethereum.RPC.dll.meta
│ ├── Nethereum.Util.dll.meta
│ ├── UnityEngine.dll.meta
│ ├── BouncyCastle.Crypto.dll.meta
│ ├── Nethereum.Contracts.dll.meta
│ ├── Nethereum.KeyStore.dll.meta
│ ├── Nethereum.Signer.dll.meta
│ ├── Nethereum.Unity.dll.meta
│ ├── Newtonsoft.Json.dll.meta
│ ├── System.Threading.dll.meta
│ └── Nethereum.JsonRpc.Client.dll.meta
├── game.unity.meta
├── link.xml.meta
├── Plugins.meta
├── EtherTransfer.cs.meta
├── TokenDeployAndSend.cs.meta
├── DecodeData.cs.meta
├── EtherTransfer.cs
├── link.xml
├── DecodeData.cs
├── TokenDeployAndSend.cs
└── game.unity
├── webgl
├── Build
│ ├── webgl.data.unityweb
│ ├── webgl.asm.code.unityweb
│ ├── webgl.asm.memory.unityweb
│ ├── webgl.asm.framework.unityweb
│ └── webgl.json
├── TemplateData
│ ├── favicon.ico
│ ├── fullscreen.png
│ ├── webgl-logo.png
│ ├── progressEmpty.Dark.png
│ ├── progressFull.Dark.png
│ ├── progressFull.Light.png
│ ├── progressLogo.Dark.png
│ ├── progressLogo.Light.png
│ ├── progressEmpty.Light.png
│ ├── UnityProgress.js
│ └── style.css
└── index.html
├── Unity3dSimpleSample.userprefs
├── UnityPlayground.sln
├── Unity3dSimpleSample.sln
├── LICENSE
├── Unity3dSimpleSample.csproj
├── UnityPlayground.csproj
├── Assembly-CSharp.csproj
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | Library/
2 | .git
3 | .vs
4 | Temp/
5 | obj/
6 |
7 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | }
4 | }
5 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.1.5f1
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/Assets/Plugins/UnityEngine.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/UnityEngine.dll
--------------------------------------------------------------------------------
/webgl/Build/webgl.data.unityweb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/Build/webgl.data.unityweb
--------------------------------------------------------------------------------
/webgl/TemplateData/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/favicon.ico
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.ABI.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.ABI.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Hex.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.Hex.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.RLP.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.RLP.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.RPC.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.RPC.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Unity.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.Unity.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Util.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.Util.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/webgl/TemplateData/fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/fullscreen.png
--------------------------------------------------------------------------------
/webgl/TemplateData/webgl-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/webgl-logo.png
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Signer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.Signer.dll
--------------------------------------------------------------------------------
/Assets/Plugins/System.Threading.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/System.Threading.dll
--------------------------------------------------------------------------------
/webgl/Build/webgl.asm.code.unityweb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/Build/webgl.asm.code.unityweb
--------------------------------------------------------------------------------
/Assets/Plugins/BouncyCastle.Crypto.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/BouncyCastle.Crypto.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Contracts.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.Contracts.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.KeyStore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.KeyStore.dll
--------------------------------------------------------------------------------
/webgl/Build/webgl.asm.memory.unityweb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/Build/webgl.asm.memory.unityweb
--------------------------------------------------------------------------------
/webgl/Build/webgl.asm.framework.unityweb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/Build/webgl.asm.framework.unityweb
--------------------------------------------------------------------------------
/webgl/TemplateData/progressEmpty.Dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/progressEmpty.Dark.png
--------------------------------------------------------------------------------
/webgl/TemplateData/progressFull.Dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/progressFull.Dark.png
--------------------------------------------------------------------------------
/webgl/TemplateData/progressFull.Light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/progressFull.Light.png
--------------------------------------------------------------------------------
/webgl/TemplateData/progressLogo.Dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/progressLogo.Dark.png
--------------------------------------------------------------------------------
/webgl/TemplateData/progressLogo.Light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/progressLogo.Light.png
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.JsonRpc.Client.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/Assets/Plugins/Nethereum.JsonRpc.Client.dll
--------------------------------------------------------------------------------
/webgl/TemplateData/progressEmpty.Light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nethereum/Unity3dSimpleSample/HEAD/webgl/TemplateData/progressEmpty.Light.png
--------------------------------------------------------------------------------
/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/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/Assets/Plugins/Readme.txt:
--------------------------------------------------------------------------------
1 | Compiled Nethereum libraries using net351, for compatibility with Unity3d
2 | Json.Net is the AOT version created by https://github.com/SaladLab/Json.Net.Unity3D
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Assets/Plugins/Readme.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53678c036752c9c4dbc9c5bc89042e33
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Assets/game.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6a4e4ecafe7cea648abb1acfa3e9ffd0
3 | timeCreated: 1513167252
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/link.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e445b6977a3dfc848bb5b963ed86c914
3 | timeCreated: 1513167498
4 | licenseType: Free
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eaf18b3371522fe48bcd4e7bc1b2d94d
3 | folderAsset: yes
4 | timeCreated: 1513016465
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Assets/EtherTransfer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14924ad7b5f0a99408770da10efa0dc7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/TokenDeployAndSend.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 779b8e6b255570647b4477b906256bba
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecodeData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 09c94c07340d4ab49ae06865b2dda57c
3 | timeCreated: 1513016635
4 | licenseType: Free
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 |
--------------------------------------------------------------------------------
/webgl/Build/webgl.json:
--------------------------------------------------------------------------------
1 | {
2 | "companyName": "DefaultCompany",
3 | "productName": "UnityPlayground",
4 | "dataUrl": "webgl.data.unityweb",
5 | "asmCodeUrl": "webgl.asm.code.unityweb",
6 | "asmMemoryUrl": "webgl.asm.memory.unityweb",
7 | "asmFrameworkUrl": "webgl.asm.framework.unityweb",
8 | "TOTAL_MEMORY": 268435456,
9 | "graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
10 | "webglContextAttributes": {"preserveDrawingBuffer": false},
11 | "splashScreenStyle": "Dark",
12 | "backgroundColor": "#231F20"
13 | }
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/Unity3dSimpleSample.userprefs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.ABI.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 77564a25308d6364e808b8d7fc597bd4
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Hex.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3492ce7b583201c4db673a20d4b1a9ed
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.RLP.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e478c4446afa6b84aba57fac670769ed
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.RPC.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 778984213b22025478766536a846570c
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Util.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d93149b8ad5c29d4a92911b0f2a1e0e4
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/UnityEngine.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 15ced13f0c048cb47ac401160b2c4e18
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/BouncyCastle.Crypto.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed2cdabaedf7c4648b344c8e9bfa4e56
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Contracts.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82eef48a38db3af4489d232fef3f49bc
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.KeyStore.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b45a6b7696b6794eb31d6c630f218a1
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Signer.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c7457bfa6ee6bc438a549976d7bed90
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.Unity.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cd3006f37ae1d2c4995ebf56f2b52fba
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3caf0568d916d614491ca7fbabd061f0
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/System.Threading.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ece49714ab0c9e04ea2798d0a341f1f5
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/Assets/Plugins/Nethereum.JsonRpc.Client.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 31ae22d50aa0f674593a300b8adc5ab0
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | - first:
12 | Any:
13 | second:
14 | enabled: 1
15 | settings: {}
16 | - first:
17 | Editor: Editor
18 | second:
19 | enabled: 0
20 | settings:
21 | DefaultValueInitialized: true
22 | - first:
23 | Windows Store Apps: WindowsStoreApps
24 | second:
25 | enabled: 0
26 | settings:
27 | CPU: AnyCPU
28 | userData:
29 | assetBundleName:
30 | assetBundleVariant:
31 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/UnityPlayground.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2017
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityPlayground", "UnityPlayground.csproj", "{D8254C25-9761-6291-5523-B4FFD464F6FD}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {D8254C25-9761-6291-5523-B4FFD464F6FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {D8254C25-9761-6291-5523-B4FFD464F6FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {D8254C25-9761-6291-5523-B4FFD464F6FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {D8254C25-9761-6291-5523-B4FFD464F6FD}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/Unity3dSimpleSample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity3dSimpleSample", "Assembly-CSharp.csproj", "{2FA37BE5-A4EE-657C-EB28-D654764213E4}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2FA37BE5-A4EE-657C-EB28-D654764213E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {2FA37BE5-A4EE-657C-EB28-D654764213E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {2FA37BE5-A4EE-657C-EB28-D654764213E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {2FA37BE5-A4EE-657C-EB28-D654764213E4}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/webgl/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Unity WebGL Player | UnityPlayground
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Juan Blanco
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/webgl/TemplateData/UnityProgress.js:
--------------------------------------------------------------------------------
1 | function UnityProgress(gameInstance, progress) {
2 | if (!gameInstance.Module)
3 | return;
4 | if (!gameInstance.logo) {
5 | gameInstance.logo = document.createElement("div");
6 | gameInstance.logo.className = "logo " + gameInstance.Module.splashScreenStyle;
7 | gameInstance.container.appendChild(gameInstance.logo);
8 | }
9 | if (!gameInstance.progress) {
10 | gameInstance.progress = document.createElement("div");
11 | gameInstance.progress.className = "progress " + gameInstance.Module.splashScreenStyle;
12 | gameInstance.progress.empty = document.createElement("div");
13 | gameInstance.progress.empty.className = "empty";
14 | gameInstance.progress.appendChild(gameInstance.progress.empty);
15 | gameInstance.progress.full = document.createElement("div");
16 | gameInstance.progress.full.className = "full";
17 | gameInstance.progress.appendChild(gameInstance.progress.full);
18 | gameInstance.container.appendChild(gameInstance.progress);
19 | }
20 | gameInstance.progress.full.style.width = (100 * progress) + "%";
21 | gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
22 | if (progress == 1)
23 | gameInstance.logo.style.display = gameInstance.progress.style.display = "none";
24 | }
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/webgl/TemplateData/style.css:
--------------------------------------------------------------------------------
1 | .webgl-content * {border: 0; margin: 0; padding: 0}
2 | .webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
3 |
4 | .webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
5 | .webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
6 | .webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
7 | .webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
8 | .webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
9 |
10 | .webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
11 | .webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
12 | .webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
13 |
14 | .webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;}
15 | .webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
16 | .webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
17 | .webgl-content .footer .title {margin-right: 10px; float: right;}
18 | .webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}
--------------------------------------------------------------------------------
/Assets/EtherTransfer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Numerics;
4 | using System.Runtime.InteropServices;
5 | using Nethereum.ABI.FunctionEncoding.Attributes;
6 | using Nethereum.ABI.Model;
7 | using Nethereum.Contracts;
8 | using Nethereum.Contracts.CQS;
9 | using Nethereum.Contracts.Extensions;
10 | using Nethereum.JsonRpc.UnityClient;
11 | using Nethereum.RPC.Eth.DTOs;
12 | using Nethereum.Util;
13 | using UnityEngine;
14 |
15 | public class EtherTransfer : MonoBehaviour {
16 |
17 |
18 | // Use this for initialization
19 | void Start () {
20 |
21 | StartCoroutine(TransferEther());
22 | }
23 |
24 |
25 | //Sample of new features / requests
26 | public IEnumerator TransferEther()
27 | {
28 | var url = "http://localhost:8545";
29 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
30 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
31 | //initialising the transaction request sender
32 | var ethTransfer = new EthTransferUnityRequest(url, privateKey);
33 |
34 | var receivingAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";
35 | yield return ethTransfer.TransferEther("0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe", 1.1m, 2);
36 |
37 | if (ethTransfer.Exception != null)
38 | {
39 | Debug.Log(ethTransfer.Exception.Message);
40 | yield break;
41 | }
42 |
43 | var transactionHash = ethTransfer.Result;
44 |
45 | Debug.Log("Transfer transaction hash:" + transactionHash);
46 |
47 | //create a poll to get the receipt when mined
48 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
49 | //checking every 2 seconds for the receipt
50 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
51 |
52 | Debug.Log("Transaction mined");
53 |
54 | var balanceRequest = new EthGetBalanceUnityRequest(url);
55 | yield return balanceRequest.SendRequest(receivingAddress, BlockParameter.CreateLatest());
56 |
57 |
58 | Debug.Log("Balance of account:" + UnitConversion.Convert.FromWei(balanceRequest.Result.Value));
59 | }
60 |
61 |
62 |
63 | // Update is called once per frame
64 | void Update () {
65 |
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Assets/link.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
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 |
--------------------------------------------------------------------------------
/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: 17000, 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/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 |
--------------------------------------------------------------------------------
/Assets/DecodeData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Numerics;
5 | using Nethereum.ABI.FunctionEncoding.Attributes;
6 | using UnityEngine;
7 | using Nethereum.Contracts;
8 | using Nethereum.Hex.HexConvertors.Extensions;
9 | using Nethereum.JsonRpc.UnityClient;
10 | using Nethereum.Contracts.CQS;
11 |
12 | public class DecodeData : MonoBehaviour {
13 |
14 | [FunctionOutput]
15 | public class GetDataDTO
16 | {
17 | [Parameter("uint64", "birthTime", 1)]
18 | public ulong BirthTime { get; set; }
19 |
20 | [Parameter("string", "userName", 2)]
21 | public string UserName { get; set; }
22 |
23 | [Parameter("uint16", "starterId", 3)]
24 | public int StarterId { get; set; }
25 |
26 | [Parameter("uint16", "currLocation", 4)]
27 | public int CurrLocation { get; set; }
28 |
29 | [Parameter("bool", "isBusy", 5)]
30 | public bool IsBusy { get; set; }
31 |
32 | [Parameter("address", "owner", 6)]
33 | public string Owner { get; set; }
34 |
35 | }
36 |
37 | void Start ()
38 | {
39 | // StartCoroutine(GetData());
40 | //StartCoroutine(GetArrayUInt256());
41 | }
42 |
43 | public IEnumerator GetData()
44 | {
45 | var contractAddress = "0x786a30e1ab0c58303c85419b9077657ad4fdb0ea";
46 | var url = "http://localhost:8545";
47 | var getDataCallUnityRequest = new EthCallUnityRequest(url);
48 | var contract = new Contract(null, @"[{ 'constant':false,'inputs':[],'name':'getData','outputs':[{'name':'birthTime','type':'uint64'},{'name':'userName','type':'string'},{'name':'starterId','type':'uint16'},{'name':'currLocation','type':'uint16'},{'name':'isBusy','type':'bool'},{'name':'owner','type':'address'}],'payable':false,'stateMutability':'nonpayable','type':'function'}]", contractAddress);
49 | var function = contract.GetFunction("getData");
50 | var callInput = function.CreateCallInput();
51 |
52 | yield return getDataCallUnityRequest.SendRequest(callInput, Nethereum.RPC.Eth.DTOs.BlockParameter.CreateLatest());
53 | var result = getDataCallUnityRequest.Result;
54 | var thing = new GetDataDTO();
55 | var output = function.DecodeDTOTypeOutput(thing, result);
56 | Debug.Log("birth block " + output.BirthTime);
57 | Debug.Log("curr location " + output.CurrLocation);
58 | Debug.Log("busy" + output.IsBusy);
59 | Debug.Log("starterid " + output.StarterId);
60 | Debug.Log("userName " + output.UserName);
61 | Debug.Log("ownerAddress " + output.Owner);
62 | }
63 |
64 | public class ArrayUint256DynamicDeployment : ContractDeploymentMessage
65 | {
66 | public static string BYTECODE = "608060405234801561001057600080fd5b50610127806100206000396000f300608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634b04bc0481146043575b600080fd5b348015604e57600080fd5b50605560a3565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015608f5781810151838201526020016079565b505050509050019250505060405180910390f35b6040805160028082526060808301845292602083019080388339019050509050600181600081518110151560d357fe5b6020908102909101015280516002908290600190811060ee57fe5b60209081029091010152905600a165627a7a72305820aa3f79a3ff9e580c10090fb0e8830490f2acbd918c76c8488c40bdaf1c9180800029";
67 | public ArrayUint256DynamicDeployment() : base(BYTECODE) { }
68 | public ArrayUint256DynamicDeployment(string byteCode) : base(byteCode) { }
69 | }
70 |
71 | [Function("GiveMeTheArray", "uint256[]")]
72 | public class GiveMeTheArrayFunction:FunctionMessage
73 | {
74 |
75 | }
76 |
77 | [FunctionOutput]
78 | public class GiveMeTheArrayOutputDTO:IFunctionOutputDTO
79 | {
80 | [Parameter("uint256[]", "result", 1)]
81 | public List Result {get; set;}
82 | }
83 |
84 |
85 | //Sample of new features / requests
86 | public IEnumerator GetArrayUInt256()
87 | {
88 | var url = "http://localhost:8545";
89 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
90 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
91 | //initialising the transaction request sender
92 | var transactionRequest = new TransactionSignedUnityRequest(url, privateKey, account);
93 | //deploy the contract and True indicates we want to estimate the gas
94 | yield return transactionRequest.SignAndSendDeploymentContractTransaction();
95 |
96 | if (transactionRequest.Exception != null)
97 | {
98 | Debug.Log(transactionRequest.Exception.Message);
99 | yield break;
100 | }
101 |
102 | var transactionHash = transactionRequest.Result;
103 |
104 | //create a poll to get the receipt when mined
105 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
106 | //checking every 2 seconds for the receipt
107 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
108 | var deploymentReceipt = transactionReceiptPolling.Result;
109 |
110 | //Query request using our acccount and the contracts address (no parameters needed and default values)
111 | var queryRequest = new QueryUnityRequest(url, account);
112 | yield return queryRequest.Query(deploymentReceipt.ContractAddress);
113 |
114 | //Getting the dto response already decoded
115 | var dtoResult = queryRequest.Result;
116 |
117 | Debug.Log (dtoResult.Result [0]);
118 | Debug.Log (dtoResult.Result [1]);
119 | }
120 | // Update is called once per frame
121 | void Update () {
122 |
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Unity3dSimpleSample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {7F53E8C5-4D70-8E7A-B5D8-AE490642097A}
9 | Library
10 | Assembly-CSharp
11 | 512
12 | {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
13 | .NETFramework
14 | v3.5
15 | Unity Subset v3.5
16 |
17 | Game:1
18 | WebGL:20
19 | 2017.1.0p5
20 |
21 | 4
22 |
23 |
24 | pdbonly
25 | false
26 | Temp\UnityVS_bin\Debug\
27 | Temp\UnityVS_obj\Debug\
28 | prompt
29 | 4
30 | DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;PLATFORM_WEBGL;UNITY_WEBGL;UNITY_WEBGL_API;UNITY_DISABLE_WEB_VERIFICATION;UNITY_GFX_USE_PLATFORM_VSYNC;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_VR;ENABLE_IL2CPP;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU
31 | true
32 |
33 |
34 | pdbonly
35 | false
36 | Temp\UnityVS_bin\Release\
37 | Temp\UnityVS_obj\Release\
38 | prompt
39 | 4
40 | TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;PLATFORM_WEBGL;UNITY_WEBGL;UNITY_WEBGL_API;UNITY_DISABLE_WEB_VERIFICATION;UNITY_GFX_USE_PLATFORM_VSYNC;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_VR;ENABLE_IL2CPP;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU
41 | true
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll
54 |
55 |
56 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll
57 |
58 |
59 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll
60 |
61 |
62 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll
63 |
64 |
65 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll
66 |
67 |
68 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll
69 |
70 |
71 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll
72 |
73 |
74 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll
75 |
76 |
77 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll
78 |
79 |
80 | Assets/Plugins/BouncyCastle.Crypto.dll
81 |
82 |
83 | Assets/Plugins/Nethereum.ABI.dll
84 |
85 |
86 | Assets/Plugins/Nethereum.Contracts.dll
87 |
88 |
89 | Assets/Plugins/Nethereum.Hex.dll
90 |
91 |
92 | Assets/Plugins/Nethereum.JsonRpc.Client.dll
93 |
94 |
95 | Assets/Plugins/Nethereum.KeyStore.dll
96 |
97 |
98 | Assets/Plugins/Nethereum.RLP.dll
99 |
100 |
101 | Assets/Plugins/Nethereum.RPC.dll
102 |
103 |
104 | Assets/Plugins/Nethereum.Signer.dll
105 |
106 |
107 | Assets/Plugins/Nethereum.Unity.dll
108 |
109 |
110 | Assets/Plugins/Nethereum.Util.dll
111 |
112 |
113 | Assets/Plugins/Newtonsoft.Json.dll
114 |
115 |
116 | Assets/Plugins/System.Threading.dll
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/UnityPlayground.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {D8254C25-9761-6291-5523-B4FFD464F6FD}
9 | Library
10 | Assembly-CSharp.dll
11 | 512
12 | {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
13 | .NETFramework
14 | v3.5
15 | Unity Subset v3.5
16 |
17 | Game:1
18 | WebGL:20
19 | 2017.1.0p5
20 |
21 | 4
22 |
23 |
24 | pdbonly
25 | false
26 | Temp\UnityVS_bin\Debug\
27 | Temp\UnityVS_obj\Debug\
28 | prompt
29 | 4
30 | DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;PLATFORM_WEBGL;UNITY_WEBGL;UNITY_WEBGL_API;UNITY_DISABLE_WEB_VERIFICATION;UNITY_GFX_USE_PLATFORM_VSYNC;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_VR;ENABLE_IL2CPP;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU
31 | true
32 |
33 |
34 | pdbonly
35 | false
36 | Temp\UnityVS_bin\Release\
37 | Temp\UnityVS_obj\Release\
38 | prompt
39 | 4
40 | TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;PLATFORM_WEBGL;UNITY_WEBGL;UNITY_WEBGL_API;UNITY_DISABLE_WEB_VERIFICATION;UNITY_GFX_USE_PLATFORM_VSYNC;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_VR;ENABLE_IL2CPP;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU
41 | true
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll
54 |
55 |
56 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll
57 |
58 |
59 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll
60 |
61 |
62 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll
63 |
64 |
65 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll
66 |
67 |
68 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll
69 |
70 |
71 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll
72 |
73 |
74 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll
75 |
76 |
77 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll
78 |
79 |
80 | Assets/Plugins/BouncyCastle.Crypto.dll
81 |
82 |
83 | Assets/Plugins/Nethereum.ABI.dll
84 |
85 |
86 | Assets/Plugins/Nethereum.Contracts.dll
87 |
88 |
89 | Assets/Plugins/Nethereum.Hex.dll
90 |
91 |
92 | Assets/Plugins/Nethereum.JsonRpc.Client.dll
93 |
94 |
95 | Assets/Plugins/Nethereum.KeyStore.dll
96 |
97 |
98 | Assets/Plugins/Nethereum.RLP.dll
99 |
100 |
101 | Assets/Plugins/Nethereum.RPC.dll
102 |
103 |
104 | Assets/Plugins/Nethereum.Signer.dll
105 |
106 |
107 | Assets/Plugins/Nethereum.Unity.dll
108 |
109 |
110 | Assets/Plugins/Nethereum.Util.dll
111 |
112 |
113 | Assets/Plugins/Newtonsoft.Json.dll
114 |
115 |
116 | Assets/Plugins/System.Threading.dll
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/Assets/TokenDeployAndSend.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Numerics;
4 | using Nethereum.ABI.FunctionEncoding.Attributes;
5 | using Nethereum.ABI.Model;
6 | using Nethereum.Contracts;
7 | using Nethereum.Contracts.CQS;
8 | using Nethereum.Contracts.Extensions;
9 | using Nethereum.JsonRpc.UnityClient;
10 | using UnityEngine;
11 |
12 | public class TokenDeployAndSend : MonoBehaviour {
13 |
14 | //Deployment contract object definition
15 |
16 | public partial class EIP20Deployment : EIP20DeploymentBase
17 | {
18 | public EIP20Deployment() : base(BYTECODE) { }
19 |
20 | public EIP20Deployment(string byteCode) : base(byteCode) { }
21 | }
22 |
23 | public class EIP20DeploymentBase : ContractDeploymentMessage
24 | {
25 |
26 | public static string BYTECODE = "608060405234801561001057600080fd5b506040516107843803806107848339810160409081528151602080840151838501516060860151336000908152808552959095208490556002849055908501805193959094919391019161006991600391860190610096565b506004805460ff191660ff8416179055805161008c906005906020840190610096565b5050505050610131565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d757805160ff1916838001178555610104565b82800160010185558215610104579182015b828111156101045782518255916020019190600101906100e9565b50610110929150610114565b5090565b61012e91905b80821115610110576000815560010161011a565b90565b610644806101406000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017557806323b872dd1461019c57806327e235e3146101c6578063313ce567146101e75780635c6581651461021257806370a082311461023957806395d89b411461025a578063a9059cbb1461026f578063dd62ed3e14610293575b600080fd5b3480156100bf57600080fd5b506100c86102ba565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101025781810151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014957600080fd5b50610161600160a060020a0360043516602435610348565b604080519115158252519081900360200190f35b34801561018157600080fd5b5061018a6103ae565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610161600160a060020a03600435811690602435166044356103b4565b3480156101d257600080fd5b5061018a600160a060020a03600435166104b7565b3480156101f357600080fd5b506101fc6104c9565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b5061018a600160a060020a03600435811690602435166104d2565b34801561024557600080fd5b5061018a600160a060020a03600435166104ef565b34801561026657600080fd5b506100c861050a565b34801561027b57600080fd5b50610161600160a060020a0360043516602435610565565b34801561029f57600080fd5b5061018a600160a060020a03600435811690602435166105ed565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103405780601f1061031557610100808354040283529160200191610340565b820191906000526020600020905b81548152906001019060200180831161032357829003601f168201915b505050505081565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025481565b600160a060020a03831660008181526001602090815260408083203384528252808320549383529082905281205490919083118015906103f45750828110155b15156103ff57600080fd5b600160a060020a038085166000908152602081905260408082208054870190559187168152208054849003905560001981101561046157600160a060020a03851660009081526001602090815260408083203384529091529020805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60006020819052908152604090205481565b60045460ff1681565b600160209081526000928352604080842090915290825290205481565b600160a060020a031660009081526020819052604090205490565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103405780601f1061031557610100808354040283529160200191610340565b3360009081526020819052604081205482111561058157600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a039182166000908152600160209081526040808320939094168252919091522054905600a165627a7a7230582084c618322109054a21a57e27075384a6172ab854e4b2c2d35062a964a6bf593f0029";
27 |
28 | public EIP20DeploymentBase() : base(BYTECODE) { }
29 |
30 | public EIP20DeploymentBase(string byteCode) : base(byteCode) { }
31 |
32 | [Parameter("uint256", "_initialAmount", 1)]
33 | public BigInteger InitialAmount { get; set; }
34 | [Parameter("string", "_tokenName", 2)]
35 | public string TokenName { get; set; }
36 | [Parameter("uint8", "_decimalUnits", 3)]
37 | public byte DecimalUnits { get; set; }
38 | [Parameter("string", "_tokenSymbol", 4)]
39 | public string TokenSymbol { get; set; }
40 |
41 | }
42 |
43 | [Function("transfer", "bool")]
44 | public class TransferFunctionBase : FunctionMessage
45 | {
46 | [Parameter("address", "_to", 1)]
47 | public string To { get; set; }
48 | [Parameter("uint256", "_value", 2)]
49 | public BigInteger Value { get; set; }
50 | }
51 |
52 | public partial class TransferFunction : TransferFunctionBase
53 | {
54 |
55 | }
56 |
57 | [Function("balanceOf", "uint256")]
58 | public class BalanceOfFunction : FunctionMessage
59 | {
60 | [Parameter("address", "_owner", 1)]
61 | public string Owner { get; set; }
62 | }
63 |
64 | [FunctionOutput]
65 | public class BalanceOfFunctionOutput : IFunctionOutputDTO
66 | {
67 | [Parameter("uint256", 1)]
68 | public int Balance { get; set; }
69 | }
70 |
71 | [Event("Transfer")]
72 | public class TransferEventDTOBase : IEventDTO
73 | {
74 |
75 | [Parameter("address", "_from", 1, true)]
76 | public virtual string From { get; set; }
77 | [Parameter("address", "_to", 2, true)]
78 | public virtual string To { get; set; }
79 | [Parameter("uint256", "_value", 3, false)]
80 | public virtual BigInteger Value { get; set; }
81 | }
82 |
83 | public partial class TransferEventDTO : TransferEventDTOBase
84 | {
85 | public static EventABI GetEventABI()
86 | {
87 | return EventExtensions.GetEventABI();
88 | }
89 | }
90 |
91 | // Use this for initialization
92 | void Start () {
93 |
94 | // StartCoroutine(DeployAndTransferToken());
95 | }
96 |
97 |
98 | //Sample of new features / requests
99 | public IEnumerator DeployAndTransferToken()
100 | {
101 | var url = "http://localhost:8545";
102 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
103 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
104 | //initialising the transaction request sender
105 | var transactionRequest = new TransactionSignedUnityRequest(url, privateKey, account);
106 |
107 |
108 | var deployContract = new EIP20Deployment()
109 | {
110 | InitialAmount = 10000,
111 | FromAddress = account,
112 | TokenName = "TST",
113 | TokenSymbol = "TST"
114 | };
115 |
116 | //deploy the contract and True indicates we want to estimate the gas
117 | yield return transactionRequest.SignAndSendDeploymentContractTransaction(deployContract);
118 |
119 | if (transactionRequest.Exception != null)
120 | {
121 | Debug.Log(transactionRequest.Exception.Message);
122 | yield break;
123 | }
124 |
125 | var transactionHash = transactionRequest.Result;
126 |
127 | Debug.Log("Deployment transaction hash:" + transactionHash);
128 |
129 | //create a poll to get the receipt when mined
130 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
131 | //checking every 2 seconds for the receipt
132 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
133 | var deploymentReceipt = transactionReceiptPolling.Result;
134 |
135 | Debug.Log("Deployment contract address:" + deploymentReceipt.ContractAddress);
136 |
137 | //Query request using our acccount and the contracts address (no parameters needed and default values)
138 | var queryRequest = new QueryUnityRequest(url, account);
139 | yield return queryRequest.Query(new BalanceOfFunction(){Owner = account}, deploymentReceipt.ContractAddress);
140 |
141 | //Getting the dto response already decoded
142 | var dtoResult = queryRequest.Result;
143 | Debug.Log(dtoResult.Balance);
144 |
145 |
146 | var transactionTransferRequest = new TransactionSignedUnityRequest(url, privateKey, account);
147 |
148 | var newAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";
149 |
150 | var transactionMessage = new TransferFunction
151 | {
152 | FromAddress = account,
153 | To = newAddress,
154 | Value = 1000,
155 |
156 | };
157 |
158 | yield return transactionTransferRequest.SignAndSendTransaction(transactionMessage, deploymentReceipt.ContractAddress);
159 |
160 | var transactionTransferHash = transactionTransferRequest.Result;
161 |
162 | Debug.Log("Transfer txn hash:" + transactionHash);
163 |
164 | transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
165 | yield return transactionReceiptPolling.PollForReceipt(transactionTransferHash, 2);
166 | var transferReceipt = transactionReceiptPolling.Result;
167 |
168 | var transferEvent = transferReceipt.DecodeAllEvents();
169 | Debug.Log("Transferd amount from event: " + transferEvent[0].Event.Value);
170 |
171 | var getLogsRequest = new EthGetLogsUnityRequest(url);
172 |
173 | var eventTransfer = TransferEventDTO.GetEventABI();
174 | yield return getLogsRequest.SendRequest(eventTransfer.CreateFilterInput(deploymentReceipt.ContractAddress, account));
175 |
176 | var eventDecoded = getLogsRequest.Result.DecodeAllEvents();
177 |
178 | Debug.Log("Transferd amount from get logs event: " + eventDecoded[0].Event.Value);
179 | }
180 |
181 |
182 |
183 | // Update is called once per frame
184 | void Update () {
185 |
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/Assets/game.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 0
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_TemporalCoherenceThreshold: 1
54 | m_EnvironmentLightingMode: 0
55 | m_EnableBakedLightmaps: 1
56 | m_EnableRealtimeLightmaps: 1
57 | m_LightmapEditorSettings:
58 | serializedVersion: 10
59 | m_Resolution: 2
60 | m_BakeResolution: 40
61 | m_AtlasSize: 1024
62 | m_AO: 0
63 | m_AOMaxDistance: 1
64 | m_CompAOExponent: 1
65 | m_CompAOExponentDirect: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 0
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVRFilterTypeDirect: 0
81 | m_PVRFilterTypeIndirect: 0
82 | m_PVRFilterTypeAO: 0
83 | m_PVRFilteringMode: 1
84 | m_PVRCulling: 1
85 | m_PVRFilteringGaussRadiusDirect: 1
86 | m_PVRFilteringGaussRadiusIndirect: 5
87 | m_PVRFilteringGaussRadiusAO: 2
88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
90 | m_PVRFilteringAtrousPositionSigmaAO: 1
91 | m_ShowResolutionOverlay: 1
92 | m_LightingDataAsset: {fileID: 0}
93 | m_UseShadowmask: 1
94 | --- !u!196 &4
95 | NavMeshSettings:
96 | serializedVersion: 2
97 | m_ObjectHideFlags: 0
98 | m_BuildSettings:
99 | serializedVersion: 2
100 | agentTypeID: 0
101 | agentRadius: 0.5
102 | agentHeight: 2
103 | agentSlope: 45
104 | agentClimb: 0.4
105 | ledgeDropHeight: 0
106 | maxJumpAcrossDistance: 0
107 | minRegionArea: 2
108 | manualCellSize: 0
109 | cellSize: 0.16666667
110 | manualTileSize: 0
111 | tileSize: 256
112 | accuratePlacement: 0
113 | debug:
114 | m_Flags: 0
115 | m_NavMeshData: {fileID: 0}
116 | --- !u!1 &337711581
117 | GameObject:
118 | m_ObjectHideFlags: 0
119 | m_PrefabParentObject: {fileID: 0}
120 | m_PrefabInternal: {fileID: 0}
121 | serializedVersion: 5
122 | m_Component:
123 | - component: {fileID: 337711585}
124 | - component: {fileID: 337711584}
125 | - component: {fileID: 337711583}
126 | - component: {fileID: 337711582}
127 | m_Layer: 5
128 | m_Name: Canvas
129 | m_TagString: Untagged
130 | m_Icon: {fileID: 0}
131 | m_NavMeshLayer: 0
132 | m_StaticEditorFlags: 0
133 | m_IsActive: 1
134 | --- !u!114 &337711582
135 | MonoBehaviour:
136 | m_ObjectHideFlags: 0
137 | m_PrefabParentObject: {fileID: 0}
138 | m_PrefabInternal: {fileID: 0}
139 | m_GameObject: {fileID: 337711581}
140 | m_Enabled: 1
141 | m_EditorHideFlags: 0
142 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
143 | m_Name:
144 | m_EditorClassIdentifier:
145 | m_IgnoreReversedGraphics: 1
146 | m_BlockingObjects: 0
147 | m_BlockingMask:
148 | serializedVersion: 2
149 | m_Bits: 4294967295
150 | --- !u!114 &337711583
151 | MonoBehaviour:
152 | m_ObjectHideFlags: 0
153 | m_PrefabParentObject: {fileID: 0}
154 | m_PrefabInternal: {fileID: 0}
155 | m_GameObject: {fileID: 337711581}
156 | m_Enabled: 1
157 | m_EditorHideFlags: 0
158 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
159 | m_Name:
160 | m_EditorClassIdentifier:
161 | m_UiScaleMode: 0
162 | m_ReferencePixelsPerUnit: 100
163 | m_ScaleFactor: 1
164 | m_ReferenceResolution: {x: 800, y: 600}
165 | m_ScreenMatchMode: 0
166 | m_MatchWidthOrHeight: 0
167 | m_PhysicalUnit: 3
168 | m_FallbackScreenDPI: 96
169 | m_DefaultSpriteDPI: 96
170 | m_DynamicPixelsPerUnit: 1
171 | --- !u!223 &337711584
172 | Canvas:
173 | m_ObjectHideFlags: 0
174 | m_PrefabParentObject: {fileID: 0}
175 | m_PrefabInternal: {fileID: 0}
176 | m_GameObject: {fileID: 337711581}
177 | m_Enabled: 1
178 | serializedVersion: 3
179 | m_RenderMode: 0
180 | m_Camera: {fileID: 0}
181 | m_PlaneDistance: 100
182 | m_PixelPerfect: 0
183 | m_ReceivesEvents: 1
184 | m_OverrideSorting: 0
185 | m_OverridePixelPerfect: 0
186 | m_SortingBucketNormalizedSize: 0
187 | m_AdditionalShaderChannelsFlag: 0
188 | m_SortingLayerID: 0
189 | m_SortingOrder: 0
190 | m_TargetDisplay: 0
191 | --- !u!224 &337711585
192 | RectTransform:
193 | m_ObjectHideFlags: 0
194 | m_PrefabParentObject: {fileID: 0}
195 | m_PrefabInternal: {fileID: 0}
196 | m_GameObject: {fileID: 337711581}
197 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
198 | m_LocalPosition: {x: 0, y: 0, z: 0}
199 | m_LocalScale: {x: 0, y: 0, z: 0}
200 | m_Children: []
201 | m_Father: {fileID: 0}
202 | m_RootOrder: 2
203 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
204 | m_AnchorMin: {x: 0, y: 0}
205 | m_AnchorMax: {x: 0, y: 0}
206 | m_AnchoredPosition: {x: 0, y: 0}
207 | m_SizeDelta: {x: 0, y: 0}
208 | m_Pivot: {x: 0, y: 0}
209 | --- !u!1 &385170786
210 | GameObject:
211 | m_ObjectHideFlags: 0
212 | m_PrefabParentObject: {fileID: 0}
213 | m_PrefabInternal: {fileID: 0}
214 | serializedVersion: 5
215 | m_Component:
216 | - component: {fileID: 385170791}
217 | - component: {fileID: 385170790}
218 | - component: {fileID: 385170789}
219 | - component: {fileID: 385170788}
220 | - component: {fileID: 385170787}
221 | m_Layer: 0
222 | m_Name: Main Camera
223 | m_TagString: MainCamera
224 | m_Icon: {fileID: 0}
225 | m_NavMeshLayer: 0
226 | m_StaticEditorFlags: 0
227 | m_IsActive: 1
228 | --- !u!81 &385170787
229 | AudioListener:
230 | m_ObjectHideFlags: 0
231 | m_PrefabParentObject: {fileID: 0}
232 | m_PrefabInternal: {fileID: 0}
233 | m_GameObject: {fileID: 385170786}
234 | m_Enabled: 1
235 | --- !u!124 &385170788
236 | Behaviour:
237 | m_ObjectHideFlags: 0
238 | m_PrefabParentObject: {fileID: 0}
239 | m_PrefabInternal: {fileID: 0}
240 | m_GameObject: {fileID: 385170786}
241 | m_Enabled: 1
242 | --- !u!92 &385170789
243 | Behaviour:
244 | m_ObjectHideFlags: 0
245 | m_PrefabParentObject: {fileID: 0}
246 | m_PrefabInternal: {fileID: 0}
247 | m_GameObject: {fileID: 385170786}
248 | m_Enabled: 1
249 | --- !u!20 &385170790
250 | Camera:
251 | m_ObjectHideFlags: 0
252 | m_PrefabParentObject: {fileID: 0}
253 | m_PrefabInternal: {fileID: 0}
254 | m_GameObject: {fileID: 385170786}
255 | m_Enabled: 1
256 | serializedVersion: 2
257 | m_ClearFlags: 1
258 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
259 | m_NormalizedViewPortRect:
260 | serializedVersion: 2
261 | x: 0
262 | y: 0
263 | width: 1
264 | height: 1
265 | near clip plane: 0.3
266 | far clip plane: 1000
267 | field of view: 60
268 | orthographic: 0
269 | orthographic size: 5
270 | m_Depth: -1
271 | m_CullingMask:
272 | serializedVersion: 2
273 | m_Bits: 4294967295
274 | m_RenderingPath: -1
275 | m_TargetTexture: {fileID: 0}
276 | m_TargetDisplay: 0
277 | m_TargetEye: 3
278 | m_HDR: 1
279 | m_AllowMSAA: 1
280 | m_AllowDynamicResolution: 0
281 | m_ForceIntoRT: 0
282 | m_OcclusionCulling: 1
283 | m_StereoConvergence: 10
284 | m_StereoSeparation: 0.022
285 | --- !u!4 &385170791
286 | Transform:
287 | m_ObjectHideFlags: 0
288 | m_PrefabParentObject: {fileID: 0}
289 | m_PrefabInternal: {fileID: 0}
290 | m_GameObject: {fileID: 385170786}
291 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
292 | m_LocalPosition: {x: 0, y: 1, z: -10}
293 | m_LocalScale: {x: 1, y: 1, z: 1}
294 | m_Children: []
295 | m_Father: {fileID: 0}
296 | m_RootOrder: 0
297 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
298 | --- !u!1 &857035498
299 | GameObject:
300 | m_ObjectHideFlags: 0
301 | m_PrefabParentObject: {fileID: 0}
302 | m_PrefabInternal: {fileID: 0}
303 | serializedVersion: 5
304 | m_Component:
305 | - component: {fileID: 857035501}
306 | - component: {fileID: 857035500}
307 | - component: {fileID: 857035499}
308 | m_Layer: 0
309 | m_Name: EventSystem
310 | m_TagString: Untagged
311 | m_Icon: {fileID: 0}
312 | m_NavMeshLayer: 0
313 | m_StaticEditorFlags: 0
314 | m_IsActive: 1
315 | --- !u!114 &857035499
316 | MonoBehaviour:
317 | m_ObjectHideFlags: 0
318 | m_PrefabParentObject: {fileID: 0}
319 | m_PrefabInternal: {fileID: 0}
320 | m_GameObject: {fileID: 857035498}
321 | m_Enabled: 1
322 | m_EditorHideFlags: 0
323 | m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
324 | m_Name:
325 | m_EditorClassIdentifier:
326 | m_HorizontalAxis: Horizontal
327 | m_VerticalAxis: Vertical
328 | m_SubmitButton: Submit
329 | m_CancelButton: Cancel
330 | m_InputActionsPerSecond: 10
331 | m_RepeatDelay: 0.5
332 | m_ForceModuleActive: 0
333 | --- !u!114 &857035500
334 | MonoBehaviour:
335 | m_ObjectHideFlags: 0
336 | m_PrefabParentObject: {fileID: 0}
337 | m_PrefabInternal: {fileID: 0}
338 | m_GameObject: {fileID: 857035498}
339 | m_Enabled: 1
340 | m_EditorHideFlags: 0
341 | m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
342 | m_Name:
343 | m_EditorClassIdentifier:
344 | m_FirstSelected: {fileID: 0}
345 | m_sendNavigationEvents: 1
346 | m_DragThreshold: 5
347 | --- !u!4 &857035501
348 | Transform:
349 | m_ObjectHideFlags: 0
350 | m_PrefabParentObject: {fileID: 0}
351 | m_PrefabInternal: {fileID: 0}
352 | m_GameObject: {fileID: 857035498}
353 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
354 | m_LocalPosition: {x: 0, y: 0, z: 0}
355 | m_LocalScale: {x: 1, y: 1, z: 1}
356 | m_Children: []
357 | m_Father: {fileID: 0}
358 | m_RootOrder: 3
359 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
360 | --- !u!1 &1441254417
361 | GameObject:
362 | m_ObjectHideFlags: 0
363 | m_PrefabParentObject: {fileID: 0}
364 | m_PrefabInternal: {fileID: 0}
365 | serializedVersion: 5
366 | m_Component:
367 | - component: {fileID: 1441254419}
368 | - component: {fileID: 1441254418}
369 | m_Layer: 0
370 | m_Name: Directional Light
371 | m_TagString: Untagged
372 | m_Icon: {fileID: 0}
373 | m_NavMeshLayer: 0
374 | m_StaticEditorFlags: 0
375 | m_IsActive: 1
376 | --- !u!108 &1441254418
377 | Light:
378 | m_ObjectHideFlags: 0
379 | m_PrefabParentObject: {fileID: 0}
380 | m_PrefabInternal: {fileID: 0}
381 | m_GameObject: {fileID: 1441254417}
382 | m_Enabled: 1
383 | serializedVersion: 8
384 | m_Type: 1
385 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
386 | m_Intensity: 1
387 | m_Range: 10
388 | m_SpotAngle: 30
389 | m_CookieSize: 10
390 | m_Shadows:
391 | m_Type: 2
392 | m_Resolution: -1
393 | m_CustomResolution: -1
394 | m_Strength: 1
395 | m_Bias: 0.05
396 | m_NormalBias: 0.4
397 | m_NearPlane: 0.2
398 | m_Cookie: {fileID: 0}
399 | m_DrawHalo: 0
400 | m_Flare: {fileID: 0}
401 | m_RenderMode: 0
402 | m_CullingMask:
403 | serializedVersion: 2
404 | m_Bits: 4294967295
405 | m_Lightmapping: 4
406 | m_AreaSize: {x: 1, y: 1}
407 | m_BounceIntensity: 1
408 | m_ColorTemperature: 6570
409 | m_UseColorTemperature: 0
410 | m_ShadowRadius: 0
411 | m_ShadowAngle: 0
412 | --- !u!4 &1441254419
413 | Transform:
414 | m_ObjectHideFlags: 0
415 | m_PrefabParentObject: {fileID: 0}
416 | m_PrefabInternal: {fileID: 0}
417 | m_GameObject: {fileID: 1441254417}
418 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
419 | m_LocalPosition: {x: 0, y: 3, z: 0}
420 | m_LocalScale: {x: 1, y: 1, z: 1}
421 | m_Children: []
422 | m_Father: {fileID: 0}
423 | m_RootOrder: 1
424 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
425 | --- !u!1 &1942356709
426 | GameObject:
427 | m_ObjectHideFlags: 0
428 | m_PrefabParentObject: {fileID: 0}
429 | m_PrefabInternal: {fileID: 0}
430 | serializedVersion: 5
431 | m_Component:
432 | - component: {fileID: 1942356711}
433 | - component: {fileID: 1942356710}
434 | - component: {fileID: 1942356712}
435 | m_Layer: 0
436 | m_Name: GameObject
437 | m_TagString: Untagged
438 | m_Icon: {fileID: 0}
439 | m_NavMeshLayer: 0
440 | m_StaticEditorFlags: 0
441 | m_IsActive: 1
442 | --- !u!114 &1942356710
443 | MonoBehaviour:
444 | m_ObjectHideFlags: 0
445 | m_PrefabParentObject: {fileID: 0}
446 | m_PrefabInternal: {fileID: 0}
447 | m_GameObject: {fileID: 1942356709}
448 | m_Enabled: 1
449 | m_EditorHideFlags: 0
450 | m_Script: {fileID: 11500000, guid: 09c94c07340d4ab49ae06865b2dda57c, type: 3}
451 | m_Name:
452 | m_EditorClassIdentifier:
453 | --- !u!4 &1942356711
454 | Transform:
455 | m_ObjectHideFlags: 0
456 | m_PrefabParentObject: {fileID: 0}
457 | m_PrefabInternal: {fileID: 0}
458 | m_GameObject: {fileID: 1942356709}
459 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
460 | m_LocalPosition: {x: 766, y: 386.5, z: 0}
461 | m_LocalScale: {x: 1, y: 1, z: 1}
462 | m_Children: []
463 | m_Father: {fileID: 0}
464 | m_RootOrder: 4
465 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
466 | --- !u!114 &1942356712
467 | MonoBehaviour:
468 | m_ObjectHideFlags: 0
469 | m_PrefabParentObject: {fileID: 0}
470 | m_PrefabInternal: {fileID: 0}
471 | m_GameObject: {fileID: 1942356709}
472 | m_Enabled: 1
473 | m_EditorHideFlags: 0
474 | m_Script: {fileID: 11500000, guid: 779b8e6b255570647b4477b906256bba, type: 3}
475 | m_Name:
476 | m_EditorClassIdentifier:
477 |
--------------------------------------------------------------------------------
/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: 15
7 | productGUID: 5aab10f783cce8f4fa85d9632499698e
8 | AndroidProfiler: 0
9 | AndroidFilterTouchesWhenObscured: 0
10 | AndroidEnableSustainedPerformanceMode: 0
11 | defaultScreenOrientation: 4
12 | targetDevice: 2
13 | useOnDemandResources: 0
14 | accelerometerFrequency: 60
15 | companyName: DefaultCompany
16 | productName: UnityPlayground
17 | defaultCursor: {fileID: 0}
18 | cursorHotspot: {x: 0, y: 0}
19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
20 | m_ShowUnitySplashScreen: 1
21 | m_ShowUnitySplashLogo: 1
22 | m_SplashScreenOverlayOpacity: 1
23 | m_SplashScreenAnimation: 1
24 | m_SplashScreenLogoStyle: 1
25 | m_SplashScreenDrawMode: 0
26 | m_SplashScreenBackgroundAnimationZoom: 1
27 | m_SplashScreenLogoAnimationZoom: 1
28 | m_SplashScreenBackgroundLandscapeAspect: 1
29 | m_SplashScreenBackgroundPortraitAspect: 1
30 | m_SplashScreenBackgroundLandscapeUvs:
31 | serializedVersion: 2
32 | x: 0
33 | y: 0
34 | width: 1
35 | height: 1
36 | m_SplashScreenBackgroundPortraitUvs:
37 | serializedVersion: 2
38 | x: 0
39 | y: 0
40 | width: 1
41 | height: 1
42 | m_SplashScreenLogos: []
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_StackTraceTypes: 010000000100000001000000010000000100000001000000
53 | iosShowActivityIndicatorOnLoading: -1
54 | androidShowActivityIndicatorOnLoading: -1
55 | tizenShowActivityIndicatorOnLoading: -1
56 | iosAppInBackgroundBehavior: 0
57 | displayResolutionDialog: 1
58 | iosAllowHTTPDownload: 1
59 | allowedAutorotateToPortrait: 1
60 | allowedAutorotateToPortraitUpsideDown: 1
61 | allowedAutorotateToLandscapeRight: 1
62 | allowedAutorotateToLandscapeLeft: 1
63 | useOSAutorotation: 1
64 | use32BitDisplayBuffer: 1
65 | preserveFramebufferAlpha: 0
66 | disableDepthAndStencilBuffers: 0
67 | androidBlitType: 0
68 | defaultIsNativeResolution: 1
69 | macRetinaSupport: 1
70 | runInBackground: 0
71 | captureSingleScreen: 0
72 | muteOtherAudioSources: 0
73 | Prepare IOS For Recording: 0
74 | Force IOS Speakers When Recording: 0
75 | deferSystemGesturesMode: 0
76 | hideHomeButton: 0
77 | submitAnalytics: 1
78 | usePlayerLog: 1
79 | bakeCollisionMeshes: 0
80 | forceSingleInstance: 0
81 | resizableWindow: 0
82 | useMacAppStoreValidation: 0
83 | macAppStoreCategory: public.app-category.games
84 | gpuSkinning: 0
85 | graphicsJobs: 0
86 | xboxPIXTextureCapture: 0
87 | xboxEnableAvatar: 0
88 | xboxEnableKinect: 0
89 | xboxEnableKinectAutoTracking: 0
90 | xboxEnableFitness: 0
91 | visibleInBackground: 1
92 | allowFullscreenSwitch: 1
93 | graphicsJobMode: 0
94 | fullscreenMode: 1
95 | xboxSpeechDB: 0
96 | xboxEnableHeadOrientation: 0
97 | xboxEnableGuest: 0
98 | xboxEnablePIXSampling: 0
99 | metalFramebufferOnly: 0
100 | n3dsDisableStereoscopicView: 0
101 | n3dsEnableSharedListOpt: 1
102 | n3dsEnableVSync: 0
103 | xboxOneResolution: 0
104 | xboxOneSResolution: 0
105 | xboxOneXResolution: 3
106 | xboxOneMonoLoggingLevel: 0
107 | xboxOneLoggingLevel: 1
108 | xboxOneDisableEsram: 0
109 | xboxOnePresentImmediateThreshold: 0
110 | switchQueueCommandMemory: 0
111 | videoMemoryForVertexBuffers: 0
112 | psp2PowerMode: 0
113 | psp2AcquireBGM: 1
114 | m_SupportedAspectRatios:
115 | 4:3: 1
116 | 5:4: 1
117 | 16:10: 1
118 | 16:9: 1
119 | Others: 1
120 | bundleVersion: 1.0
121 | preloadedAssets: []
122 | metroInputSource: 0
123 | wsaTransparentSwapchain: 0
124 | m_HolographicPauseOnTrackingLoss: 1
125 | xboxOneDisableKinectGpuReservation: 0
126 | xboxOneEnable7thCore: 0
127 | vrSettings:
128 | cardboard:
129 | depthFormat: 0
130 | enableTransitionView: 0
131 | daydream:
132 | depthFormat: 0
133 | useSustainedPerformanceMode: 0
134 | enableVideoLayer: 0
135 | useProtectedVideoMemory: 0
136 | minimumSupportedHeadTracking: 0
137 | maximumSupportedHeadTracking: 1
138 | hololens:
139 | depthFormat: 1
140 | depthBufferSharingEnabled: 0
141 | enable360StereoCapture: 0
142 | oculus:
143 | sharedDepthBuffer: 0
144 | dashSupport: 0
145 | protectGraphicsMemory: 0
146 | useHDRDisplay: 0
147 | m_ColorGamuts: 00000000
148 | targetPixelDensity: 30
149 | resolutionScalingMode: 0
150 | androidSupportedAspectRatio: 1
151 | androidMaxAspectRatio: 2.1
152 | applicationIdentifier: {}
153 | buildNumber: {}
154 | AndroidBundleVersionCode: 1
155 | AndroidMinSdkVersion: 16
156 | AndroidTargetSdkVersion: 0
157 | AndroidPreferredInstallLocation: 1
158 | aotOptions:
159 | stripEngineCode: 1
160 | iPhoneStrippingLevel: 0
161 | iPhoneScriptCallOptimization: 0
162 | ForceInternetPermission: 0
163 | ForceSDCardPermission: 0
164 | CreateWallpaper: 0
165 | APKExpansionFiles: 0
166 | keepLoadedShadersAlive: 0
167 | StripUnusedMeshComponents: 0
168 | VertexChannelCompressionMask: 214
169 | iPhoneSdkVersion: 988
170 | iOSTargetOSVersionString: 8.0
171 | tvOSSdkVersion: 0
172 | tvOSRequireExtendedGameController: 0
173 | tvOSTargetOSVersionString: 9.0
174 | uIPrerenderedIcon: 0
175 | uIRequiresPersistentWiFi: 0
176 | uIRequiresFullScreen: 1
177 | uIStatusBarHidden: 1
178 | uIExitOnSuspend: 0
179 | uIStatusBarStyle: 0
180 | iPhoneSplashScreen: {fileID: 0}
181 | iPhoneHighResSplashScreen: {fileID: 0}
182 | iPhoneTallHighResSplashScreen: {fileID: 0}
183 | iPhone47inSplashScreen: {fileID: 0}
184 | iPhone55inPortraitSplashScreen: {fileID: 0}
185 | iPhone55inLandscapeSplashScreen: {fileID: 0}
186 | iPhone58inPortraitSplashScreen: {fileID: 0}
187 | iPhone58inLandscapeSplashScreen: {fileID: 0}
188 | iPadPortraitSplashScreen: {fileID: 0}
189 | iPadHighResPortraitSplashScreen: {fileID: 0}
190 | iPadLandscapeSplashScreen: {fileID: 0}
191 | iPadHighResLandscapeSplashScreen: {fileID: 0}
192 | appleTVSplashScreen: {fileID: 0}
193 | appleTVSplashScreen2x: {fileID: 0}
194 | tvOSSmallIconLayers: []
195 | tvOSSmallIconLayers2x: []
196 | tvOSLargeIconLayers: []
197 | tvOSLargeIconLayers2x: []
198 | tvOSTopShelfImageLayers: []
199 | tvOSTopShelfImageLayers2x: []
200 | tvOSTopShelfImageWideLayers: []
201 | tvOSTopShelfImageWideLayers2x: []
202 | iOSLaunchScreenType: 0
203 | iOSLaunchScreenPortrait: {fileID: 0}
204 | iOSLaunchScreenLandscape: {fileID: 0}
205 | iOSLaunchScreenBackgroundColor:
206 | serializedVersion: 2
207 | rgba: 0
208 | iOSLaunchScreenFillPct: 100
209 | iOSLaunchScreenSize: 100
210 | iOSLaunchScreenCustomXibPath:
211 | iOSLaunchScreeniPadType: 0
212 | iOSLaunchScreeniPadImage: {fileID: 0}
213 | iOSLaunchScreeniPadBackgroundColor:
214 | serializedVersion: 2
215 | rgba: 0
216 | iOSLaunchScreeniPadFillPct: 100
217 | iOSLaunchScreeniPadSize: 100
218 | iOSLaunchScreeniPadCustomXibPath:
219 | iOSUseLaunchScreenStoryboard: 0
220 | iOSLaunchScreenCustomStoryboardPath:
221 | iOSDeviceRequirements: []
222 | iOSURLSchemes: []
223 | iOSBackgroundModes: 0
224 | iOSMetalForceHardShadows: 0
225 | metalEditorSupport: 1
226 | metalAPIValidation: 1
227 | iOSRenderExtraFrameOnPause: 0
228 | appleDeveloperTeamID:
229 | iOSManualSigningProvisioningProfileID:
230 | tvOSManualSigningProvisioningProfileID:
231 | iOSManualSigningProvisioningProfileType: 0
232 | tvOSManualSigningProvisioningProfileType: 0
233 | appleEnableAutomaticSigning: 0
234 | iOSRequireARKit: 0
235 | appleEnableProMotion: 0
236 | clonedFromGUID: 00000000000000000000000000000000
237 | templatePackageId:
238 | templateDefaultScene:
239 | AndroidTargetArchitectures: 5
240 | AndroidSplashScreenScale: 0
241 | androidSplashScreen: {fileID: 0}
242 | AndroidKeystoreName:
243 | AndroidKeyaliasName:
244 | AndroidTVCompatibility: 1
245 | AndroidIsGame: 1
246 | AndroidEnableTango: 0
247 | androidEnableBanner: 1
248 | androidUseLowAccuracyLocation: 0
249 | m_AndroidBanners:
250 | - width: 320
251 | height: 180
252 | banner: {fileID: 0}
253 | androidGamepadSupportLevel: 0
254 | resolutionDialogBanner: {fileID: 0}
255 | m_BuildTargetIcons: []
256 | m_BuildTargetPlatformIcons: []
257 | m_BuildTargetBatching: []
258 | m_BuildTargetGraphicsAPIs: []
259 | m_BuildTargetVRSettings: []
260 | m_BuildTargetEnableVuforiaSettings: []
261 | openGLRequireES31: 0
262 | openGLRequireES31AEP: 0
263 | m_TemplateCustomTags: {}
264 | mobileMTRendering:
265 | Android: 1
266 | iPhone: 1
267 | tvOS: 1
268 | m_BuildTargetGroupLightmapEncodingQuality:
269 | - m_BuildTarget: Standalone
270 | m_EncodingQuality: 1
271 | - m_BuildTarget: XboxOne
272 | m_EncodingQuality: 1
273 | - m_BuildTarget: PS4
274 | m_EncodingQuality: 1
275 | playModeTestRunnerEnabled: 0
276 | runPlayModeTestAsEditModeTest: 0
277 | actionOnDotNetUnhandledException: 1
278 | enableInternalProfiler: 0
279 | logObjCUncaughtExceptions: 1
280 | enableCrashReportAPI: 0
281 | cameraUsageDescription:
282 | locationUsageDescription:
283 | microphoneUsageDescription:
284 | switchNetLibKey:
285 | switchSocketMemoryPoolSize: 6144
286 | switchSocketAllocatorPoolSize: 128
287 | switchSocketConcurrencyLimit: 14
288 | switchScreenResolutionBehavior: 2
289 | switchUseCPUProfiler: 0
290 | switchApplicationID: 0x01004b9000490000
291 | switchNSODependencies:
292 | switchTitleNames_0:
293 | switchTitleNames_1:
294 | switchTitleNames_2:
295 | switchTitleNames_3:
296 | switchTitleNames_4:
297 | switchTitleNames_5:
298 | switchTitleNames_6:
299 | switchTitleNames_7:
300 | switchTitleNames_8:
301 | switchTitleNames_9:
302 | switchTitleNames_10:
303 | switchTitleNames_11:
304 | switchTitleNames_12:
305 | switchTitleNames_13:
306 | switchTitleNames_14:
307 | switchPublisherNames_0:
308 | switchPublisherNames_1:
309 | switchPublisherNames_2:
310 | switchPublisherNames_3:
311 | switchPublisherNames_4:
312 | switchPublisherNames_5:
313 | switchPublisherNames_6:
314 | switchPublisherNames_7:
315 | switchPublisherNames_8:
316 | switchPublisherNames_9:
317 | switchPublisherNames_10:
318 | switchPublisherNames_11:
319 | switchPublisherNames_12:
320 | switchPublisherNames_13:
321 | switchPublisherNames_14:
322 | switchIcons_0: {fileID: 0}
323 | switchIcons_1: {fileID: 0}
324 | switchIcons_2: {fileID: 0}
325 | switchIcons_3: {fileID: 0}
326 | switchIcons_4: {fileID: 0}
327 | switchIcons_5: {fileID: 0}
328 | switchIcons_6: {fileID: 0}
329 | switchIcons_7: {fileID: 0}
330 | switchIcons_8: {fileID: 0}
331 | switchIcons_9: {fileID: 0}
332 | switchIcons_10: {fileID: 0}
333 | switchIcons_11: {fileID: 0}
334 | switchIcons_12: {fileID: 0}
335 | switchIcons_13: {fileID: 0}
336 | switchIcons_14: {fileID: 0}
337 | switchSmallIcons_0: {fileID: 0}
338 | switchSmallIcons_1: {fileID: 0}
339 | switchSmallIcons_2: {fileID: 0}
340 | switchSmallIcons_3: {fileID: 0}
341 | switchSmallIcons_4: {fileID: 0}
342 | switchSmallIcons_5: {fileID: 0}
343 | switchSmallIcons_6: {fileID: 0}
344 | switchSmallIcons_7: {fileID: 0}
345 | switchSmallIcons_8: {fileID: 0}
346 | switchSmallIcons_9: {fileID: 0}
347 | switchSmallIcons_10: {fileID: 0}
348 | switchSmallIcons_11: {fileID: 0}
349 | switchSmallIcons_12: {fileID: 0}
350 | switchSmallIcons_13: {fileID: 0}
351 | switchSmallIcons_14: {fileID: 0}
352 | switchManualHTML:
353 | switchAccessibleURLs:
354 | switchLegalInformation:
355 | switchMainThreadStackSize: 1048576
356 | switchPresenceGroupId:
357 | switchLogoHandling: 0
358 | switchReleaseVersion: 0
359 | switchDisplayVersion: 1.0.0
360 | switchStartupUserAccount: 0
361 | switchTouchScreenUsage: 0
362 | switchSupportedLanguagesMask: 0
363 | switchLogoType: 0
364 | switchApplicationErrorCodeCategory:
365 | switchUserAccountSaveDataSize: 0
366 | switchUserAccountSaveDataJournalSize: 0
367 | switchApplicationAttribute: 0
368 | switchCardSpecSize: -1
369 | switchCardSpecClock: -1
370 | switchRatingsMask: 0
371 | switchRatingsInt_0: 0
372 | switchRatingsInt_1: 0
373 | switchRatingsInt_2: 0
374 | switchRatingsInt_3: 0
375 | switchRatingsInt_4: 0
376 | switchRatingsInt_5: 0
377 | switchRatingsInt_6: 0
378 | switchRatingsInt_7: 0
379 | switchRatingsInt_8: 0
380 | switchRatingsInt_9: 0
381 | switchRatingsInt_10: 0
382 | switchRatingsInt_11: 0
383 | switchLocalCommunicationIds_0:
384 | switchLocalCommunicationIds_1:
385 | switchLocalCommunicationIds_2:
386 | switchLocalCommunicationIds_3:
387 | switchLocalCommunicationIds_4:
388 | switchLocalCommunicationIds_5:
389 | switchLocalCommunicationIds_6:
390 | switchLocalCommunicationIds_7:
391 | switchParentalControl: 0
392 | switchAllowsScreenshot: 1
393 | switchAllowsVideoCapturing: 1
394 | switchAllowsRuntimeAddOnContentInstall: 0
395 | switchDataLossConfirmation: 0
396 | switchSupportedNpadStyles: 3
397 | switchNativeFsCacheSize: 32
398 | switchSocketConfigEnabled: 0
399 | switchTcpInitialSendBufferSize: 32
400 | switchTcpInitialReceiveBufferSize: 64
401 | switchTcpAutoSendBufferSizeMax: 256
402 | switchTcpAutoReceiveBufferSizeMax: 256
403 | switchUdpSendBufferSize: 9
404 | switchUdpReceiveBufferSize: 42
405 | switchSocketBufferEfficiency: 4
406 | switchSocketInitializeEnabled: 1
407 | switchNetworkInterfaceManagerInitializeEnabled: 1
408 | switchPlayerConnectionEnabled: 1
409 | ps4NPAgeRating: 12
410 | ps4NPTitleSecret:
411 | ps4NPTrophyPackPath:
412 | ps4ParentalLevel: 11
413 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
414 | ps4Category: 0
415 | ps4MasterVersion: 01.00
416 | ps4AppVersion: 01.00
417 | ps4AppType: 0
418 | ps4ParamSfxPath:
419 | ps4VideoOutPixelFormat: 0
420 | ps4VideoOutInitialWidth: 1920
421 | ps4VideoOutBaseModeInitialWidth: 1920
422 | ps4VideoOutReprojectionRate: 120
423 | ps4PronunciationXMLPath:
424 | ps4PronunciationSIGPath:
425 | ps4BackgroundImagePath:
426 | ps4StartupImagePath:
427 | ps4StartupImagesFolder:
428 | ps4IconImagesFolder:
429 | ps4SaveDataImagePath:
430 | ps4SdkOverride:
431 | ps4BGMPath:
432 | ps4ShareFilePath:
433 | ps4ShareOverlayImagePath:
434 | ps4PrivacyGuardImagePath:
435 | ps4NPtitleDatPath:
436 | ps4RemotePlayKeyAssignment: -1
437 | ps4RemotePlayKeyMappingDir:
438 | ps4PlayTogetherPlayerCount: 0
439 | ps4EnterButtonAssignment: 1
440 | ps4ApplicationParam1: 0
441 | ps4ApplicationParam2: 0
442 | ps4ApplicationParam3: 0
443 | ps4ApplicationParam4: 0
444 | ps4DownloadDataSize: 0
445 | ps4GarlicHeapSize: 2048
446 | ps4ProGarlicHeapSize: 2560
447 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
448 | ps4pnSessions: 1
449 | ps4pnPresence: 1
450 | ps4pnFriends: 1
451 | ps4pnGameCustomData: 1
452 | playerPrefsSupport: 0
453 | enableApplicationExit: 0
454 | restrictedAudioUsageRights: 0
455 | ps4UseResolutionFallback: 0
456 | ps4ReprojectionSupport: 0
457 | ps4UseAudio3dBackend: 0
458 | ps4SocialScreenEnabled: 0
459 | ps4ScriptOptimizationLevel: 0
460 | ps4Audio3dVirtualSpeakerCount: 14
461 | ps4attribCpuUsage: 0
462 | ps4PatchPkgPath:
463 | ps4PatchLatestPkgPath:
464 | ps4PatchChangeinfoPath:
465 | ps4PatchDayOne: 0
466 | ps4attribUserManagement: 0
467 | ps4attribMoveSupport: 0
468 | ps4attrib3DSupport: 0
469 | ps4attribShareSupport: 0
470 | ps4attribExclusiveVR: 0
471 | ps4disableAutoHideSplash: 0
472 | ps4videoRecordingFeaturesUsed: 0
473 | ps4contentSearchFeaturesUsed: 0
474 | ps4attribEyeToEyeDistanceSettingVR: 0
475 | ps4IncludedModules: []
476 | monoEnv:
477 | psp2Splashimage: {fileID: 0}
478 | psp2NPTrophyPackPath:
479 | psp2NPSupportGBMorGJP: 0
480 | psp2NPAgeRating: 12
481 | psp2NPTitleDatPath:
482 | psp2NPCommsID:
483 | psp2NPCommunicationsID:
484 | psp2NPCommsPassphrase:
485 | psp2NPCommsSig:
486 | psp2ParamSfxPath:
487 | psp2ManualPath:
488 | psp2LiveAreaGatePath:
489 | psp2LiveAreaBackroundPath:
490 | psp2LiveAreaPath:
491 | psp2LiveAreaTrialPath:
492 | psp2PatchChangeInfoPath:
493 | psp2PatchOriginalPackage:
494 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui
495 | psp2KeystoneFile:
496 | psp2MemoryExpansionMode: 0
497 | psp2DRMType: 0
498 | psp2StorageType: 0
499 | psp2MediaCapacity: 0
500 | psp2DLCConfigPath:
501 | psp2ThumbnailPath:
502 | psp2BackgroundPath:
503 | psp2SoundPath:
504 | psp2TrophyCommId:
505 | psp2TrophyPackagePath:
506 | psp2PackagedResourcesPath:
507 | psp2SaveDataQuota: 10240
508 | psp2ParentalLevel: 1
509 | psp2ShortTitle: Not Set
510 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
511 | psp2Category: 0
512 | psp2MasterVersion: 01.00
513 | psp2AppVersion: 01.00
514 | psp2TVBootMode: 0
515 | psp2EnterButtonAssignment: 2
516 | psp2TVDisableEmu: 0
517 | psp2AllowTwitterDialog: 1
518 | psp2Upgradable: 0
519 | psp2HealthWarning: 0
520 | psp2UseLibLocation: 0
521 | psp2InfoBarOnStartup: 0
522 | psp2InfoBarColor: 0
523 | psp2ScriptOptimizationLevel: 0
524 | splashScreenBackgroundSourceLandscape: {fileID: 0}
525 | splashScreenBackgroundSourcePortrait: {fileID: 0}
526 | spritePackerPolicy:
527 | webGLMemorySize: 256
528 | webGLExceptionSupport: 1
529 | webGLNameFilesAsHashes: 0
530 | webGLDataCaching: 0
531 | webGLDebugSymbols: 0
532 | webGLEmscriptenArgs:
533 | webGLModulesDirectory:
534 | webGLTemplate: APPLICATION:Default
535 | webGLAnalyzeBuildSize: 0
536 | webGLUseEmbeddedResources: 0
537 | webGLCompressionFormat: 1
538 | webGLLinkerTarget: 0
539 | scriptingDefineSymbols: {}
540 | platformArchitecture: {}
541 | scriptingBackend: {}
542 | il2cppCompilerConfiguration: {}
543 | incrementalIl2cppBuild: {}
544 | allowUnsafeCode: 0
545 | additionalIl2CppArgs:
546 | scriptingRuntimeVersion: 0
547 | apiCompatibilityLevelPerPlatform: {}
548 | m_RenderingPath: 1
549 | m_MobileRenderingPath: 1
550 | metroPackageName: UnityPlayground
551 | metroPackageVersion:
552 | metroCertificatePath:
553 | metroCertificatePassword:
554 | metroCertificateSubject:
555 | metroCertificateIssuer:
556 | metroCertificateNotAfter: 0000000000000000
557 | metroApplicationDescription: UnityPlayground
558 | wsaImages: {}
559 | metroTileShortName:
560 | metroCommandLineArgsFile:
561 | metroTileShowName: 0
562 | metroMediumTileShowName: 0
563 | metroLargeTileShowName: 0
564 | metroWideTileShowName: 0
565 | metroDefaultTileSize: 1
566 | metroTileForegroundText: 2
567 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
568 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
569 | a: 1}
570 | metroSplashScreenUseBackgroundColor: 0
571 | platformCapabilities: {}
572 | metroFTAName:
573 | metroFTAFileTypes: []
574 | metroProtocolName:
575 | metroCompilationOverrides: 1
576 | tizenProductDescription:
577 | tizenProductURL:
578 | tizenSigningProfileName:
579 | tizenGPSPermissions: 0
580 | tizenMicrophonePermissions: 0
581 | tizenDeploymentTarget:
582 | tizenDeploymentTargetType: -1
583 | tizenMinOSVersion: 1
584 | n3dsUseExtSaveData: 0
585 | n3dsCompressStaticMem: 1
586 | n3dsExtSaveDataNumber: 0x12345
587 | n3dsStackSize: 131072
588 | n3dsTargetPlatform: 2
589 | n3dsRegion: 7
590 | n3dsMediaSize: 0
591 | n3dsLogoStyle: 3
592 | n3dsTitle: GameName
593 | n3dsProductCode:
594 | n3dsApplicationId: 0xFF3FF
595 | XboxOneProductId:
596 | XboxOneUpdateKey:
597 | XboxOneSandboxId:
598 | XboxOneContentId:
599 | XboxOneTitleId:
600 | XboxOneSCId:
601 | XboxOneGameOsOverridePath:
602 | XboxOnePackagingOverridePath:
603 | XboxOneAppManifestOverridePath:
604 | XboxOnePackageEncryption: 0
605 | XboxOnePackageUpdateGranularity: 2
606 | XboxOneDescription:
607 | XboxOneLanguage:
608 | - enus
609 | XboxOneCapability: []
610 | XboxOneGameRating: {}
611 | XboxOneIsContentPackage: 0
612 | XboxOneEnableGPUVariability: 0
613 | XboxOneSockets: {}
614 | XboxOneSplashScreen: {fileID: 0}
615 | XboxOneAllowedProductIds: []
616 | XboxOnePersistentLocalStorageSize: 0
617 | XboxOneXTitleMemory: 8
618 | xboxOneScriptCompiler: 0
619 | vrEditorSettings:
620 | daydream:
621 | daydreamIconForeground: {fileID: 0}
622 | daydreamIconBackground: {fileID: 0}
623 | cloudServicesEnabled: {}
624 | facebookSdkVersion: 7.9.4
625 | apiCompatibilityLevel: 2
626 | cloudProjectId:
627 | projectName:
628 | organizationId:
629 | cloudEnabled: 0
630 | enableNativePlatformBackendsForNewInputSystem: 0
631 | disableOldInputManagerSupport: 0
632 |
--------------------------------------------------------------------------------
/Assembly-CSharp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4
5 |
6 |
7 | Debug
8 | AnyCPU
9 | 10.0.20506
10 | 2.0
11 |
12 |
13 | {2FA37BE5-A4EE-657C-EB28-D654764213E4}
14 | Library
15 | Properties
16 | Assembly-CSharp
17 | v3.5
18 | 512
19 | .
20 |
21 |
22 | true
23 | full
24 | false
25 | Temp\bin\Debug\
26 | DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_1_5;UNITY_2018_1;UNITY_2018;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_WEBGL;UNITY_WEBGL;UNITY_WEBGL_API;UNITY_DISABLE_WEB_VERIFICATION;UNITY_GFX_USE_PLATFORM_VSYNC;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_VR;ENABLE_SPATIALTRACKING;ENABLE_IL2CPP;NET_2_0_SUBSET;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU
27 | prompt
28 | 4
29 | 0169
30 | False
31 |
32 |
33 | pdbonly
34 | true
35 | Temp\bin\Release\
36 | prompt
37 | 4
38 | 0169
39 | False
40 |
41 |
42 | true
43 | true
44 | false
45 | false
46 | false
47 |
48 |
49 | {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
50 | Unity/VSTU
51 | Game:1
52 | WebGL:20
53 | 2018.1.5f1
54 |
55 |
56 |
57 | C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll
58 |
59 |
60 | C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Library/ScriptAssemblies/UnityEditor.StandardEvents.dll
70 |
71 |
72 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll
73 |
74 |
75 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll
76 |
77 |
78 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll
79 |
80 |
81 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll
82 |
83 |
84 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll
85 |
86 |
87 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll
88 |
89 |
90 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll
91 |
92 |
93 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.BaselibModule.dll
94 |
95 |
96 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll
97 |
98 |
99 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll
100 |
101 |
102 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll
103 |
104 |
105 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll
106 |
107 |
108 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll
109 |
110 |
111 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.FacebookModule.dll
112 |
113 |
114 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll
115 |
116 |
117 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll
118 |
119 |
120 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll
121 |
122 |
123 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll
124 |
125 |
126 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll
127 |
128 |
129 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll
130 |
131 |
132 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll
133 |
134 |
135 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll
136 |
137 |
138 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll
139 |
140 |
141 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll
142 |
143 |
144 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll
145 |
146 |
147 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll
148 |
149 |
150 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll
151 |
152 |
153 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll
154 |
155 |
156 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll
157 |
158 |
159 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll
160 |
161 |
162 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll
163 |
164 |
165 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll
166 |
167 |
168 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll
169 |
170 |
171 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll
172 |
173 |
174 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll
175 |
176 |
177 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll
178 |
179 |
180 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll
181 |
182 |
183 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll
184 |
185 |
186 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TimelineModule.dll
187 |
188 |
189 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll
190 |
191 |
192 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll
193 |
194 |
195 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll
196 |
197 |
198 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll
199 |
200 |
201 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll
202 |
203 |
204 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll
205 |
206 |
207 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll
208 |
209 |
210 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll
211 |
212 |
213 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll
214 |
215 |
216 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll
217 |
218 |
219 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll
220 |
221 |
222 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll
223 |
224 |
225 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll
226 |
227 |
228 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll
229 |
230 |
231 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.WebModule.dll
232 |
233 |
234 | C:/Program Files/Unity/Editor/Data/PlaybackEngines/WebGLSupport/Managed/UnityEngine.WebGLModule.dll
235 |
236 |
237 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll
238 |
239 |
240 | C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll
241 |
242 |
243 | C:/Program Files/Unity/Editor/Data/Managed/Unity.Locator.dll
244 |
245 |
246 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll
247 |
248 |
249 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll
250 |
251 |
252 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll
253 |
254 |
255 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UIAutomation/UnityEngine.UIAutomation.dll
256 |
257 |
258 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll
259 |
260 |
261 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll
262 |
263 |
264 | C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll
265 |
266 |
267 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/BouncyCastle.Crypto.dll
268 |
269 |
270 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.ABI.dll
271 |
272 |
273 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.Contracts.dll
274 |
275 |
276 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.Hex.dll
277 |
278 |
279 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.JsonRpc.Client.dll
280 |
281 |
282 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.KeyStore.dll
283 |
284 |
285 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.RLP.dll
286 |
287 |
288 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.RPC.dll
289 |
290 |
291 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.Signer.dll
292 |
293 |
294 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.Unity.dll
295 |
296 |
297 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Nethereum.Util.dll
298 |
299 |
300 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/Newtonsoft.Json.dll
301 |
302 |
303 | C:/Users/juanf/Documents/source/repos/Unity3dSimpleSample/Assets/Plugins/System.Threading.dll
304 |
305 |
306 | C:/Users/juanf/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll
307 |
308 |
309 | C:/Users/juanf/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll
310 |
311 |
312 | C:/Users/juanf/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll
313 |
314 |
315 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/mscorlib.dll
316 |
317 |
318 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.dll
319 |
320 |
321 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Core.dll
322 |
323 |
324 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Runtime.Serialization.dll
325 |
326 |
327 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Xml.dll
328 |
329 |
330 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Xml.Linq.dll
331 |
332 |
333 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/UnityScript.dll
334 |
335 |
336 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/UnityScript.Lang.dll
337 |
338 |
339 | C:/Program Files/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unity/Boo.Lang.dll
340 |
341 |
342 |
343 |
344 |
351 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity3d Simple Sample (Ether transfer, ERC20 Contract deployment, transfer, query and balance)
2 |
3 | # PLEASE GO TO https://github.com/Nethereum/Unity3dSampleTemplate FOR THE LATEST SAMPLE
4 |
5 | This sample demonstrates how to transfer Ether and the interaction with as smart contract (in this scenario an ERC20 token smart contract) including Deployment of the contract, Transfer of a token (transaction), Query the balance of a token (calls) and finally retrieve Events from Ethereum.
6 |
7 | This sample uses the latest version of Nethereum which you can download from the releases.
8 |
9 | **Note:**
10 |
11 | Please remember to remove System.HttpCliend and UnityEngine of the Nethereum release package if included
12 |
13 | The sample is outdated in some areas, if upgrading check the current small changes here
14 | https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Unity/
15 | For example:
16 | https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Unity/EthTransferUnityRequest.cs#L11
17 |
18 |
19 | ## Simple Ether transfer
20 | To transfer Ether Nethereum provides a specific Unity Request, the ```EthTransferUnityRequest```.
21 |
22 | The EthTransferUnityRequest it is instantiated with the "url" of our Ethereum client, the private key to be able to sign transactions and our account address (the same of the private key).
23 |
24 | ```csharp
25 | var url = "http://localhost:8545";
26 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
27 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
28 | var ethTransfer = new EthTransferUnityRequest(url, privateKey, account);
29 | ```
30 |
31 | Once our unity request is instantiated it we can initiate the transfer as follows:
32 |
33 | ```csharp
34 | var receivingAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";
35 | yield return ethTransfer.TransferEther(receivingAddress, 1.1m, 2);
36 | ```
37 |
38 | Here we have specified the receivingAddress, the amount to send and the optional gas price in Gwei. The request will automatically convert the gas price to Wei.
39 |
40 | We can validate afterwards if we have had any exception as following:
41 | ```
42 | if (ethTransfer.Exception != null)
43 | {
44 | Debug.Log(ethTransfer.Exception.Message);
45 | yield break;
46 | }
47 | ```
48 |
49 | If no errors have occurred we can retrieve the transaction hash from the Request and Poll every 2 seconds to wait for the transaction to be mined.
50 |
51 | ```csharp
52 | var transactionHash = ethTransfer.Result;
53 | //create a poll to get the receipt when mined
54 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
55 | //checking every 2 seconds for the receipt
56 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
57 | ```
58 |
59 | Finally we can check the balance of our recieving account, using ```EthGetBalanceUnityRequest```. Note that we specify we want the balance for the latest Block when doing the request.
60 |
61 | ```csharp
62 | var balanceRequest = new EthGetBalanceUnityRequest(url);
63 | yield return balanceRequest.SendRequest(receivingAddress, BlockParameter.CreateLatest());
64 | ```
65 |
66 | We can convert the result in Wei to Eth using the default Wei UnitConvertor.
67 |
68 | ```csharp
69 | Debug.Log("Balance of account:" + UnitConversion.Convert.FromWei(balanceRequest.Result.Value));
70 | ```
71 |
72 | ### Full sample
73 | ```csharp
74 | public IEnumerator TransferEther()
75 | {
76 | var url = "http://localhost:8545";
77 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
78 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
79 | //initialising the transaction request sender
80 | var ethTransfer = new EthTransferUnityRequest(url, privateKey, account);
81 |
82 | var receivingAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";
83 | yield return ethTransfer.TransferEther("0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe", 1.1m, 2);
84 |
85 | if (ethTransfer.Exception != null)
86 | {
87 | Debug.Log(ethTransfer.Exception.Message);
88 | yield break;
89 | }
90 |
91 | var transactionHash = ethTransfer.Result;
92 |
93 | Debug.Log("Transfer transaction hash:" + transactionHash);
94 |
95 | //create a poll to get the receipt when mined
96 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
97 | //checking every 2 seconds for the receipt
98 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
99 |
100 | Debug.Log("Transaction mined");
101 |
102 | var balanceRequest = new EthGetBalanceUnityRequest(url);
103 | yield return balanceRequest.SendRequest(receivingAddress, BlockParameter.CreateLatest());
104 |
105 |
106 | Debug.Log("Balance of account:" + UnitConversion.Convert.FromWei(balanceRequest.Result.Value));
107 | }
108 |
109 | ```
110 |
111 | # Smart contract Integration
112 |
113 | This sample covers all the steps of smart contract integration using the ERC20 standard token.
114 |
115 | ## Declare our smart contract definition
116 | First step is to include our smart contract definition, this can be code generated using the vscode solidity extension or the console code generation tool.
117 |
118 | ```csharp
119 | //Deployment contract object definition
120 | public partial class EIP20Deployment : EIP20DeploymentBase
121 | {
122 | public EIP20Deployment() : base(BYTECODE) { }
123 | public EIP20Deployment(string byteCode) : base(byteCode) { }
124 | }
125 |
126 |
127 |
128 | public class EIP20DeploymentBase : ContractDeploymentMessage
129 | {
130 | public static string BYTECODE = "608060405234801561001057600080fd5b506040516107843803806107848339810160409081528151602080840151838501516060860151336000908152808552959095208490556002849055908501805193959094919391019161006991600391860190610096565b506004805460ff191660ff8416179055805161008c906005906020840190610096565b5050505050610131565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d757805160ff1916838001178555610104565b82800160010185558215610104579182015b828111156101045782518255916020019190600101906100e9565b50610110929150610114565b5090565b61012e91905b80821115610110576000815560010161011a565b90565b610644806101406000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017557806323b872dd1461019c57806327e235e3146101c6578063313ce567146101e75780635c6581651461021257806370a082311461023957806395d89b411461025a578063a9059cbb1461026f578063dd62ed3e14610293575b600080fd5b3480156100bf57600080fd5b506100c86102ba565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101025781810151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014957600080fd5b50610161600160a060020a0360043516602435610348565b604080519115158252519081900360200190f35b34801561018157600080fd5b5061018a6103ae565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610161600160a060020a03600435811690602435166044356103b4565b3480156101d257600080fd5b5061018a600160a060020a03600435166104b7565b3480156101f357600080fd5b506101fc6104c9565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b5061018a600160a060020a03600435811690602435166104d2565b34801561024557600080fd5b5061018a600160a060020a03600435166104ef565b34801561026657600080fd5b506100c861050a565b34801561027b57600080fd5b50610161600160a060020a0360043516602435610565565b34801561029f57600080fd5b5061018a600160a060020a03600435811690602435166105ed565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103405780601f1061031557610100808354040283529160200191610340565b820191906000526020600020905b81548152906001019060200180831161032357829003601f168201915b505050505081565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025481565b600160a060020a03831660008181526001602090815260408083203384528252808320549383529082905281205490919083118015906103f45750828110155b15156103ff57600080fd5b600160a060020a038085166000908152602081905260408082208054870190559187168152208054849003905560001981101561046157600160a060020a03851660009081526001602090815260408083203384529091529020805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60006020819052908152604090205481565b60045460ff1681565b600160209081526000928352604080842090915290825290205481565b600160a060020a031660009081526020819052604090205490565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103405780601f1061031557610100808354040283529160200191610340565b3360009081526020819052604081205482111561058157600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a039182166000908152600160209081526040808320939094168252919091522054905600a165627a7a7230582084c618322109054a21a57e27075384a6172ab854e4b2c2d35062a964a6bf593f0029";
131 |
132 | public EIP20DeploymentBase() : base(BYTECODE) { }
133 |
134 | public EIP20DeploymentBase(string byteCode) : base(byteCode) { }
135 |
136 | [Parameter("uint256", "_initialAmount", 1)]
137 |
138 | public BigInteger InitialAmount { get; set; }
139 |
140 | [Parameter("string", "_tokenName", 2)]
141 |
142 | public string TokenName { get; set; }
143 |
144 | [Parameter("uint8", "_decimalUnits", 3)]
145 |
146 | public byte DecimalUnits { get; set; }
147 |
148 | [Parameter("string", "_tokenSymbol", 4)]
149 |
150 | public string TokenSymbol { get; set; }
151 |
152 | }
153 |
154 |
155 |
156 | [Function("transfer", "bool")]
157 | public class TransferFunctionBase : FunctionMessage
158 | {
159 | [Parameter("address", "_to", 1)]
160 | public string To { get; set; }
161 | [Parameter("uint256", "_value", 2)]
162 | public BigInteger Value { get; set; }
163 | }
164 |
165 |
166 |
167 | public partial class TransferFunction : TransferFunctionBase
168 | {
169 | }
170 |
171 | [Function("balanceOf", "uint256")]
172 | public class BalanceOfFunction : FunctionMessage
173 | {
174 | [Parameter("address", "_owner", 1)]
175 | public string Owner { get; set; }
176 | }
177 |
178 | [FunctionOutput]
179 | public class BalanceOfFunctionOutput : IFunctionOutputDTO
180 | {
181 | [Parameter("uint256", 1)]
182 | public int Balance { get; set; }
183 | }
184 |
185 | [Event("Transfer")]
186 | public class TransferEventDTOBase : IEventDTO
187 | {
188 | [Parameter("address", "_from", 1, true)]
189 | public virtual string From { get; set; }
190 |
191 | [Parameter("address", "_to", 2, true)]
192 | public virtual string To { get; set; }
193 |
194 | [Parameter("uint256", "_value", 3, false)]
195 | public virtual BigInteger Value { get; set; }
196 | }
197 |
198 | public partial class TransferEventDTO : TransferEventDTOBase
199 | {
200 | public static EventABI GetEventABI()
201 | {
202 | return EventExtensions.GetEventABI();
203 | }
204 | }
205 | ```
206 |
207 | ## Contract deployment
208 | To deploy a smart contract we create a TransactionSignedUnityRequest with our url and signing information.
209 | Creating a new EIP20Deployment contract definition we set the constructor parameters and send the transaction.
210 | Finally we we create TransactionReceiptPollingRequest to poll for the transaction receipt and retrieve the newly deployed contract address from the transaction receipt.
211 |
212 | ```csharp
213 | var url = "http://localhost:8545";
214 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
215 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
216 | //initialising the transaction request sender
217 |
218 | var transactionRequest = new TransactionSignedUnityRequest(url, privateKey, account);
219 |
220 | var deployContract = new EIP20Deployment()
221 | {
222 | InitialAmount = 10000,
223 | FromAddress = account,
224 | TokenName = "TST",
225 | TokenSymbol = "TST"
226 | };
227 |
228 | //deploy the contract
229 | yield return transactionRequest.SignAndSendDeploymentContractTransaction(deployContract);
230 |
231 | if (transactionRequest.Exception != null)
232 | {
233 | Debug.Log(transactionRequest.Exception.Message);
234 | yield break;
235 | }
236 |
237 | var transactionHash = transactionRequest.Result;
238 | Debug.Log("Deployment transaction hash:" + transactionHash);
239 |
240 | //create a poll to get the receipt when mined
241 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
242 |
243 | //checking every 2 seconds for the receipt
244 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
245 |
246 | var deploymentReceipt = transactionReceiptPolling.Result;
247 |
248 | Debug.Log("Deployment contract address:" + deploymentReceipt.ContractAddress);
249 | ```
250 |
251 | ## Query smart contract
252 | To Query a smart contract we need to create a new QueryUnityRequest providing the FunctionType and ReturnType.
253 | We then will yield the Query and the query result Result object will provide us the Ouput of the contract already decoded.
254 |
255 | ```csharp
256 | //Query request using our acccount and the contracts address (no parameters needed and default values)
257 | var queryRequest = new QueryUnityRequest(url, account);
258 | yield return queryRequest.Query(new BalanceOfFunction(){Owner = account}, deploymentReceipt.ContractAddress);
259 |
260 | //Getting the dto response already decoded
261 | var dtoResult = queryRequest.Result;
262 | Debug.Log(dtoResult.Balance);
263 | ```
264 |
265 | ## Transfer transaction
266 | To send a transaction to interact with a smart contract has similar steps to the deployment.
267 | We first create a TransactionSignedUnityRequest and our Function including any parameters, once the transaction is send we poll for the transaction receipt which will confirm the success of the transaction.
268 |
269 | Using the transaction receipt we can decoded any logs / events for that transaction.
270 |
271 | ```csharp
272 | var transactionTransferRequest = new TransactionSignedUnityRequest(url, privateKey, account);
273 | var newAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";
274 |
275 |
276 | var transactionMessage = new TransferFunction
277 | {
278 | FromAddress = account,
279 | To = newAddress,
280 | Value = 1000,
281 | };
282 |
283 | yield return transactionTransferRequest.SignAndSendTransaction(transactionMessage, deploymentReceipt.ContractAddress);
284 | var transactionTransferHash = transactionTransferRequest.Result;
285 |
286 | Debug.Log("Transfer txn hash:" + transactionHash);
287 |
288 | transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
289 | yield return transactionReceiptPolling.PollForReceipt(transactionTransferHash, 2);
290 | var transferReceipt = transactionReceiptPolling.Result;
291 |
292 | var transferEvent = transferReceipt.DecodeAllEvents();
293 | Debug.Log("Transferd amount from event: " + transferEvent[0].Event.Value);
294 | ```
295 |
296 | ## Logs and Events
297 | To retrived the logs / events of a smart contract we use the EthGetLogsUnityRequest combined with a FilterInput specific to our Event.
298 | FilterInputs can be created using the EventDTO extension GetEventABI().
299 | Once we have yield the request, we can decode all matching events using the Result.DecodeAllEvents, extension method.
300 |
301 | ```csharp
302 | var getLogsRequest = new EthGetLogsUnityRequest(url);
303 | var eventTransfer = TransferEventDTO.GetEventABI();
304 | yield return getLogsRequest.SendRequest(eventTransfer.CreateFilterInput(deploymentReceipt.ContractAddress, account));
305 | var eventDecoded = getLogsRequest.Result.DecodeAllEvents();
306 | Debug.Log("Transferd amount from get logs event: " + eventDecoded[0].Event.Value);
307 | ```
308 |
309 | ## Full sample
310 | ```csharp
311 | using System.Collections;
312 | using System.Collections.Generic;
313 | using System.Numerics;
314 | using Nethereum.ABI.FunctionEncoding.Attributes;
315 | using Nethereum.ABI.Model;
316 | using Nethereum.Contracts;
317 | using Nethereum.Contracts.CQS;
318 | using Nethereum.Contracts.Extensions;
319 | using Nethereum.JsonRpc.UnityClient;
320 | using UnityEngine;
321 |
322 |
323 | public class TokenDeployAndSend : MonoBehaviour {
324 |
325 |
326 |
327 | //Deployment contract object definition
328 | public partial class EIP20Deployment : EIP20DeploymentBase
329 | {
330 | public EIP20Deployment() : base(BYTECODE) { }
331 | public EIP20Deployment(string byteCode) : base(byteCode) { }
332 | }
333 |
334 |
335 |
336 | public class EIP20DeploymentBase : ContractDeploymentMessage
337 | {
338 | public static string BYTECODE = "608060405234801561001057600080fd5b506040516107843803806107848339810160409081528151602080840151838501516060860151336000908152808552959095208490556002849055908501805193959094919391019161006991600391860190610096565b506004805460ff191660ff8416179055805161008c906005906020840190610096565b5050505050610131565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d757805160ff1916838001178555610104565b82800160010185558215610104579182015b828111156101045782518255916020019190600101906100e9565b50610110929150610114565b5090565b61012e91905b80821115610110576000815560010161011a565b90565b610644806101406000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017557806323b872dd1461019c57806327e235e3146101c6578063313ce567146101e75780635c6581651461021257806370a082311461023957806395d89b411461025a578063a9059cbb1461026f578063dd62ed3e14610293575b600080fd5b3480156100bf57600080fd5b506100c86102ba565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101025781810151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014957600080fd5b50610161600160a060020a0360043516602435610348565b604080519115158252519081900360200190f35b34801561018157600080fd5b5061018a6103ae565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610161600160a060020a03600435811690602435166044356103b4565b3480156101d257600080fd5b5061018a600160a060020a03600435166104b7565b3480156101f357600080fd5b506101fc6104c9565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b5061018a600160a060020a03600435811690602435166104d2565b34801561024557600080fd5b5061018a600160a060020a03600435166104ef565b34801561026657600080fd5b506100c861050a565b34801561027b57600080fd5b50610161600160a060020a0360043516602435610565565b34801561029f57600080fd5b5061018a600160a060020a03600435811690602435166105ed565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103405780601f1061031557610100808354040283529160200191610340565b820191906000526020600020905b81548152906001019060200180831161032357829003601f168201915b505050505081565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025481565b600160a060020a03831660008181526001602090815260408083203384528252808320549383529082905281205490919083118015906103f45750828110155b15156103ff57600080fd5b600160a060020a038085166000908152602081905260408082208054870190559187168152208054849003905560001981101561046157600160a060020a03851660009081526001602090815260408083203384529091529020805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60006020819052908152604090205481565b60045460ff1681565b600160209081526000928352604080842090915290825290205481565b600160a060020a031660009081526020819052604090205490565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103405780601f1061031557610100808354040283529160200191610340565b3360009081526020819052604081205482111561058157600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a039182166000908152600160209081526040808320939094168252919091522054905600a165627a7a7230582084c618322109054a21a57e27075384a6172ab854e4b2c2d35062a964a6bf593f0029";
339 |
340 | public EIP20DeploymentBase() : base(BYTECODE) { }
341 |
342 | public EIP20DeploymentBase(string byteCode) : base(byteCode) { }
343 |
344 | [Parameter("uint256", "_initialAmount", 1)]
345 |
346 | public BigInteger InitialAmount { get; set; }
347 |
348 | [Parameter("string", "_tokenName", 2)]
349 |
350 | public string TokenName { get; set; }
351 |
352 | [Parameter("uint8", "_decimalUnits", 3)]
353 |
354 | public byte DecimalUnits { get; set; }
355 |
356 | [Parameter("string", "_tokenSymbol", 4)]
357 |
358 | public string TokenSymbol { get; set; }
359 |
360 | }
361 |
362 |
363 |
364 | [Function("transfer", "bool")]
365 | public class TransferFunctionBase : FunctionMessage
366 | {
367 | [Parameter("address", "_to", 1)]
368 | public string To { get; set; }
369 | [Parameter("uint256", "_value", 2)]
370 | public BigInteger Value { get; set; }
371 | }
372 |
373 |
374 |
375 | public partial class TransferFunction : TransferFunctionBase
376 | {
377 | }
378 |
379 | [Function("balanceOf", "uint256")]
380 | public class BalanceOfFunction : FunctionMessage
381 | {
382 | [Parameter("address", "_owner", 1)]
383 | public string Owner { get; set; }
384 | }
385 |
386 | [FunctionOutput]
387 | public class BalanceOfFunctionOutput : IFunctionOutputDTO
388 | {
389 | [Parameter("uint256", 1)]
390 | public int Balance { get; set; }
391 | }
392 |
393 | [Event("Transfer")]
394 | public class TransferEventDTOBase : IEventDTO
395 | {
396 | [Parameter("address", "_from", 1, true)]
397 | public virtual string From { get; set; }
398 |
399 | [Parameter("address", "_to", 2, true)]
400 | public virtual string To { get; set; }
401 |
402 | [Parameter("uint256", "_value", 3, false)]
403 | public virtual BigInteger Value { get; set; }
404 | }
405 |
406 | public partial class TransferEventDTO : TransferEventDTOBase
407 | {
408 | public static EventABI GetEventABI()
409 | {
410 | return EventExtensions.GetEventABI();
411 | }
412 | }
413 |
414 |
415 |
416 | // Use this for initialization
417 | void Start () {
418 |
419 | // StartCoroutine(DeployAndTransferToken());
420 | }
421 |
422 |
423 | //Sample of new features / requests
424 | public IEnumerator DeployAndTransferToken()
425 | {
426 |
427 | var url = "http://localhost:8545";
428 | var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
429 | var account = "0x12890d2cce102216644c59daE5baed380d84830c";
430 | //initialising the transaction request sender
431 |
432 | var transactionRequest = new TransactionSignedUnityRequest(url, privateKey, account);
433 |
434 | var deployContract = new EIP20Deployment()
435 | {
436 | InitialAmount = 10000,
437 | FromAddress = account,
438 | TokenName = "TST",
439 | TokenSymbol = "TST"
440 | };
441 |
442 | //deploy the contract
443 | yield return transactionRequest.SignAndSendDeploymentContractTransaction(deployContract);
444 |
445 | if (transactionRequest.Exception != null)
446 | {
447 | Debug.Log(transactionRequest.Exception.Message);
448 | yield break;
449 | }
450 |
451 | var transactionHash = transactionRequest.Result;
452 | Debug.Log("Deployment transaction hash:" + transactionHash);
453 |
454 | //create a poll to get the receipt when mined
455 | var transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
456 |
457 | //checking every 2 seconds for the receipt
458 | yield return transactionReceiptPolling.PollForReceipt(transactionHash, 2);
459 |
460 | var deploymentReceipt = transactionReceiptPolling.Result;
461 |
462 | Debug.Log("Deployment contract address:" + deploymentReceipt.ContractAddress);
463 |
464 | //Query request using our acccount and the contracts address (no parameters needed and default values)
465 | var queryRequest = new QueryUnityRequest(url, account);
466 | yield return queryRequest.Query(new BalanceOfFunction(){Owner = account}, deploymentReceipt.ContractAddress);
467 |
468 | //Getting the dto response already decoded
469 | var dtoResult = queryRequest.Result;
470 | Debug.Log(dtoResult.Balance);
471 |
472 | var transactionTransferRequest = new TransactionSignedUnityRequest(url, privateKey, account);
473 | var newAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";
474 |
475 |
476 | var transactionMessage = new TransferFunction
477 | {
478 | FromAddress = account,
479 | To = newAddress,
480 | Value = 1000,
481 | };
482 |
483 | yield return transactionTransferRequest.SignAndSendTransaction(transactionMessage, deploymentReceipt.ContractAddress);
484 | var transactionTransferHash = transactionTransferRequest.Result;
485 |
486 | Debug.Log("Transfer txn hash:" + transactionHash);
487 |
488 | transactionReceiptPolling = new TransactionReceiptPollingRequest(url);
489 | yield return transactionReceiptPolling.PollForReceipt(transactionTransferHash, 2);
490 | var transferReceipt = transactionReceiptPolling.Result;
491 |
492 | var transferEvent = transferReceipt.DecodeAllEvents();
493 | Debug.Log("Transferd amount from event: " + transferEvent[0].Event.Value);
494 |
495 | var getLogsRequest = new EthGetLogsUnityRequest(url);
496 | var eventTransfer = TransferEventDTO.GetEventABI();
497 | yield return getLogsRequest.SendRequest(eventTransfer.CreateFilterInput(deploymentReceipt.ContractAddress, account));
498 |
499 | var eventDecoded = getLogsRequest.Result.DecodeAllEvents();
500 | Debug.Log("Transferd amount from get logs event: " + eventDecoded[0].Event.Value);
501 |
502 | }
503 | }
504 | ```
505 |
--------------------------------------------------------------------------------