Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PubnubUnity based on C# SDK codebase #68

Open
wants to merge 118 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3191d81
PubnubUnity files
budgetpreneur Dec 17, 2019
4211310
.codacy.yml
budgetpreneur Dec 17, 2019
b8ac129
Update .codacy.yml
budgetpreneur Dec 17, 2019
e8dc96f
Update PlayModeCommon.cs
budgetpreneur Dec 17, 2019
5db2c30
minor update
budgetpreneur Dec 19, 2019
ad24fa2
Merge branch 'develop' into atce4096-unity
budgetpreneur Dec 19, 2019
f125187
PNTokenKey file linking
budgetpreneur Dec 19, 2019
eadfdc5
Merge branch 'develop' into atce4096-unity
budgetpreneur Apr 6, 2020
68f39e6
Merge branch 'develop' into atce4096-unity
budgetpreneur Apr 15, 2020
73edac7
minor updates
budgetpreneur Apr 15, 2020
c5feb36
Merge branch 'develop' into atce4096-unity
budgetpreneur Apr 28, 2020
5a7d24e
hmacsha256 refactor
budgetpreneur Nov 17, 2021
c275dc1
removed conditional directive
budgetpreneur Nov 17, 2021
1a2df3b
Merge branch 'master' into atclen51
budgetpreneur Nov 18, 2021
74ac9d9
Removed Portable.BouncyCastle & code refactored for native .net library
budgetpreneur Nov 18, 2021
1e7f8a0
minor update to tests
budgetpreneur Nov 18, 2021
00cb7da
minor update to tests
budgetpreneur Nov 18, 2021
9cd483a
feature file update
budgetpreneur Nov 18, 2021
52bda2f
try catch for publish
budgetpreneur Dec 7, 2021
169775d
capture PNStatus from UrlProcessRequest
budgetpreneur Dec 7, 2021
3ff11b7
no resubscribe on access denied
budgetpreneur Dec 7, 2021
0a39378
refactor to stop subscribe on 403
budgetpreneur Dec 7, 2021
3a1030b
example update
budgetpreneur Dec 8, 2021
246d50c
Revert "example update"
budgetpreneur Dec 8, 2021
791d0b0
example update
budgetpreneur Dec 8, 2021
cb0d15b
Merge branch 'atclen94' into atce4096-unity
budgetpreneur Dec 10, 2021
d431d16
Merge branch 'atclen94' into atce4096-unity
budgetpreneur Dec 10, 2021
5910295
updated latest c# to unity
budgetpreneur Jul 26, 2022
420a46c
updated example
budgetpreneur Jul 26, 2022
20c587b
updated project files
budgetpreneur Jul 26, 2022
10f46bd
Add .net library dependency libs to Plugins
budgetpreneur Jul 27, 2022
72cfa68
Merge branch 'develop' into atce4096-unity
budgetpreneur Jul 27, 2022
72806c3
Merge branch 'develop' into atce4096-unity
budgetpreneur Jul 27, 2022
2a7e768
missed code upate
budgetpreneur Jul 27, 2022
6e050da
userid file
budgetpreneur Jul 27, 2022
55ce300
Manual references in Unity
budgetpreneur Jul 27, 2022
533c47f
fix: reorganized Unity folder
gnatogryz Aug 1, 2022
043e797
fix: upgrade Unity to LTS
MikeDobrzan Aug 3, 2022
72ebce5
chore: build Unity dll
MikeDobrzan Aug 22, 2022
c16c7c8
chore: release-notes for Unity
MikeDobrzan Aug 22, 2022
d756517
chore: script to prepare unity package
MikeDobrzan Aug 22, 2022
c7bf026
Merge branch 'develop' into atce4096-unity
budgetpreneur Aug 23, 2022
9e754ac
fix: swap the dll for package
MikeDobrzan Aug 23, 2022
045388d
feat: test assembly scaffold
MikeDobrzan Sep 8, 2022
6983848
fix: remove the keys
MikeDobrzan Sep 8, 2022
d11fbfa
feat: add dispatcher
MikeDobrzan Sep 21, 2022
51a5f5f
Merge branch 'master' into atce4096-unity
MikeDobrzan Sep 21, 2022
2f437db
wip: adapters
MikeDobrzan Nov 14, 2022
85cc0a8
wip: adapters
MikeDobrzan Nov 14, 2022
75e8631
fix: obsoleting adapters
MikeDobrzan Nov 18, 2022
adeeb0b
feat: callback wrapper
MikeDobrzan Dec 12, 2022
ac8c3e9
added constructor for similarity with SubscribeCallbackExt class
MikeDobrzan Dec 12, 2022
a8bf79b
use generics
MikeDobrzan Dec 13, 2022
7e8ea14
Merge branch 'master' into atce4096-unity
MikeDobrzan Dec 13, 2022
db17ba4
dispatcher action extension method
MikeDobrzan Dec 13, 2022
16ca05d
asmdef
MikeDobrzan Jan 5, 2023
23b3640
pkg version bump
MikeDobrzan Jan 5, 2023
b1c56b8
Merge branch 'master' into atce4096-unity
MikeDobrzan Jan 12, 2023
b764d3e
wip
MikeDobrzan Jan 17, 2023
30c5991
wip
MikeDobrzan Jan 17, 2023
15b37db
WIP
MikeDobrzan Jan 19, 2023
ab2a2f5
wip
MikeDobrzan Jan 20, 2023
1e101f9
wip
MikeDobrzan Jan 20, 2023
fa5809d
wip
MikeDobrzan Jan 20, 2023
f082ea0
WIP: PNConfigAsset
MikeDobrzan Feb 15, 2023
440997e
WIP: PNConfigAsset
MikeDobrzan Feb 16, 2023
bd68c53
WIP
MikeDobrzan Feb 16, 2023
b7a7823
WIP: PNManagerBehaviour
MikeDobrzan Feb 17, 2023
4229126
WIP
MikeDobrzan Feb 17, 2023
1835217
WIP
MikeDobrzan Feb 20, 2023
f117501
WIP
MikeDobrzan Feb 21, 2023
33dbdd0
feat: fire, signal and publish
MikeDobrzan Feb 21, 2023
b359b77
WIP
MikeDobrzan Feb 22, 2023
a35aebe
WIP: serializable vector wrapper
MikeDobrzan Feb 22, 2023
60f41ce
WIP: added fluff
MikeDobrzan Feb 23, 2023
47461cb
WIP: Added fluff
MikeDobrzan Feb 23, 2023
1d4fa9e
WIP: Scene clarity
MikeDobrzan Feb 23, 2023
1380e17
WIP
MikeDobrzan Feb 23, 2023
2f754c8
WIP: ListFiles, GetFileUrl + cleanup
MikeDobrzan Feb 27, 2023
43c1276
WIP
MikeDobrzan Feb 27, 2023
0dd18b4
WIP: Serialize quaternions
MikeDobrzan Feb 28, 2023
025925b
WIP: refactor
MikeDobrzan Feb 28, 2023
477efa6
WIP: Presentation
MikeDobrzan Feb 28, 2023
654dd4d
WIP
MikeDobrzan Feb 28, 2023
c781d33
WIP: send texture
MikeDobrzan Mar 7, 2023
c3a0604
WIP
MikeDobrzan Mar 7, 2023
720d4fd
WIP: send files
MikeDobrzan Mar 9, 2023
f8f24fe
WIP
MikeDobrzan Mar 9, 2023
19c195e
WIP: files
MikeDobrzan Mar 9, 2023
0b513b4
WIP: PublishFileMessage
MikeDobrzan Mar 9, 2023
49cdb94
Merge branch 'master' into atce4096-unity
MikeDobrzan Mar 17, 2023
f3cb883
WIP
MikeDobrzan Mar 17, 2023
b3923f1
Merge branch 'atce4096-unity' of https://github.com/pubnub/c-sharp in…
MikeDobrzan Mar 17, 2023
bf3d15e
WIP: Wrappers
MikeDobrzan Apr 3, 2023
91e1897
WIP
MikeDobrzan Apr 11, 2023
5132d4e
WIP
MikeDobrzan Apr 11, 2023
488d04c
WIP: RenderTexture support
MikeDobrzan Apr 11, 2023
c116fa2
WIP
MikeDobrzan Apr 11, 2023
3b12324
Package bump
MikeDobrzan Apr 11, 2023
f8cc5aa
WIP
MikeDobrzan Apr 17, 2023
05b3288
WIP
MikeDobrzan Apr 18, 2023
8ee2c99
WIP
MikeDobrzan Apr 18, 2023
678c4ea
WIP getting started
MikeDobrzan May 4, 2023
8416d8d
WIP
MikeDobrzan May 8, 2023
dd5f8ee
WIP: Reorganization & tests
MikeDobrzan May 22, 2023
99954d2
WIP
MikeDobrzan May 23, 2023
3eb4c9b
WIP
MikeDobrzan May 23, 2023
4f1279f
WIP
MikeDobrzan May 29, 2023
d7dc35c
WIP
MikeDobrzan May 31, 2023
99ec39f
Export Script
MikeDobrzan May 31, 2023
d529972
fix: formatting
MikeDobrzan May 31, 2023
cb9f6fc
WIP
MikeDobrzan Jun 5, 2023
c576ede
WIP
MikeDobrzan Jun 5, 2023
11e4fb5
WIP reorganization
MikeDobrzan Jun 5, 2023
78d77e0
WIP: Cleaned up templates
MikeDobrzan Jun 5, 2023
752ee65
WIP exporter
MikeDobrzan Jun 5, 2023
4b99666
Exporter
MikeDobrzan Jun 5, 2023
931c011
License
MikeDobrzan Jul 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/release/build-packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ echo "Build PCL package"
cd "$githubWorkspace\src\Api\PubnubApiPCL"
dotnet pack -o "$RELEASES_PATH\PCL" -c Release

