From 28d68c19db5c51f30154cc65be3f7e9867a29f01 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Fri, 16 Aug 2019 15:00:38 +0100 Subject: [PATCH 01/22] reorg for upm --- BaseProject/Assets/NuGet.config | 4 +- .../Assets/NuGet/Editor/DotNetZip.dll.meta | 50 +++++++++++------- .../NuGet/Editor/NuGetForUnity.dll.meta | 50 +++++++++++------- BaseProject/Assets/PusherWebsocketUnity.meta | 8 +++ .../{ => PusherWebsocketUnity}/Packages.meta | 0 .../Packages/Newtonsoft.Json.11.0.2.meta | 0 .../Newtonsoft.Json.11.0.2/.signature.p7s | Bin .../Newtonsoft.Json.11.0.2/LICENSE.md | 0 .../Newtonsoft.Json.11.0.2/LICENSE.md.meta | 0 .../Newtonsoft.Json.11.0.2.nupkg | Bin .../Newtonsoft.Json.11.0.2.nupkg.meta | 0 .../Packages/Newtonsoft.Json.11.0.2/lib.meta | 0 .../Newtonsoft.Json.11.0.2/lib/net45.meta | 0 .../lib/net45/Newtonsoft.Json.dll | Bin .../lib/net45/Newtonsoft.Json.dll.meta | 0 .../lib/net45/Newtonsoft.Json.xml | 0 .../lib/net45/Newtonsoft.Json.xml.meta | 0 .../Packages/PusherClient.1.0.2.meta | 0 .../PusherClient.1.0.2/.signature.p7s | Bin .../PusherClient.1.0.2.nupkg | Bin .../PusherClient.1.0.2.nupkg.meta | 0 .../Packages/PusherClient.1.0.2/lib.meta | 0 .../PusherClient.1.0.2/lib/net46.meta | 0 .../lib/net46/PusherClient.dll | Bin .../lib/net46/PusherClient.dll.meta | 0 .../SuperSocket.ClientEngine.Core.0.10.0.meta | 0 .../.signature.p7s | Bin ...SuperSocket.ClientEngine.Core.0.10.0.nupkg | Bin ...Socket.ClientEngine.Core.0.10.0.nupkg.meta | 0 .../lib.meta | 0 .../lib/net45.meta | 0 .../lib/net45/SuperSocket.ClientEngine.dll | Bin .../net45/SuperSocket.ClientEngine.dll.meta | 0 .../Packages/WebSocket4Net.0.15.2.meta | 0 .../WebSocket4Net.0.15.2/.signature.p7s | Bin .../WebSocket4Net.0.15.2.nupkg | Bin .../WebSocket4Net.0.15.2.nupkg.meta | 0 .../Packages/WebSocket4Net.0.15.2/lib.meta | 0 .../WebSocket4Net.0.15.2/lib/net45.meta | 0 .../lib/net45/WebSocket4Net.dll | Bin .../lib/net45/WebSocket4Net.dll.meta | 0 .../PusherManager.cs | 0 .../PusherManager.cs.meta | 0 .../{ => PusherWebsocketUnity}/Scenes.meta | 0 .../Scenes/PusherWebsocketScene.unity | 0 .../Scenes/PusherWebsocketScene.unity.meta | 0 46 files changed, 70 insertions(+), 42 deletions(-) create mode 100644 BaseProject/Assets/PusherWebsocketUnity.meta rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/.signature.p7s (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/LICENSE.md (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/LICENSE.md.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/lib.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/lib/net45.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/.signature.p7s (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/lib.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/lib/net46.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/.signature.p7s (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/.signature.p7s (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/lib.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/lib/net45.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/PusherManager.cs (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/PusherManager.cs.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Scenes.meta (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Scenes/PusherWebsocketScene.unity (100%) rename BaseProject/Assets/{ => PusherWebsocketUnity}/Scenes/PusherWebsocketScene.unity.meta (100%) diff --git a/BaseProject/Assets/NuGet.config b/BaseProject/Assets/NuGet.config index 0610bae..b1cf751 100644 --- a/BaseProject/Assets/NuGet.config +++ b/BaseProject/Assets/NuGet.config @@ -8,7 +8,7 @@ - + - \ No newline at end of file + diff --git a/BaseProject/Assets/NuGet/Editor/DotNetZip.dll.meta b/BaseProject/Assets/NuGet/Editor/DotNetZip.dll.meta index 908a5bc..8bae2cc 100644 --- a/BaseProject/Assets/NuGet/Editor/DotNetZip.dll.meta +++ b/BaseProject/Assets/NuGet/Editor/DotNetZip.dll.meta @@ -1,20 +1,30 @@ -fileFormatVersion: 2 -guid: a8e8091a1f84e704a9f4d4abd2e15f8b -timeCreated: 1517875082 -licenseType: Store -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Any: - enabled: 0 - settings: {} - Editor: - enabled: 1 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: a8e8091a1f84e704a9f4d4abd2e15f8b +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/BaseProject/Assets/NuGet/Editor/NuGetForUnity.dll.meta b/BaseProject/Assets/NuGet/Editor/NuGetForUnity.dll.meta index 02b6ef1..88f8917 100644 --- a/BaseProject/Assets/NuGet/Editor/NuGetForUnity.dll.meta +++ b/BaseProject/Assets/NuGet/Editor/NuGetForUnity.dll.meta @@ -1,20 +1,30 @@ -fileFormatVersion: 2 -guid: 8dc1be91775c4bb469f6b74cef450eaa -timeCreated: 1510280416 -licenseType: Store -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Any: - enabled: 0 - settings: {} - Editor: - enabled: 1 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 8dc1be91775c4bb469f6b74cef450eaa +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/BaseProject/Assets/PusherWebsocketUnity.meta b/BaseProject/Assets/PusherWebsocketUnity.meta new file mode 100644 index 0000000..5f0d47e --- /dev/null +++ b/BaseProject/Assets/PusherWebsocketUnity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42676a7cae3de4809a47aaae80df0352 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/BaseProject/Assets/Packages.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages.meta similarity index 100% rename from BaseProject/Assets/Packages.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/.signature.p7s b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/.signature.p7s similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/.signature.p7s rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/.signature.p7s diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/LICENSE.md b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/LICENSE.md similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/LICENSE.md rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/LICENSE.md diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/LICENSE.md.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/LICENSE.md.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/LICENSE.md.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/LICENSE.md.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll.meta diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml diff --git a/BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml.meta similarity index 100% rename from BaseProject/Assets/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml.meta diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2.meta similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2.meta diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/.signature.p7s b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/.signature.p7s similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/.signature.p7s rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/.signature.p7s diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg.meta similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/PusherClient.1.0.2.nupkg.meta diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/lib.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib.meta similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/lib.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib.meta diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/lib/net46.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib/net46.meta similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/lib/net46.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib/net46.meta diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll diff --git a/BaseProject/Assets/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll.meta similarity index 100% rename from BaseProject/Assets/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/PusherClient.1.0.2/lib/net46/PusherClient.dll.meta diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0.meta similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0.meta diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/.signature.p7s b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/.signature.p7s similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/.signature.p7s rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/.signature.p7s diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg.meta similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/SuperSocket.ClientEngine.Core.0.10.0.nupkg.meta diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib.meta similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib.meta diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45.meta similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45.meta diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll diff --git a/BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll.meta similarity index 100% rename from BaseProject/Assets/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/SuperSocket.ClientEngine.Core.0.10.0/lib/net45/SuperSocket.ClientEngine.dll.meta diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2.meta similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2.meta diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/.signature.p7s b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/.signature.p7s similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/.signature.p7s rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/.signature.p7s diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg.meta similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/WebSocket4Net.0.15.2.nupkg.meta diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib.meta similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib.meta diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib/net45.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib/net45.meta similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib/net45.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib/net45.meta diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll diff --git a/BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll.meta b/BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll.meta similarity index 100% rename from BaseProject/Assets/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll.meta rename to BaseProject/Assets/PusherWebsocketUnity/Packages/WebSocket4Net.0.15.2/lib/net45/WebSocket4Net.dll.meta diff --git a/BaseProject/Assets/PusherManager.cs b/BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs similarity index 100% rename from BaseProject/Assets/PusherManager.cs rename to BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs diff --git a/BaseProject/Assets/PusherManager.cs.meta b/BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs.meta similarity index 100% rename from BaseProject/Assets/PusherManager.cs.meta rename to BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs.meta diff --git a/BaseProject/Assets/Scenes.meta b/BaseProject/Assets/PusherWebsocketUnity/Scenes.meta similarity index 100% rename from BaseProject/Assets/Scenes.meta rename to BaseProject/Assets/PusherWebsocketUnity/Scenes.meta diff --git a/BaseProject/Assets/Scenes/PusherWebsocketScene.unity b/BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity similarity index 100% rename from BaseProject/Assets/Scenes/PusherWebsocketScene.unity rename to BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity diff --git a/BaseProject/Assets/Scenes/PusherWebsocketScene.unity.meta b/BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity.meta similarity index 100% rename from BaseProject/Assets/Scenes/PusherWebsocketScene.unity.meta rename to BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity.meta From 4135fcfbf242cdf81f95fa2eeae8072f51dd02f9 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Fri, 16 Aug 2019 15:30:44 +0100 Subject: [PATCH 02/22] add asmdef, add package.json, rename build --- .../PusherWebsocketUnity.asmdef | 3 +++ .../PusherWebsocketUnity.asmdef.meta | 7 +++++++ .../Assets/PusherWebsocketUnity/package.json | 7 +++++++ ... PusherWebsocketUnity-1.0.2+190808.unitypackage} | Bin 4 files changed, 17 insertions(+) create mode 100644 BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef create mode 100644 BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef.meta create mode 100644 BaseProject/Assets/PusherWebsocketUnity/package.json rename Builds/{PusherWebsocketUnity-1.0.2-190808.unitypackage => PusherWebsocketUnity-1.0.2+190808.unitypackage} (100%) diff --git a/BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef b/BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef new file mode 100644 index 0000000..f0118fb --- /dev/null +++ b/BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef @@ -0,0 +1,3 @@ +{ + "name": "PusherWebsocketUnity" +} diff --git a/BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef.meta b/BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef.meta new file mode 100644 index 0000000..42e1b1d --- /dev/null +++ b/BaseProject/Assets/PusherWebsocketUnity/PusherWebsocketUnity.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 214d111c56e3c46a09052e93cff2046f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/BaseProject/Assets/PusherWebsocketUnity/package.json b/BaseProject/Assets/PusherWebsocketUnity/package.json new file mode 100644 index 0000000..182ef07 --- /dev/null +++ b/BaseProject/Assets/PusherWebsocketUnity/package.json @@ -0,0 +1,7 @@ +{ + "name": "com.pusher.pusherwebsocketunity", + "displayName": "PusherWebsocketUnity", + "version": "1.0.2+190816", + "unity": "2018.1.0", + "description": "Pusher Channels Client for realtime websockets on Unity" +} diff --git a/Builds/PusherWebsocketUnity-1.0.2-190808.unitypackage b/Builds/PusherWebsocketUnity-1.0.2+190808.unitypackage similarity index 100% rename from Builds/PusherWebsocketUnity-1.0.2-190808.unitypackage rename to Builds/PusherWebsocketUnity-1.0.2+190808.unitypackage From c4ac26a6dc141061740a03218394653ab5d81883 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Fri, 16 Aug 2019 15:49:09 +0100 Subject: [PATCH 03/22] add makefile --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c3ab7a7 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +build-release: + git subtree split --prefix=BaseProject/Assets/PusherWebsocketUnity --branch upm + git tag $(VERSION) upm + +push-release: + git push origin upm --tags From 2dca8027b61eb2586757638e4d7cc34ab8505f83 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Fri, 16 Aug 2019 16:12:11 +0100 Subject: [PATCH 04/22] fix unity version --- BaseProject/Assets/PusherWebsocketUnity/package.json | 2 +- BaseProject/Assets/PusherWebsocketUnity/package.json.meta | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 BaseProject/Assets/PusherWebsocketUnity/package.json.meta diff --git a/BaseProject/Assets/PusherWebsocketUnity/package.json b/BaseProject/Assets/PusherWebsocketUnity/package.json index 182ef07..08a8196 100644 --- a/BaseProject/Assets/PusherWebsocketUnity/package.json +++ b/BaseProject/Assets/PusherWebsocketUnity/package.json @@ -2,6 +2,6 @@ "name": "com.pusher.pusherwebsocketunity", "displayName": "PusherWebsocketUnity", "version": "1.0.2+190816", - "unity": "2018.1.0", + "unity": "2018.1", "description": "Pusher Channels Client for realtime websockets on Unity" } diff --git a/BaseProject/Assets/PusherWebsocketUnity/package.json.meta b/BaseProject/Assets/PusherWebsocketUnity/package.json.meta new file mode 100644 index 0000000..92ccb70 --- /dev/null +++ b/BaseProject/Assets/PusherWebsocketUnity/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 95eeaa2f922ad4baebdb0b2855ef026a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 2744c192038281d6d78b3c60e88c7cfc8503839a Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Fri, 16 Aug 2019 16:25:48 +0100 Subject: [PATCH 05/22] fix package version --- BaseProject/Assets/PusherWebsocketUnity/package.json | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseProject/Assets/PusherWebsocketUnity/package.json b/BaseProject/Assets/PusherWebsocketUnity/package.json index 08a8196..ea4d5a0 100644 --- a/BaseProject/Assets/PusherWebsocketUnity/package.json +++ b/BaseProject/Assets/PusherWebsocketUnity/package.json @@ -1,7 +1,7 @@ { "name": "com.pusher.pusherwebsocketunity", "displayName": "PusherWebsocketUnity", - "version": "1.0.2+190816", + "version": "1.0.2+190808", "unity": "2018.1", "description": "Pusher Channels Client for realtime websockets on Unity" } diff --git a/Makefile b/Makefile index c3ab7a7..75bc2fc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ build-release: git subtree split --prefix=BaseProject/Assets/PusherWebsocketUnity --branch upm - git tag $(VERSION) upm + git tag $(VERSION) upm -f push-release: - git push origin upm --tags + git push origin upm --tags -f From 8fa7fadb488ef445099e4d7099ba220720ed2444 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Mon, 19 Aug 2019 13:45:37 +0100 Subject: [PATCH 06/22] remove force from upm Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 75bc2fc..c3ab7a7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ build-release: git subtree split --prefix=BaseProject/Assets/PusherWebsocketUnity --branch upm - git tag $(VERSION) upm -f + git tag $(VERSION) upm push-release: - git push origin upm --tags -f + git push origin upm --tags From d8fa8d8f8107df114d50d7e4f3248e28cbe8a576 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Mon, 19 Aug 2019 15:13:23 +0100 Subject: [PATCH 07/22] add UPM instructions in README --- README.md | 77 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index cc925f8..eecb160 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,6 @@ ## Pusher Channels Unity Client Library -This library packages [the official WebSocket .NET SDK for Pusher Channels](https://github.com/pusher/pusher-websocket-dotnet) as a `.unitypackage` to make it easier to use in [Unity](https://unity.com/) projects. For API documentation, see [the pusher-websocket-dotnet README](https://github.com/pusher/pusher-websocket-dotnet). - -### Usage -1) Download the latest `.unitypackage` from this repo's [Releases](/../../releases) -2) Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) -3) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent** -4) Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x-xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. -5) Create a Pusher Channels app at https://pusher.com/channels. -6) Open the `PusherManager.cs` file in the Assets folder and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained at the previous step. -7) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. -8) Save and click Play to start the game in Unity. -9) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. -10) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. - -### Repository Structure -- `BaseProject` a Unity Base project which demonstrates how to integrate Pusher Channels with Unity -- `Builds` a build environment for the `PusherWebsocketUnity` _unitypackage_ and its Asset Store release -- `Examples` example projects that combines Unity and Pusher Channels +This library packages [the official WebSocket .NET SDK for Pusher Channels](https://github.com/pusher/pusher-websocket-dotnet) as `.unitypackage` and `UPM package` to make it easier to use in [Unity](https://unity.com/) projects. For API documentation, see [the pusher-websocket-dotnet README](https://github.com/pusher/pusher-websocket-dotnet). ### Unity Versions Support - Unity 2018.1 @@ -35,6 +18,64 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http - All Unity 2019.2.x +### Usage +#### Install it via unitypackage +1) Download the latest `.unitypackage` from this repo's [Releases](/../../releases) +2) Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) +3) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. +4) Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. +5) Create a Pusher Channels app at https://pusher.com/channels. +6) Open the `PusherManager.cs` file in the Assets folder and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained at the previous step. +7) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. +8) Save and click Play to start the game in Unity. +9) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. +10) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. + +---- + +#### Install it via Unity Package Manager (UPM) +**WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the #install-it-via-unitypackage method. +1) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. +2) Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): +```json +"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" +``` + +Your `Packages/manifest.json` should now look like this: +``` +{ + "dependencies": { + ... + "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#x.x.x+xxxxxx" + } +} +``` +3) Now Unity should auto resolve dependencies and fetch the newly defined package. + +---- + +#### Update the version of .unitypackage +To update the version of the `.unitypackage` you can move your `PusherManager.cs` outside of the `PusherWebsocketUnity` folder, delete the folder, repeat steps 1) 2) 3) 4) and move the `PusherManager.cs` file back into the new `PusherWebsocketUnity` folder. + +---- + +#### Update the version of Unity Package Manager (UPM) package +To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [Releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: + +From: +```json +"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.1+190808" +``` +To: +```json +"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.2+191010" +``` + +### Repository Structure +- `BaseProject` a Unity Base project which demonstrates how to integrate Pusher Channels with Unity +- `Builds` a build environment for the `PusherWebsocketUnity` _unitypackage_ and the _Unity Package Manager_ (UPM)` release +- `Examples` example projects that combines Unity and Pusher Channels + ### Unity Platforms Support #### Supported Platforms: From 65819caef47567cc7929fcd06f42339f6f53ef0f Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Mon, 19 Aug 2019 15:19:41 +0100 Subject: [PATCH 08/22] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eecb160..39b1a2a 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http ---- #### Install it via Unity Package Manager (UPM) -**WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the #install-it-via-unitypackage method. +**WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#install-it-via-unitypackage) method. 1) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. 2) Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): ```json From 1349f14f23961a2b9cd4bfc77b20b8b53916b6c3 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Mon, 19 Aug 2019 17:27:36 +0100 Subject: [PATCH 09/22] mv PusherManager outside PusherWebsocketUnity pkg --- .../Assets/{PusherWebsocketUnity => }/PusherManager.cs | 4 ++-- .../Assets/{PusherWebsocketUnity => }/PusherManager.cs.meta | 0 BaseProject/Assets/{PusherWebsocketUnity => }/Scenes.meta | 0 .../Scenes/PusherWebsocketScene.unity | 0 .../Scenes/PusherWebsocketScene.unity.meta | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename BaseProject/Assets/{PusherWebsocketUnity => }/PusherManager.cs (95%) rename BaseProject/Assets/{PusherWebsocketUnity => }/PusherManager.cs.meta (100%) rename BaseProject/Assets/{PusherWebsocketUnity => }/Scenes.meta (100%) rename BaseProject/Assets/{PusherWebsocketUnity => }/Scenes/PusherWebsocketScene.unity (100%) rename BaseProject/Assets/{PusherWebsocketUnity => }/Scenes/PusherWebsocketScene.unity.meta (100%) diff --git a/BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs b/BaseProject/Assets/PusherManager.cs similarity index 95% rename from BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs rename to BaseProject/Assets/PusherManager.cs index f59d4ef..712edd1 100644 --- a/BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs +++ b/BaseProject/Assets/PusherManager.cs @@ -9,8 +9,8 @@ public class PusherManager : MonoBehaviour public static PusherManager instance = null; private Pusher _pusher; private Channel _channel; - private const string APP_KEY = "APP_KEY"; - private const string APP_CLUSTER = "APP_CLUSTER"; + private const string APP_KEY = "2fa570d16fa7a40dea9f"; + private const string APP_CLUSTER = "eu"; async Task Start() { diff --git a/BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs.meta b/BaseProject/Assets/PusherManager.cs.meta similarity index 100% rename from BaseProject/Assets/PusherWebsocketUnity/PusherManager.cs.meta rename to BaseProject/Assets/PusherManager.cs.meta diff --git a/BaseProject/Assets/PusherWebsocketUnity/Scenes.meta b/BaseProject/Assets/Scenes.meta similarity index 100% rename from BaseProject/Assets/PusherWebsocketUnity/Scenes.meta rename to BaseProject/Assets/Scenes.meta diff --git a/BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity b/BaseProject/Assets/Scenes/PusherWebsocketScene.unity similarity index 100% rename from BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity rename to BaseProject/Assets/Scenes/PusherWebsocketScene.unity diff --git a/BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity.meta b/BaseProject/Assets/Scenes/PusherWebsocketScene.unity.meta similarity index 100% rename from BaseProject/Assets/PusherWebsocketUnity/Scenes/PusherWebsocketScene.unity.meta rename to BaseProject/Assets/Scenes/PusherWebsocketScene.unity.meta From e4fec021cfc6f1ef32d99c79da024e4ee5e1d544 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Wed, 21 Aug 2019 14:52:03 +0100 Subject: [PATCH 10/22] update README --- README.md | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 39b1a2a..3117fc0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](https://github.com/pusher/pusher-websocket-dotnet) as `.unitypackage` and `UPM package` to make it easier to use in [Unity](https://unity.com/) projects. For API documentation, see [the pusher-websocket-dotnet README](https://github.com/pusher/pusher-websocket-dotnet). +### Repository Structure +- `BaseProject` a Unity Base project which demonstrates how to integrate Pusher Channels with Unity +- `Builds` a build environment for the `PusherWebsocketUnity` _unitypackage_ and the _Unity Package Manager_ (UPM) release +- `Examples` example projects that combines Unity and Pusher Channels + ### Unity Versions Support - Unity 2018.1 - Unity 2018.1.0 @@ -18,22 +23,24 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http - All Unity 2019.2.x -### Usage -#### Install it via unitypackage +### Getting Started +1. [Create a Pusher Channels app](#1.-create-a-pusher-channels-app) +2. Install + [Install it via unitypackage](#2.1.-install-it-via-unitypackage) or + [Install it via Unity Package Manager (UPM)](#2.2.-install-it-via-unity-package-manager-(upm)) +3. [Add PusherManager and run the game](#3.-add-pushermanager) + +#### 1. Create a Pusher Channels app +Create a Pusher Channels app at https://pusher.com/channels + +#### 2. Install +#### 2.1. Install it via unitypackage 1) Download the latest `.unitypackage` from this repo's [Releases](/../../releases) 2) Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) 3) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. 4) Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. -5) Create a Pusher Channels app at https://pusher.com/channels. -6) Open the `PusherManager.cs` file in the Assets folder and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained at the previous step. -7) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. -8) Save and click Play to start the game in Unity. -9) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. -10) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. ----- - -#### Install it via Unity Package Manager (UPM) +#### 2.2. Install it via Unity Package Manager (UPM) **WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#install-it-via-unitypackage) method. 1) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. 2) Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): @@ -52,13 +59,17 @@ Your `Packages/manifest.json` should now look like this: ``` 3) Now Unity should auto resolve dependencies and fetch the newly defined package. ----- +#### 3. Add PusherManager and run the game +1) Copy the sample [`PusherManager.cs`](BaseProject/Assets) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. +2) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. +3) Save and click Play to start the game in Unity. +4) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. +5) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. +### Update this package #### Update the version of .unitypackage To update the version of the `.unitypackage` you can move your `PusherManager.cs` outside of the `PusherWebsocketUnity` folder, delete the folder, repeat steps 1) 2) 3) 4) and move the `PusherManager.cs` file back into the new `PusherWebsocketUnity` folder. ----- - #### Update the version of Unity Package Manager (UPM) package To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [Releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: @@ -71,11 +82,6 @@ To: "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.2+191010" ``` -### Repository Structure -- `BaseProject` a Unity Base project which demonstrates how to integrate Pusher Channels with Unity -- `Builds` a build environment for the `PusherWebsocketUnity` _unitypackage_ and the _Unity Package Manager_ (UPM)` release -- `Examples` example projects that combines Unity and Pusher Channels - ### Unity Platforms Support #### Supported Platforms: From e5348c194f06533a827a1ad900c49e9fbfb0e05a Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Wed, 21 Aug 2019 14:53:06 +0100 Subject: [PATCH 11/22] add link to PusherManager.cs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3117fc0..5bc9805 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Your `Packages/manifest.json` should now look like this: 3) Now Unity should auto resolve dependencies and fetch the newly defined package. #### 3. Add PusherManager and run the game -1) Copy the sample [`PusherManager.cs`](BaseProject/Assets) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. +1) Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. 2) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. 3) Save and click Play to start the game in Unity. 4) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. From e1b7e222c882dc967464a0265cd0a1a54db1c075 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Wed, 21 Aug 2019 14:56:29 +0100 Subject: [PATCH 12/22] update README numberings --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5bc9805..52196fe 100644 --- a/README.md +++ b/README.md @@ -31,19 +31,19 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http 3. [Add PusherManager and run the game](#3.-add-pushermanager) #### 1. Create a Pusher Channels app -Create a Pusher Channels app at https://pusher.com/channels +1.1) Create a Pusher Channels app at https://pusher.com/channels #### 2. Install #### 2.1. Install it via unitypackage -1) Download the latest `.unitypackage` from this repo's [Releases](/../../releases) -2) Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) -3) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. -4) Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. +2.1.1) Download the latest `.unitypackage` from this repo's [Releases](/../../releases) +2.1.2) Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) +2.1.3) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. +2.1.4) Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. #### 2.2. Install it via Unity Package Manager (UPM) **WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#install-it-via-unitypackage) method. -1) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. -2) Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): +2.2.1) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. +2.2.2) Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): ```json "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" ``` @@ -57,14 +57,14 @@ Your `Packages/manifest.json` should now look like this: } } ``` -3) Now Unity should auto resolve dependencies and fetch the newly defined package. +2.2.3) Now Unity should auto resolve dependencies and fetch the newly defined package. #### 3. Add PusherManager and run the game -1) Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. -2) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. -3) Save and click Play to start the game in Unity. -4) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. -5) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. +3.1) Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. +3.2) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. +3.3) Save and click Play to start the game in Unity. +3.4) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. +3.5) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. ### Update this package #### Update the version of .unitypackage From 256aa7d686803f940335a675eb05321e3c06569a Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Wed, 21 Aug 2019 14:57:50 +0100 Subject: [PATCH 13/22] switch to dots in numberings --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 52196fe..e8353ce 100644 --- a/README.md +++ b/README.md @@ -31,19 +31,19 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http 3. [Add PusherManager and run the game](#3.-add-pushermanager) #### 1. Create a Pusher Channels app -1.1) Create a Pusher Channels app at https://pusher.com/channels +1.1. Create a Pusher Channels app at https://pusher.com/channels #### 2. Install #### 2.1. Install it via unitypackage -2.1.1) Download the latest `.unitypackage` from this repo's [Releases](/../../releases) -2.1.2) Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) -2.1.3) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. -2.1.4) Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. +2.1.1. Download the latest `.unitypackage` from this repo's [Releases](/../../releases) +2.1.2. Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) +2.1.3. [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. +2.1.4. Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. #### 2.2. Install it via Unity Package Manager (UPM) **WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#install-it-via-unitypackage) method. -2.2.1) [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. -2.2.2) Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): +2.2.1. [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. +2.2.2. Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): ```json "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" ``` @@ -57,14 +57,14 @@ Your `Packages/manifest.json` should now look like this: } } ``` -2.2.3) Now Unity should auto resolve dependencies and fetch the newly defined package. +2.2.3. Now Unity should auto resolve dependencies and fetch the newly defined package. #### 3. Add PusherManager and run the game -3.1) Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. -3.2) Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. -3.3) Save and click Play to start the game in Unity. -3.4) Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. -3.5) You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. +3.1. Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. +3.2. Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. +3.3. Save and click Play to start the game in Unity. +3.4. Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. +3.5. You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. ### Update this package #### Update the version of .unitypackage From 6cd3703a56313b1e3fc38ac6b07e2450ea4eab86 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Wed, 21 Aug 2019 15:51:59 +0100 Subject: [PATCH 14/22] update the update steps --- BaseProject/Assets/PusherManager.cs | 4 +- README.md | 78 ++++++++++++++--------------- 2 files changed, 40 insertions(+), 42 deletions(-) diff --git a/BaseProject/Assets/PusherManager.cs b/BaseProject/Assets/PusherManager.cs index 712edd1..f59d4ef 100644 --- a/BaseProject/Assets/PusherManager.cs +++ b/BaseProject/Assets/PusherManager.cs @@ -9,8 +9,8 @@ public class PusherManager : MonoBehaviour public static PusherManager instance = null; private Pusher _pusher; private Channel _channel; - private const string APP_KEY = "2fa570d16fa7a40dea9f"; - private const string APP_CLUSTER = "eu"; + private const string APP_KEY = "APP_KEY"; + private const string APP_CLUSTER = "APP_CLUSTER"; async Task Start() { diff --git a/README.md b/README.md index e8353ce..54e4799 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -## Pusher Channels Unity Client Library +# Pusher Channels Unity Client Library This library packages [the official WebSocket .NET SDK for Pusher Channels](https://github.com/pusher/pusher-websocket-dotnet) as `.unitypackage` and `UPM package` to make it easier to use in [Unity](https://unity.com/) projects. For API documentation, see [the pusher-websocket-dotnet README](https://github.com/pusher/pusher-websocket-dotnet). -### Repository Structure +## Repository Structure - `BaseProject` a Unity Base project which demonstrates how to integrate Pusher Channels with Unity - `Builds` a build environment for the `PusherWebsocketUnity` _unitypackage_ and the _Unity Package Manager_ (UPM) release - `Examples` example projects that combines Unity and Pusher Channels -### Unity Versions Support +## Unity Versions Support - Unity 2018.1 - Unity 2018.1.0 - Unity 2018.1.2 @@ -23,27 +23,25 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http - All Unity 2019.2.x -### Getting Started -1. [Create a Pusher Channels app](#1.-create-a-pusher-channels-app) -2. Install - [Install it via unitypackage](#2.1.-install-it-via-unitypackage) or - [Install it via Unity Package Manager (UPM)](#2.2.-install-it-via-unity-package-manager-(upm)) -3. [Add PusherManager and run the game](#3.-add-pushermanager) - -#### 1. Create a Pusher Channels app -1.1. Create a Pusher Channels app at https://pusher.com/channels - -#### 2. Install -#### 2.1. Install it via unitypackage -2.1.1. Download the latest `.unitypackage` from this repo's [Releases](/../../releases) -2.1.2. Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support) -2.1.3. [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. -2.1.4. Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window. - -#### 2.2. Install it via Unity Package Manager (UPM) -**WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#install-it-via-unitypackage) method. -2.2.1. [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**. -2.2.2. Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): +## Getting Started +1. [Create a Pusher Channels app](#1-create-a-pusher-channels-app) +2. [Install](#2-install) Install it via unitypackage or via Unity Package Manager (UPM) +3. [Add PusherManager and run the game](#3-add-pushermanager-and-run-the-game) + +### 1 Create a Pusher Channels app +1.1 - Create a Pusher Channels app at https://pusher.com/channels + +### 2 Install +#### 2.1 Install it via unitypackage +2.1.1 - Download the latest `.unitypackage` from this repo's [Releases](/../../releases)
+2.1.2 - Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support)
+2.1.3 - [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**.
+2.1.4 - Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window.
+ +#### 2.2 Install it via Unity Package Manager (UPM) +**WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#2-install) method.
+2.2.1 - [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**.
+2.2.2 - Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): ```json "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" ``` @@ -57,20 +55,20 @@ Your `Packages/manifest.json` should now look like this: } } ``` -2.2.3. Now Unity should auto resolve dependencies and fetch the newly defined package. +2.2.3 - Now Unity should auto resolve dependencies and fetch the newly defined package. -#### 3. Add PusherManager and run the game -3.1. Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard. -3.2. Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object. -3.3. Save and click Play to start the game in Unity. -3.4. Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`. -3.5. You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. +### 3 Add PusherManager and run the game +3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard.
+3.2 - Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object.
+3.3 - Save and click Play to start the game in Unity.
+3.4 - Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`.
+3.5 - You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. -### Update this package -#### Update the version of .unitypackage -To update the version of the `.unitypackage` you can move your `PusherManager.cs` outside of the `PusherWebsocketUnity` folder, delete the folder, repeat steps 1) 2) 3) 4) and move the `PusherManager.cs` file back into the new `PusherWebsocketUnity` folder. +## Update this package +### Update the version of .unitypackage +To update the version of the `.unitypackage` you can just delete the `PusherWebsocketUnity` folder, and repeat the [Install steps](#2-install). -#### Update the version of Unity Package Manager (UPM) package +### Update the version of Unity Package Manager (UPM) package To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [Releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: From: @@ -82,9 +80,9 @@ To: "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.2+191010" ``` -### Unity Platforms Support +## Unity Platforms Support -#### Supported Platforms: +### Supported Platforms: The supported platforms should be the ones that can be targeted by Unity. Thus far we tested this, and can confirm that works, on: - Windows @@ -92,7 +90,7 @@ Thus far we tested this, and can confirm that works, on: - Android - iOS -#### Unsupported Platforms: +### Unsupported Platforms: - WebGL: due to incompatibility with Websockets (more [here](https://docs.unity3d.com/Manual/webgl-networking.html) under the _"No direct socket access"_ section) -### Known Issues +## Known Issues This library is INCOMPATIBLE with 2018.1.4 <= Unity <= 2018.2.4 due to a [bug](https://issuetracker.unity3d.com/issues/opened-event-of-a-websocket4net-dot-websocket-does-not-get-called-when-opening-a-web-socket) in the Unity engine that prevents WebSocket4Net (one of the dependencies) to work correctly -### Credits +## Credits - Unity Technologies https://unity3d.com/company - for the Unity3d environment - Patrick McCarthy (GlitchEnzo) https://github.com/GlitchEnzo - for [NuGetForUnity](https://github.com/GlitchEnzo/NuGetForUnity) From 02b4ae1a37499f840a13881e494837dad732b62a Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 11:31:00 +0100 Subject: [PATCH 15/22] improve README, fix version number --- README.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 54e4799..27c477f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pusher Channels Unity Client Library -This library packages [the official WebSocket .NET SDK for Pusher Channels](https://github.com/pusher/pusher-websocket-dotnet) as `.unitypackage` and `UPM package` to make it easier to use in [Unity](https://unity.com/) projects. For API documentation, see [the pusher-websocket-dotnet README](https://github.com/pusher/pusher-websocket-dotnet). +This library packages [the official WebSocket .NET SDK for Pusher Channels](https://github.com/pusher/pusher-websocket-dotnet) as a `.unitypackage` and an `UPM package` to make it easier to use in [Unity](https://unity.com/) projects. For API documentation, see [the pusher-websocket-dotnet README](https://github.com/pusher/pusher-websocket-dotnet). ## Repository Structure - `BaseProject` a Unity Base project which demonstrates how to integrate Pusher Channels with Unity @@ -25,7 +25,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http ## Getting Started 1. [Create a Pusher Channels app](#1-create-a-pusher-channels-app) -2. [Install](#2-install) Install it via unitypackage or via Unity Package Manager (UPM) +2. [Install](#2-install) the **Pusher Channels Unity Client Library** via `unitypackage` or via Unity Package Manager (UPM) 3. [Add PusherManager and run the game](#3-add-pushermanager-and-run-the-game) ### 1 Create a Pusher Channels app @@ -33,58 +33,53 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http ### 2 Install #### 2.1 Install it via unitypackage -2.1.1 - Download the latest `.unitypackage` from this repo's [Releases](/../../releases)
+2.1.1 - Download the latest `PusherWebsocketUnity-1.0.2+190808.unitypackage` from this repo's [Releases](/../../releases)
2.1.2 - Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support)
2.1.3 - [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**.
-2.1.4 - Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-x.x.x+xxxxxxx.unitypackage` and click *Import* on the `Import Unity Package` window.
+2.1.4 - Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-1.0.2+190808.unitypackage` and click *Import* on the `Import Unity Package` window.
#### 2.2 Install it via Unity Package Manager (UPM) **WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#2-install) method.
2.2.1 - [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**.
-2.2.2 - Open the `Packages/manifest.json` with your favourite editor and add the following under your dependencies (make sure to respect JSON commas): -```json -"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" -``` - -Your `Packages/manifest.json` should now look like this: +2.2.2 - Open the `Packages/manifest.json` with your favourite editor and add the following in your `dependencies` (make sure to respect JSON commas): ``` { "dependencies": { ... - "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#x.x.x+xxxxxx" + "com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" } } ``` 2.2.3 - Now Unity should auto resolve dependencies and fetch the newly defined package. ### 3 Add PusherManager and run the game -3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you crated the Pusher Channels app in the dashboard.
+3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you created the Pusher Channels app in the dashboard.
3.2 - Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object.
3.3 - Save and click Play to start the game in Unity.
3.4 - Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`.
-3.5 - You can now customise the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. +3.5 - You can now customize the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. ## Update this package ### Update the version of .unitypackage -To update the version of the `.unitypackage` you can just delete the `PusherWebsocketUnity` folder, and repeat the [Install steps](#2-install). +To update the version of the `.unitypackage` you can just delete the `PusherWebsocketUnity` folder under your `Assets`, and repeat the [Install steps](#2-install). ### Update the version of Unity Package Manager (UPM) package To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [Releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: From: ```json -"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.1+190808" +"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.0+000000" ``` To: ```json -"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#0.0.2+191010" +"com.pusher.pusherwebsocketunity": "https://github.com/pusher/pusher-websocket-unity.git#1.0.2+190808" ``` ## Unity Platforms Support ### Supported Platforms: The supported platforms should be the ones that can be targeted by Unity. -Thus far we tested this, and can confirm that works, on: +Thus far we tested this, and can confirm the library works, on: - Windows - MacOS - Android @@ -104,7 +99,7 @@ TODO ## Known Issues This library is INCOMPATIBLE with 2018.1.4 <= Unity <= 2018.2.4 due to a [bug](https://issuetracker.unity3d.com/issues/opened-event-of-a-websocket4net-dot-websocket-does-not-get-called-when-opening-a-web-socket) -in the Unity engine that prevents WebSocket4Net (one of the dependencies) to work correctly +in the Unity engine that prevents WebSocket4Net (one of the dependencies) to work correctly. ## Credits - Unity Technologies https://unity3d.com/company - for the Unity3d environment From f9d9866b73131ef30f5787efa0f36c5011a1884f Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:43:22 +0100 Subject: [PATCH 16/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27c477f..f6c281c 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http 2.2.3 - Now Unity should auto resolve dependencies and fetch the newly defined package. ### 3 Add PusherManager and run the game -3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into **your project's Assets folder** and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you created the Pusher Channels app in the dashboard.
+3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into your project's Assets folder and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you created the Pusher Channels app in the dashboard.
3.2 - Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object.
3.3 - Save and click Play to start the game in Unity.
3.4 - Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`.
From 6973145e3b321eaef3ea0f710aedf861a31c0f8d Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:43:37 +0100 Subject: [PATCH 17/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6c281c..1dd4a5e 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http ### 3 Add PusherManager and run the game 3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into your project's Assets folder and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you created the Pusher Channels app in the dashboard.
3.2 - Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object.
-3.3 - Save and click Play to start the game in Unity.
+3.3 - Save and click *Play* to start the game in Unity.
3.4 - Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`.
3.5 - You can now customize the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. From 8ac1941fd91fcb4790efe7f3b32844386a0840fd Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:43:50 +0100 Subject: [PATCH 18/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1dd4a5e..102c089 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http #### 2.2 Install it via Unity Package Manager (UPM) **WARNING** this method works only if your version of Unity is **2018.3.x or greater**, if you don't satisfy that, use the [unitypackage](#2-install) method.
2.2.1 - [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**.
-2.2.2 - Open the `Packages/manifest.json` with your favourite editor and add the following in your `dependencies` (make sure to respect JSON commas): +2.2.2 - Open `Packages/manifest.json` with your favourite editor and add the following in your `dependencies` (make sure to respect JSON commas): ``` { "dependencies": { From a19433cd24145c3130e29201816355feb01691b6 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:44:09 +0100 Subject: [PATCH 19/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 102c089..099697b 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http 3.1 - Copy the sample [`PusherManager.cs`](BaseProject/Assets/PusherManager.cs) into your project's Assets folder and add your keys as values for `private const string APP_KEY` and `private const string APP_CLUSTER` obtained when you created the Pusher Channels app in the dashboard.
3.2 - Create a new GameObject, by going on `GameObject -> Create Empty`. Drag the `PusherManager.cs` script onto the GameObject Inspector to set it as a script for the object.
3.3 - Save and click *Play* to start the game in Unity.
-3.4 - Verify that in the Console tab the following is logged: `Connection state changed`, `Connected`, `Subscribed`.
+3.4 - Verify that `Connection state changed`, `Connected`, `Subscribed` is logged in the *Console* tab.
3.5 - You can now customize the channel name (by default is `"my-channel"`) and events to bind to (by default is `"my-event"`) in the `PusherManager.cs` script. ## Update this package From 812806a77da488057cf07a1d2319e8001198604d Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:44:32 +0100 Subject: [PATCH 20/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 099697b..df5a9a7 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http ## Update this package ### Update the version of .unitypackage -To update the version of the `.unitypackage` you can just delete the `PusherWebsocketUnity` folder under your `Assets`, and repeat the [Install steps](#2-install). +To update the version of the `.unitypackage` you can delete the `Assets/PusherWebsocketUnity` directory and repeat the [install steps](#2-install). ### Update the version of Unity Package Manager (UPM) package To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [Releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: From 3cfb79685efd8009f5ba658674740e5faa1097a7 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:44:41 +0100 Subject: [PATCH 21/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df5a9a7..9aac1e7 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http ### 2 Install #### 2.1 Install it via unitypackage -2.1.1 - Download the latest `PusherWebsocketUnity-1.0.2+190808.unitypackage` from this repo's [Releases](/../../releases)
+2.1.1 - Download the latest `PusherWebsocketUnity-1.0.2+190808.unitypackage` from [releases](/../../releases)
2.1.2 - Open a new/existing Unity project and make sure it is being opened by a [supported version of Unity](#unity-versions-support)
2.1.3 - [if your Unity version is **2018.x.x**] Make sure that under `Edit -> Project Settings -> Player` the `Configuration -> Scripting Runtime Version` is set to **.NET 4.x Equivalent**.
2.1.4 - Click on `Assets -> Import Package -> Custom Package...`, find and select the `PusherWebsocketUnity-1.0.2+190808.unitypackage` and click *Import* on the `Import Unity Package` window.
From 50c778e3001d5c35d6fe8f14ab5c938b7a9aed24 Mon Sep 17 00:00:00 2001 From: Damiano Donati Date: Thu, 22 Aug 2019 12:44:50 +0100 Subject: [PATCH 22/22] Update README.md Co-Authored-By: James Lees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9aac1e7..8c9dc7c 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ This library packages [the official WebSocket .NET SDK for Pusher Channels](http To update the version of the `.unitypackage` you can delete the `Assets/PusherWebsocketUnity` directory and repeat the [install steps](#2-install). ### Update the version of Unity Package Manager (UPM) package -To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [Releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: +To update the version of `com.pusher.pusherwebsocketunity` you just need to check the available versions in [releases](/../../releases) and change the package version in the `Packages/manifest.json`, like so: From: ```json