diff --git a/unity/com.ic.gamekit/ICP.NET.meta b/unity/com.ic.gamekit/ICP.NET.meta new file mode 100644 index 0000000..f33671f --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4a6feb745caba6742b541194efcd4364 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/Chaos.NaCl.dll b/unity/com.ic.gamekit/ICP.NET/Chaos.NaCl.dll new file mode 100644 index 0000000..99a22be Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/Chaos.NaCl.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/Chaos.NaCl.dll.meta b/unity/com.ic.gamekit/ICP.NET/Chaos.NaCl.dll.meta new file mode 100644 index 0000000..3a53574 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/Chaos.NaCl.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: f745e12d1a54fa048b17f8a755aee668 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/Dahomey.Cbor.dll b/unity/com.ic.gamekit/ICP.NET/Dahomey.Cbor.dll new file mode 100644 index 0000000..e0812fb Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/Dahomey.Cbor.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/Dahomey.Cbor.dll.meta b/unity/com.ic.gamekit/ICP.NET/Dahomey.Cbor.dll.meta new file mode 100644 index 0000000..4c337af --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/Dahomey.Cbor.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 2762ae604c55d504b973b2b9a472f2a4 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Agent.dll b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Agent.dll new file mode 100644 index 0000000..8bc13ca Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Agent.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Agent.dll.meta b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Agent.dll.meta new file mode 100644 index 0000000..2ce5e54 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Agent.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 65f5841a34645bb4e82690ad70e4dcef +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Candid.dll b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Candid.dll new file mode 100644 index 0000000..3c35f17 Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Candid.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Candid.dll.meta b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Candid.dll.meta new file mode 100644 index 0000000..33444ec --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/EdjCase.ICP.Candid.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 290210d329558054d9cbc33b30241941 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/LICENSE b/unity/com.ic.gamekit/ICP.NET/LICENSE new file mode 100644 index 0000000..174b5cc --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Ethan Celletti + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/unity/com.ic.gamekit/ICP.NET/LICENSE.meta b/unity/com.ic.gamekit/ICP.NET/LICENSE.meta new file mode 100644 index 0000000..9eb18e1 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8ff964a540c66364aa2d1b1258bcb791 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/Microsoft.Bcl.HashCode.dll b/unity/com.ic.gamekit/ICP.NET/Microsoft.Bcl.HashCode.dll new file mode 100644 index 0000000..0de0f25 Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/Microsoft.Bcl.HashCode.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/Microsoft.Bcl.HashCode.dll.meta b/unity/com.ic.gamekit/ICP.NET/Microsoft.Bcl.HashCode.dll.meta new file mode 100644 index 0000000..77878b3 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/Microsoft.Bcl.HashCode.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: da3cefc971a06724daf2cdac009edef1 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/System.Collections.Immutable.dll b/unity/com.ic.gamekit/ICP.NET/System.Collections.Immutable.dll new file mode 100644 index 0000000..98774b9 Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/System.Collections.Immutable.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/System.Collections.Immutable.dll.meta b/unity/com.ic.gamekit/ICP.NET/System.Collections.Immutable.dll.meta new file mode 100644 index 0000000..34b4429 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/System.Collections.Immutable.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 07c068288c2d9674baf2713ade0ce777 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/System.IO.Pipelines.dll b/unity/com.ic.gamekit/ICP.NET/System.IO.Pipelines.dll new file mode 100644 index 0000000..f129552 Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/System.IO.Pipelines.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/System.IO.Pipelines.dll.meta b/unity/com.ic.gamekit/ICP.NET/System.IO.Pipelines.dll.meta new file mode 100644 index 0000000..bc19e59 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/System.IO.Pipelines.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: ce5b0ae0fccda8548aaf3ae7c72c5758 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/ICP.NET/System.Runtime.CompilerServices.Unsafe.dll b/unity/com.ic.gamekit/ICP.NET/System.Runtime.CompilerServices.Unsafe.dll new file mode 100644 index 0000000..491a80a Binary files /dev/null and b/unity/com.ic.gamekit/ICP.NET/System.Runtime.CompilerServices.Unsafe.dll differ diff --git a/unity/com.ic.gamekit/ICP.NET/System.Runtime.CompilerServices.Unsafe.dll.meta b/unity/com.ic.gamekit/ICP.NET/System.Runtime.CompilerServices.Unsafe.dll.meta new file mode 100644 index 0000000..8cbdb11 --- /dev/null +++ b/unity/com.ic.gamekit/ICP.NET/System.Runtime.CompilerServices.Unsafe.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 2d7ddbc84ae7bd3448ad1e1c8570c9ea +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/com.ic.gamekit/README.md b/unity/com.ic.gamekit/README.md index 3d4a985..e56e43b 100644 --- a/unity/com.ic.gamekit/README.md +++ b/unity/com.ic.gamekit/README.md @@ -19,6 +19,24 @@ You can turn on/off the post-build callback. With this checked, a folder named ` Please follow the [Unity WebGL Sample](https://github.com/dfinity/examples/tree/master/hosting/unity-webgl-template) to deploy the generated IC project to the Internet Computer. +## IC Agent + +The Internet Computer Agent is based on [ICP.NET](https://github.com/edjCase/ICP.NET) which provides the Internet Computer Protocol(ICP) libraries for .NET. + +### ICP.NET Integration +Here describes how the [ICP.NET](https://github.com/edjCase/ICP.NET) is integrated, basically explains how the managed dlls under `ICP.NET` folder are generated. + +- `EdjCase.ICP.Agent.dll` & `EdjCase.ICP.Candid.dll` are compiled from [ICP.NET](https://github.com/edjCase/ICP.NET) directly, they're targeted to .NET standard 2.0, so it’s okay to use them directly. +- For all the other dependencies, including + - Chaos.NaCl.dll (1.0.0) + - Dahomey.Cbor.dll (1.16.1) + - System.Collections.Immutable (6.0.0) + - System.Runtime.CompilerServices.Unsafe (6.0.0) + - System.IO.Pipelines (6.0.1) + - Microsoft.Bcl.HashCode.dll (1.1.1) + + Download the packages with the right version from https://www.nuget.org/packages and choose the dll with netstandard2.0 version. + ## Troubleshooting ### Get 500 error while browsing the game diff --git a/unity/com.ic.gamekit/package.json b/unity/com.ic.gamekit/package.json index 4a1177e..4d798e6 100644 --- a/unity/com.ic.gamekit/package.json +++ b/unity/com.ic.gamekit/package.json @@ -8,6 +8,7 @@ "keywords": [ "Internet Computer", "GameKit", + "Agent", "WebGL", "HTML5" ]