# Build Unity package.
Write-Output "Build Unity package"
Set-Location "$githubWorkspace\src\Api\PubnubApiUnity"
dotnet build -o "$RELEASES_PATH\Unity" -c Release

# Build UWP package.
echo "Build UWP package"
cd "$githubWorkspace\src\Api\PubnubApiUWP"
Expand All @@ -38,6 +43,10 @@ $PCL_PACKAGE_NAME = Get-ChildItem -Name -Path "$RELEASES_PATH\PCL\*" -Include *.
$PCL_PACKAGE_PATH = "$RELEASES_PATH\PCL\$PCL_PACKAGE_NAME"
cp "$PCL_PACKAGE_PATH" "$ARTIFACTS_PATH\$PCL_PACKAGE_NAME"

$UNITY_PACKAGE_NAME = Get-ChildItem -Name -Path "$RELEASES_PATH\Unity\*" -Include *.dll
$UNITY_PACKAGE_PATH = "$RELEASES_PATH\Unity\$UNITY_PACKAGE_NAME"
cp "$UNITY_PACKAGE_PATH" "$ARTIFACTS_PATH\$UNITY_PACKAGE_NAME"

$UWP_PACKAGE_NAME = Get-ChildItem -Name -Path "$RELEASES_PATH\UWP\*" -Include *.nupkg
$UWP_PACKAGE_PATH = "$RELEASES_PATH\UWP\$UWP_PACKAGE_NAME"
cp "$UWP_PACKAGE_PATH" "$ARTIFACTS_PATH\$UWP_PACKAGE_NAME"
3 changes: 2 additions & 1 deletion .github/workflows/release/pre-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const localCopyPath = process.argv.pop()
const projectPaths = [
'src/Api/PubnubApi/PubnubApi.csproj',
'src/Api/PubnubApiPCL/PubnubApiPCL.csproj',
'src/Api/PubnubApiUWP/PubnubApiUWP.csproj'
'src/Api/PubnubApiUWP/PubnubApiUWP.csproj',
'src/Api/PubnubApiUnity/PubnubApiUnity.csproj'
];

for (var projectIdx = projectPaths.length - 1; projectIdx >= 0; projectIdx--) {
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/release/prepare-unity-package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const os = require("os");
const { exec } = require("child_process");
const fs = require("fs");
const path = require("path");

const core = require('@actions/core');
const github = require('@actions/github');

// const changelogPath = path.join(process.env['GITHUB_WORKSPACE'], '.github/.release', 'changelog.json');

const releasesPath = process.env['GITHUB_WORKSPACE'] && `${process.env['GITHUB_WORKSPACE']}/.github/.release/Unity`;
const artifactsPath = releasesPath && `${releasesPath}/artifacts`;

const unityDllFilename = 'PubnubApiUnity.dll';

// hard-coded files, mandatory in the package
const files = [
{
name: "LICENSE.md",
base: "UHViTnViIFJlYWwtdGltZSBDbG91ZC1Ib3N0ZWQgUHVzaCBBUEkgYW5kIFB1c2ggTm90aWZpY2F0aW9uIENsaWVudCBGcmFtZXdvcmtzCkNvcHlyaWdodCAoYykgMjAxMyBQdWJOdWIgSW5jLgpodHRwOi8vd3d3LnB1Ym51Yi5jb20vCmh0dHA6Ly93d3cucHVibnViLmNvbS90ZXJtcwoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weQpvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbAppbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzCnRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGw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cwpDb3B5cmlnaHQgKGMpIDIwMTMgUHViTnViIEluYy4KaHR0cDovL3d3dy5wdWJudWIuY29tLwpodHRwOi8vd3d3LnB1Ym51Yi5jb20vdGVybXM="
},
{
name: "LICENSE.md.meta",
base: "ZmlsZUZvcm1hdFZlcnNpb246IDIKZ3VpZDogNjU0M2QzYzEyNTYzZTY2OTA4ZThkNjk3NGVjYWU2NTgKVGV4dFNjcmlwdEltcG9ydGVyOgogIGV4dGVybmFsT2JqZWN0czoge30KICB1c2VyRGF0YTogCiAgYXNzZXRCdW5kbGVOYW1lOiAKICBhc3NldEJ1bmRsZVZhcmlhbnQ6IAo="
},
{
name: "package.json",
base: "ewogICJuYW1lIjogImNvbS5wdWJudWIuc2RrIiwKICAidmVyc2lvbiI6ICI2LjguMCIsCiAgImRpc3BsYXlOYW1lIjogIlB1Yk51YiBTREsiLAogICJkZXNjcmlwdGlvbiI6ICJQdWJOdWIgUmVhbC10aW1lIENsb3VkLUhvc3RlZCBQdXNoIEFQSSBhbmQgUHVzaCBOb3RpZmljYXRpb24gQ2xpZW50IEZyYW1ld29ya3MiLAogICJ1bml0eSI6ICIyMDE5LjEiLAogICJkb2N1bWVudGF0aW9uVXJsIjogImh0dHBzOi8vd3d3LnB1Ym51Yi5jb20vZG9jcy9zZGtzL2Mtc2hhcnAiLAogICJjaGFuZ2Vsb2dVcmwiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9jaGFuZ2Vsb2cuaHRtbCIsCiAgImxpY2Vuc2VzVXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9wdWJudWIvYy1zaGFycC9ibG9iL21hc3Rlci9MSUNFTlNFIiwKICAiZGVwZW5kZW5jaWVzIjogewogICAgImNvbS51bml0eS5udWdldC5uZXd0b25zb2Z0LWpzb24iOiAiMy4wLjIiCiAgfSwKICAia2V5d29yZHMiOiBbCiAgICAicHVibnViIiwKICAgICJzZGsiCiAgXSwKICAiYXV0aG9yIjogewogICAgIm5hbWUiOiAiUHViTnViIiwKICAgICJlbWFpbCI6ICJtaWNoYWwuZG9icnphbnNraUBwdWJudWIuY29tIiwKICAgICJ1cmwiOiAiaHR0cHM6Ly9wdWJudWIuY29tIgogIH0sCiAgInB1Ymxpc2hDb25maWciOiB7CiAgICAicmVnaXN0cnkiOiAiaHR0cHM6Ly9ucG0ucGtnLmdpdGh1Yi5jb20iCiAgfSwKICAicmVwb3NpdG9yeSI6ICJodHRwczovL2dpdGh1Yi5jb20vcHVibnViL2Mtc2hhcnAiCn0="
},
{
name: "package.json.meta",
base: "ZmlsZUZvcm1hdFZlcnNpb246IDIKZ3VpZDogYWJhOTFjNTExNDE2NzdhN2ViMzNkMTAyZjhkOGYxMjUKUGFja2FnZU1hbmlmZXN0SW1wb3J0ZXI6CiAgZXh0ZXJuYWxPYmplY3RzOiB7fQogIHVzZXJEYXRhOiAKICBhc3NldEJ1bmRsZU5hbWU6IAogIGFzc2V0QnVuZGxlVmFyaWFudDogCg=="
},
{
name: "Runtime.meta",
base: "ZmlsZUZvcm1hdFZlcnNpb246IDIKZ3VpZDogOTlhZmEzNmIwZWU0NzRjMzI5ZDdhZTljY2FiODQ0YzIKZm9sZGVyQXNzZXQ6IHllcwpEZWZhdWx0SW1wb3J0ZXI6CiAgZXh0ZXJuYWxPYmplY3RzOiB7fQogIHVzZXJEYXRhOiAKICBhc3NldEJ1bmRsZU5hbWU6IAogIGFzc2V0QnVuZGxlVmFyaWFudDogCg=="
},
{
name: "Runtime/PubnubApiUnity.dll.meta",
base: "ZmlsZUZvcm1hdFZlcnNpb246IDIKZ3VpZDogZjgyNWJjZDQ4OTUyZGZiNDg5MWM3NjFkMzM5MjY3OWQKUGx1Z2luSW1wb3J0ZXI6CiAgZXh0ZXJuYWxPYmplY3RzOiB7fQogIHNlcmlhbGl6ZWRWZXJzaW9uOiAyCiAgaWNvbk1hcDoge30KICBleGVjdXRpb25PcmRlcjoge30KICBkZWZpbmVDb25zdHJhaW50czogW10KICBpc1ByZWxvYWRlZDogMAogIGl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2CiAgLSBmaXJzdDoKICAgICAgU3RhbmRhbG9uZTogV2luNjQKICAgIHNlY29uZDoKICAgICAgZW5hYmxlZDogMQogICAgICBzZXR0aW5nczoKICAgICAgICBDUFU6IHg4Nl82NAogIC0gZmlyc3Q6CiAgICAgIFdlYkdMOiBXZWJHTAogICAgc2Vjb25kOgogICAgICBlbmFibGVkOiAxCiAgICAgIHNldHRpbmdzOiB7fQogIC0gZmlyc3Q6CiAgICAgIFdpbmRvd3MgU3RvcmUgQXBwczogV2luZG93c1N0b3JlQXBwcwogICAgc2Vjb25kOgogICAgICBlbmFibGVkOiAwCiAgICAgIHNldHRpbmdzOgogICAgICAgIENQVTogQW55Q1BVCiAgdXNlckRhdGE6IAogIGFzc2V0QnVuZGxlTmFtZTogCiAgYXNzZXRCdW5kbGVWYXJpYW50OiAK"
}
]

const fn = async () => {
const destinationDir = artifactsPath || path.join(os.tmpdir(), 'unitypkg');

if (!fs.existsSync(destinationDir)) {
fs.mkdirSync(destinationDir);
}
if (!fs.existsSync(path.join(destinationDir, "Runtime"))) {
fs.mkdirSync(path.join(destinationDir, "Runtime"))
}

try {
await fs.promises.rename(path.join(tempdir, unityDllFilename), path.join(tempdir, 'Runtime', unityDllFilename));
} catch {
console.error('Error copying Unity DLL');
}

const tasks = files.map(f => fs.promises.writeFile(path.join(destinationDir, f.name), Buffer.from(f.base, 'base64').toString()));
await Promise.all(tasks);

// TODO replace version
//const pkgJson = JSON.parse(await fs.promises.readFile(path.join(tempdir, 'package.json')));
//pkgJson.version = "?";
//await fs.promises.writeFile(path.join(tempdir, 'package.json'), JSON.stringify(pkgJson, null, 4));

process.chdir(destinationDir);
exec(`tar -cvzf ${path.join(destinationDir, "PubnubApiUnity.tgz")} *`);
const dir = fs.readdirSync('.');
dir.forEach(f => !f.endsWith('.tgz') && exec(`rm -rf ${f}`));
};
fn();
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ src/.vs/Pubnub/v15/sqlite3/storage.ide
/src/Api/PubnubApiUWP/obj/*
/src/Api/PubnubApiUWP/*.user

/src/PubnubUnity/.idea/*
/src/PubnubUnity/.vs/*
/src/PubnubUnity/Library/*
/src/PubnubUnity/Temp/*
/src/PubnubUnity/Logs/*
/src/PubnubUnity/obj/*
/src/PubnubUnity/UserSettings/*
/src/PubnubUnity/*.sln
/src/PubnubUnity/*.csproj

/src/Api/PubnubApiUnity/obj/Debug/*
/src/Api/PubnubApiUnity/obj/Release/*
/src/Api/PubnubApiUnity/bin/Debug/*
/src/Api/PubnubApiUnity/bin/Release/*
/src/Api/PubnubApiUnity/obj/*

/src/packages/*

/src/UnitTests/PubnubApi.Tests/bin/Debug/*
Expand Down
Loading