commit
e879ce688a
1524 changed files with 479495 additions and 0 deletions
@ -0,0 +1,155 @@ |
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/unity,rider |
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=unity,rider |
||||||
|
|
||||||
|
### Rider ### |
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider |
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 |
||||||
|
|
||||||
|
# User-specific stuff |
||||||
|
.idea/**/workspace.xml |
||||||
|
.idea/**/tasks.xml |
||||||
|
.idea/**/usage.statistics.xml |
||||||
|
.idea/**/dictionaries |
||||||
|
.idea/**/shelf |
||||||
|
|
||||||
|
# AWS User-specific |
||||||
|
.idea/**/aws.xml |
||||||
|
|
||||||
|
# Generated files |
||||||
|
.idea/**/contentModel.xml |
||||||
|
|
||||||
|
# Sensitive or high-churn files |
||||||
|
.idea/**/dataSources/ |
||||||
|
.idea/**/dataSources.ids |
||||||
|
.idea/**/dataSources.local.xml |
||||||
|
.idea/**/sqlDataSources.xml |
||||||
|
.idea/**/dynamic.xml |
||||||
|
.idea/**/uiDesigner.xml |
||||||
|
.idea/**/dbnavigator.xml |
||||||
|
|
||||||
|
# Gradle |
||||||
|
.idea/**/gradle.xml |
||||||
|
.idea/**/libraries |
||||||
|
|
||||||
|
# Gradle and Maven with auto-import |
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files, |
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using |
||||||
|
# auto-import. |
||||||
|
# .idea/artifacts |
||||||
|
# .idea/compiler.xml |
||||||
|
# .idea/jarRepositories.xml |
||||||
|
# .idea/modules.xml |
||||||
|
# .idea/*.iml |
||||||
|
# .idea/modules |
||||||
|
# *.iml |
||||||
|
# *.ipr |
||||||
|
|
||||||
|
# CMake |
||||||
|
cmake-build-*/ |
||||||
|
|
||||||
|
# Mongo Explorer plugin |
||||||
|
.idea/**/mongoSettings.xml |
||||||
|
|
||||||
|
# File-based project format |
||||||
|
*.iws |
||||||
|
|
||||||
|
# IntelliJ |
||||||
|
out/ |
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin |
||||||
|
.idea_modules/ |
||||||
|
|
||||||
|
# JIRA plugin |
||||||
|
atlassian-ide-plugin.xml |
||||||
|
|
||||||
|
# Cursive Clojure plugin |
||||||
|
.idea/replstate.xml |
||||||
|
|
||||||
|
# SonarLint plugin |
||||||
|
.idea/sonarlint/ |
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ) |
||||||
|
com_crashlytics_export_strings.xml |
||||||
|
crashlytics.properties |
||||||
|
crashlytics-build.properties |
||||||
|
fabric.properties |
||||||
|
|
||||||
|
# Editor-based Rest Client |
||||||
|
.idea/httpRequests |
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file |
||||||
|
.idea/caches/build_file_checksums.ser |
||||||
|
|
||||||
|
### Unity ### |
||||||
|
# This .gitignore file should be placed at the root of your Unity project directory |
||||||
|
# |
||||||
|
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore |
||||||
|
/[Ll]ibrary/ |
||||||
|
/[Tt]emp/ |
||||||
|
/[Oo]bj/ |
||||||
|
/[Bb]uild/ |
||||||
|
/[Bb]uilds/ |
||||||
|
/[Ll]ogs/ |
||||||
|
/[Uu]ser[Ss]ettings/ |
||||||
|
|
||||||
|
# MemoryCaptures can get excessive in size. |
||||||
|
# They also could contain extremely sensitive data |
||||||
|
/[Mm]emoryCaptures/ |
||||||
|
|
||||||
|
# Recordings can get excessive in size |
||||||
|
/[Rr]ecordings/ |
||||||
|
|
||||||
|
# Uncomment this line if you wish to ignore the asset store tools plugin |
||||||
|
# /[Aa]ssets/AssetStoreTools* |
||||||
|
|
||||||
|
# Autogenerated Jetbrains Rider plugin |
||||||
|
/[Aa]ssets/Plugins/Editor/JetBrains* |
||||||
|
|
||||||
|
# Visual Studio cache directory |
||||||
|
.vs/ |
||||||
|
|
||||||
|
# Gradle cache directory |
||||||
|
.gradle/ |
||||||
|
|
||||||
|
# Autogenerated VS/MD/Consulo solution and project files |
||||||
|
ExportedObj/ |
||||||
|
.consulo/ |
||||||
|
*.csproj |
||||||
|
*.unityproj |
||||||
|
*.sln |
||||||
|
*.suo |
||||||
|
*.tmp |
||||||
|
*.user |
||||||
|
*.userprefs |
||||||
|
*.pidb |
||||||
|
*.booproj |
||||||
|
*.svd |
||||||
|
*.pdb |
||||||
|
*.mdb |
||||||
|
*.opendb |
||||||
|
*.VC.db |
||||||
|
|
||||||
|
# Unity3D generated meta files |
||||||
|
*.pidb.meta |
||||||
|
*.pdb.meta |
||||||
|
*.mdb.meta |
||||||
|
|
||||||
|
# Unity3D generated file on crash reports |
||||||
|
sysinfo.txt |
||||||
|
|
||||||
|
# Builds |
||||||
|
*.apk |
||||||
|
*.aab |
||||||
|
*.unitypackage |
||||||
|
*.app |
||||||
|
|
||||||
|
# Crashlytics generated file |
||||||
|
|
||||||
|
# Packed Addressables |
||||||
|
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* |
||||||
|
|
||||||
|
# Temporary auto-generated Android Assets |
||||||
|
/[Aa]ssets/[Ss]treamingAssets/aa.meta |
||||||
|
/[Aa]ssets/[Ss]treamingAssets/aa/* |
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/unity,rider |
@ -0,0 +1,4 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" /> |
||||||
|
</project> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="UserContentModel"> |
||||||
|
<attachedFolders /> |
||||||
|
<explicitIncludes /> |
||||||
|
<explicitExcludes /> |
||||||
|
</component> |
||||||
|
</project> |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 5d757120c2679c94f95bbb8c06341f10 |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1436977288 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: c32de72f872aad9448b3118fda0231fb |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1436977288 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,202 @@ |
|||||||
|
|
||||||
|
Apache License |
||||||
|
Version 2.0, January 2004 |
||||||
|
http://www.apache.org/licenses/ |
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||||
|
|
||||||
|
1. Definitions. |
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction, |
||||||
|
and distribution as defined by Sections 1 through 9 of this document. |
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by |
||||||
|
the copyright owner that is granting the License. |
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all |
||||||
|
other entities that control, are controlled by, or are under common |
||||||
|
control with that entity. For the purposes of this definition, |
||||||
|
"control" means (i) the power, direct or indirect, to cause the |
||||||
|
direction or management of such entity, whether by contract or |
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity. |
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity |
||||||
|
exercising permissions granted by this License. |
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications, |
||||||
|
including but not limited to software source code, documentation |
||||||
|
source, and configuration files. |
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical |
||||||
|
transformation or translation of a Source form, including but |
||||||
|
not limited to compiled object code, generated documentation, |
||||||
|
and conversions to other media types. |
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or |
||||||
|
Object form, made available under the License, as indicated by a |
||||||
|
copyright notice that is included in or attached to the work |
||||||
|
(an example is provided in the Appendix below). |
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object |
||||||
|
form, that is based on (or derived from) the Work and for which the |
||||||
|
editorial revisions, annotations, elaborations, or other modifications |
||||||
|
represent, as a whole, an original work of authorship. For the purposes |
||||||
|
of this License, Derivative Works shall not include works that remain |
||||||
|
separable from, or merely link (or bind by name) to the interfaces of, |
||||||
|
the Work and Derivative Works thereof. |
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including |
||||||
|
the original version of the Work and any modifications or additions |
||||||
|
to that Work or Derivative Works thereof, that is intentionally |
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner |
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of |
||||||
|
the copyright owner. For the purposes of this definition, "submitted" |
||||||
|
means any form of electronic, verbal, or written communication sent |
||||||
|
to the Licensor or its representatives, including but not limited to |
||||||
|
communication on electronic mailing lists, source code control systems, |
||||||
|
and issue tracking systems that are managed by, or on behalf of, the |
||||||
|
Licensor for the purpose of discussing and improving the Work, but |
||||||
|
excluding communication that is conspicuously marked or otherwise |
||||||
|
designated in writing by the copyright owner as "Not a Contribution." |
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||||
|
on behalf of whom a Contribution has been received by Licensor and |
||||||
|
subsequently incorporated within the Work. |
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of |
||||||
|
this License, each Contributor hereby grants to You a perpetual, |
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||||
|
copyright license to reproduce, prepare Derivative Works of, |
||||||
|
publicly display, publicly perform, sublicense, and distribute the |
||||||
|
Work and such Derivative Works in Source or Object form. |
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of |
||||||
|
this License, each Contributor hereby grants to You a perpetual, |
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||||
|
(except as stated in this section) patent license to make, have made, |
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||||
|
where such license applies only to those patent claims licensable |
||||||
|
by such Contributor that are necessarily infringed by their |
||||||
|
Contribution(s) alone or by combination of their Contribution(s) |
||||||
|
with the Work to which such Contribution(s) was submitted. If You |
||||||
|
institute patent litigation against any entity (including a |
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||||
|
or a Contribution incorporated within the Work constitutes direct |
||||||
|
or contributory patent infringement, then any patent licenses |
||||||
|
granted to You under this License for that Work shall terminate |
||||||
|
as of the date such litigation is filed. |
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the |
||||||
|
Work or Derivative Works thereof in any medium, with or without |
||||||
|
modifications, and in Source or Object form, provided that You |
||||||
|
meet the following conditions: |
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or |
||||||
|
Derivative Works a copy of this License; and |
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices |
||||||
|
stating that You changed the files; and |
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works |
||||||
|
that You distribute, all copyright, patent, trademark, and |
||||||
|
attribution notices from the Source form of the Work, |
||||||
|
excluding those notices that do not pertain to any part of |
||||||
|
the Derivative Works; and |
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its |
||||||
|
distribution, then any Derivative Works that You distribute must |
||||||
|
include a readable copy of the attribution notices contained |
||||||
|
within such NOTICE file, excluding those notices that do not |
||||||
|
pertain to any part of the Derivative Works, in at least one |
||||||
|
of the following places: within a NOTICE text file distributed |
||||||
|
as part of the Derivative Works; within the Source form or |
||||||
|
documentation, if provided along with the Derivative Works; or, |
||||||
|
within a display generated by the Derivative Works, if and |
||||||
|
wherever such third-party notices normally appear. The contents |
||||||
|
of the NOTICE file are for informational purposes only and |
||||||
|
do not modify the License. You may add Your own attribution |
||||||
|
notices within Derivative Works that You distribute, alongside |
||||||
|
or as an addendum to the NOTICE text from the Work, provided |
||||||
|
that such additional attribution notices cannot be construed |
||||||
|
as modifying the License. |
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and |
||||||
|
may provide additional or different license terms and conditions |
||||||
|
for use, reproduction, or distribution of Your modifications, or |
||||||
|
for any such Derivative Works as a whole, provided Your use, |
||||||
|
reproduction, and distribution of the Work otherwise complies with |
||||||
|
the conditions stated in this License. |
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||||
|
any Contribution intentionally submitted for inclusion in the Work |
||||||
|
by You to the Licensor shall be under the terms and conditions of |
||||||
|
this License, without any additional terms or conditions. |
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify |
||||||
|
the terms of any separate license agreement you may have executed |
||||||
|
with Licensor regarding such Contributions. |
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade |
||||||
|
names, trademarks, service marks, or product names of the Licensor, |
||||||
|
except as required for reasonable and customary use in describing the |
||||||
|
origin of the Work and reproducing the content of the NOTICE file. |
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or |
||||||
|
agreed to in writing, Licensor provides the Work (and each |
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||||
|
implied, including, without limitation, any warranties or conditions |
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||||
|
appropriateness of using or redistributing the Work and assume any |
||||||
|
risks associated with Your exercise of permissions under this License. |
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory, |
||||||
|
whether in tort (including negligence), contract, or otherwise, |
||||||
|
unless required by applicable law (such as deliberate and grossly |
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be |
||||||
|
liable to You for damages, including any direct, indirect, special, |
||||||
|
incidental, or consequential damages of any character arising as a |
||||||
|
result of this License or out of the use or inability to use the |
||||||
|
Work (including but not limited to damages for loss of goodwill, |
||||||
|
work stoppage, computer failure or malfunction, or any and all |
||||||
|
other commercial damages or losses), even if such Contributor |
||||||
|
has been advised of the possibility of such damages. |
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing |
||||||
|
the Work or Derivative Works thereof, You may choose to offer, |
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity, |
||||||
|
or other liability obligations and/or rights consistent with this |
||||||
|
License. However, in accepting such obligations, You may act only |
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf |
||||||
|
of any other Contributor, and only if You agree to indemnify, |
||||||
|
defend, and hold each Contributor harmless for any liability |
||||||
|
incurred by, or claims asserted against, such Contributor by reason |
||||||
|
of your accepting any such warranty or additional liability. |
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS |
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work. |
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following |
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]" |
||||||
|
replaced with your own identifying information. (Don't include |
||||||
|
the brackets!) The text should be enclosed in the appropriate |
||||||
|
comment syntax for the file format. We also recommend that a |
||||||
|
file or class name and description of purpose be included on the |
||||||
|
same "printed page" as the copyright notice for easier |
||||||
|
identification within third-party archives. |
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner] |
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
you may not use this file except in compliance with the License. |
||||||
|
You may obtain a copy of the License at |
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software |
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
See the License for the specific language governing permissions and |
||||||
|
limitations under the License. |
@ -0,0 +1,5 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: cf1acff8cf98a440dba907e79fd30ebc |
||||||
|
TextScriptImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
Binary file not shown.
@ -0,0 +1,20 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 87c316b602156405d92e616621658222 |
||||||
|
TrueTypeFontImporter: |
||||||
|
serializedVersion: 3 |
||||||
|
fontSize: 16 |
||||||
|
forceTextureCase: -2 |
||||||
|
characterSpacing: 1 |
||||||
|
characterPadding: 0 |
||||||
|
includeFontData: 1 |
||||||
|
fontNames: [] |
||||||
|
fallbackFontReferences: |
||||||
|
- {fileID: 12800000, guid: b51a3e520f9164da198dc59c8acfccd6, type: 3} |
||||||
|
- {fileID: 12800000, guid: 04a842e316b6f44bf8da702de26a8ed6, type: 3} |
||||||
|
- {fileID: 12800000, guid: 01cd679a1b9ee48bf9c546f6ce2cb97e, type: 3} |
||||||
|
customCharacters: |
||||||
|
fontRenderingMode: 0 |
||||||
|
ascentCalculationMode: 1 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,20 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 04a842e316b6f44bf8da702de26a8ed6 |
||||||
|
TrueTypeFontImporter: |
||||||
|
serializedVersion: 3 |
||||||
|
fontSize: 16 |
||||||
|
forceTextureCase: -2 |
||||||
|
characterSpacing: 1 |
||||||
|
characterPadding: 0 |
||||||
|
includeFontData: 1 |
||||||
|
fontNames: [] |
||||||
|
fallbackFontReferences: |
||||||
|
- {fileID: 12800000, guid: b51a3e520f9164da198dc59c8acfccd6, type: 3} |
||||||
|
- {fileID: 12800000, guid: 87c316b602156405d92e616621658222, type: 3} |
||||||
|
- {fileID: 12800000, guid: 01cd679a1b9ee48bf9c546f6ce2cb97e, type: 3} |
||||||
|
customCharacters: |
||||||
|
fontRenderingMode: 0 |
||||||
|
ascentCalculationMode: 1 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,20 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: b51a3e520f9164da198dc59c8acfccd6 |
||||||
|
TrueTypeFontImporter: |
||||||
|
serializedVersion: 3 |
||||||
|
fontSize: 16 |
||||||
|
forceTextureCase: -2 |
||||||
|
characterSpacing: 1 |
||||||
|
characterPadding: 0 |
||||||
|
includeFontData: 1 |
||||||
|
fontNames: [] |
||||||
|
fallbackFontReferences: |
||||||
|
- {fileID: 12800000, guid: 04a842e316b6f44bf8da702de26a8ed6, type: 3} |
||||||
|
- {fileID: 12800000, guid: 87c316b602156405d92e616621658222, type: 3} |
||||||
|
- {fileID: 12800000, guid: 01cd679a1b9ee48bf9c546f6ce2cb97e, type: 3} |
||||||
|
customCharacters: |
||||||
|
fontRenderingMode: 0 |
||||||
|
ascentCalculationMode: 1 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,20 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 01cd679a1b9ee48bf9c546f6ce2cb97e |
||||||
|
TrueTypeFontImporter: |
||||||
|
serializedVersion: 3 |
||||||
|
fontSize: 16 |
||||||
|
forceTextureCase: -2 |
||||||
|
characterSpacing: 1 |
||||||
|
characterPadding: 0 |
||||||
|
includeFontData: 1 |
||||||
|
fontNames: [] |
||||||
|
fallbackFontReferences: |
||||||
|
- {fileID: 12800000, guid: b51a3e520f9164da198dc59c8acfccd6, type: 3} |
||||||
|
- {fileID: 12800000, guid: 04a842e316b6f44bf8da702de26a8ed6, type: 3} |
||||||
|
- {fileID: 12800000, guid: 87c316b602156405d92e616621658222, type: 3} |
||||||
|
customCharacters: |
||||||
|
fontRenderingMode: 0 |
||||||
|
ascentCalculationMode: 1 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 82ea81de659210540a956cf678d9d82d |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
externalObjects: {} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,94 @@ |
|||||||
|
Copyright (c) 2011, Admix Designs (http://www.admixdesigns.com/), |
||||||
|
with Reserved Font Names "Squada" and "Squada One" |
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1. |
||||||
|
This license is copied below, and is also available with a FAQ at: |
||||||
|
http://scripts.sil.org/OFL |
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------- |
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 |
||||||
|
----------------------------------------------------------- |
||||||
|
|
||||||
|
PREAMBLE |
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide |
||||||
|
development of collaborative font projects, to support the font creation |
||||||
|
efforts of academic and linguistic communities, and to provide a free and |
||||||
|
open framework in which fonts may be shared and improved in partnership |
||||||
|
with others. |
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and |
||||||
|
redistributed freely as long as they are not sold by themselves. The |
||||||
|
fonts, including any derivative works, can be bundled, embedded, |
||||||
|
redistributed and/or sold with any software provided that any reserved |
||||||
|
names are not used by derivative works. The fonts and derivatives, |
||||||
|
however, cannot be released under any other type of license. The |
||||||
|
requirement for fonts to remain under this license does not apply |
||||||
|
to any document created using the fonts or their derivatives. |
||||||
|
|
||||||
|
DEFINITIONS |
||||||
|
"Font Software" refers to the set of files released by the Copyright |
||||||
|
Holder(s) under this license and clearly marked as such. This may |
||||||
|
include source files, build scripts and documentation. |
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the |
||||||
|
copyright statement(s). |
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as |
||||||
|
distributed by the Copyright Holder(s). |
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting, |
||||||
|
or substituting -- in part or in whole -- any of the components of the |
||||||
|
Original Version, by changing formats or by porting the Font Software to a |
||||||
|
new environment. |
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical |
||||||
|
writer or other person who contributed to the Font Software. |
||||||
|
|
||||||
|
PERMISSION & CONDITIONS |
||||||
|
Permission is hereby granted, free of charge, to any person obtaining |
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify, |
||||||
|
redistribute, and sell modified and unmodified copies of the Font |
||||||
|
Software, subject to the following conditions: |
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components, |
||||||
|
in Original or Modified Versions, may be sold by itself. |
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled, |
||||||
|
redistributed and/or sold with any software, provided that each copy |
||||||
|
contains the above copyright notice and this license. These can be |
||||||
|
included either as stand-alone text files, human-readable headers or |
||||||
|
in the appropriate machine-readable metadata fields within text or |
||||||
|
binary files as long as those fields can be easily viewed by the user. |
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font |
||||||
|
Name(s) unless explicit written permission is granted by the corresponding |
||||||
|
Copyright Holder. This restriction only applies to the primary font name as |
||||||
|
presented to the users. |
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font |
||||||
|
Software shall not be used to promote, endorse or advertise any |
||||||
|
Modified Version, except to acknowledge the contribution(s) of the |
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written |
||||||
|
permission. |
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole, |
||||||
|
must be distributed entirely under this license, and must not be |
||||||
|
distributed under any other license. The requirement for fonts to |
||||||
|
remain under this license does not apply to any document created |
||||||
|
using the Font Software. |
||||||
|
|
||||||
|
TERMINATION |
||||||
|
This license becomes null and void if any of the above conditions are |
||||||
|
not met. |
||||||
|
|
||||||
|
DISCLAIMER |
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF |
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE |
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL |
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM |
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE. |
@ -0,0 +1,7 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: c814beb0f6654e447a30ddd7b5247957 |
||||||
|
TextScriptImporter: |
||||||
|
externalObjects: {} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,22 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 4ee738dae2bd0e943a7cf60e34cf9563 |
||||||
|
TrueTypeFontImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 4 |
||||||
|
fontSize: 16 |
||||||
|
forceTextureCase: -2 |
||||||
|
characterSpacing: 0 |
||||||
|
characterPadding: 1 |
||||||
|
includeFontData: 1 |
||||||
|
fontName: Squada One |
||||||
|
fontNames: |
||||||
|
- Squada One |
||||||
|
fallbackFontReferences: [] |
||||||
|
customCharacters: |
||||||
|
fontRenderingMode: 0 |
||||||
|
ascentCalculationMode: 1 |
||||||
|
useLegacyBoundsCalculation: 0 |
||||||
|
shouldRoundAdvanceValue: 1 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 98951132346795f438babe7a3183da43 |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1523536679 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,7 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ea05e6479d592944d955c2a5e1a6d6f1 |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: af83a98aaa4f7b64eb7fcec95ee7b1ed |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1523525757 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 6c1aa0fceaa2bc14eabdf85976f4e2c8 |
||||||
|
timeCreated: 1549546375 |
||||||
|
licenseType: Store |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 5eb508ffb7b7b0f47882f0087a668283 |
||||||
|
timeCreated: 1547826678 |
||||||
|
licenseType: Store |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,11 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 87776a9b1f405644abcc38ecd70c37fb |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 35b2a4878e5e99e438c97fbe8dbbd863 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 692e391fa2a297c45b3d530aa85be610 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: b90b85043f1857f43b94fd00edfc1ef1 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 188e4a680bce12d4cbad8d57a24f7d44 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: c90a2a73f3ce648409739c724d3e6cef |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: d7a17b60c85fb30448492e397c58c7ce |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 3f712805dec728943a668b3bf19dc422 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 8f482d8c4fe7ade4cbb08eb4a2d83b39 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 7db67e7f5face2e42b6daafcaf4e6c82 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: bab7c8053b486e34aa0d4ca99dcbec80 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,12 @@ |
|||||||
|
{ |
||||||
|
"name": "PhotonChat", |
||||||
|
"references": [], |
||||||
|
"optionalUnityReferences": [], |
||||||
|
"includePlatforms": [], |
||||||
|
"excludePlatforms": [], |
||||||
|
"allowUnsafeCode": false, |
||||||
|
"overrideReferences": false, |
||||||
|
"precompiledReferences": [], |
||||||
|
"autoReferenced": true, |
||||||
|
"defineConstraints": [] |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 08a110bd598f7604f9519c2d7e1fb3cc |
||||||
|
timeCreated: 1537459565 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,137 @@ |
|||||||
|
|
||||||
|
Photon Chat C# Client - Changelog |
||||||
|
Exit Games GmbH - www.photonengine.com - forum.photonengine.com |
||||||
|
|
||||||
|
|
||||||
|
Version 4.1.6.11 (22. November 2021) |
||||||
|
Added: CustomAuthenticationType.Epic to authenticate via Epic Online Services (EOS). |
||||||
|
Added: CustomAuthenticationType.FacebookGaming to authenticate via Facebook Gaming services. |
||||||
|
|
||||||
|
Version 4.1.6.10 (21. October 2021 - rev6243) |
||||||
|
Fixed: The ChatPeer.ConfigUnitySockets(), which used a surplus typeof() for Xbox configuration. |
||||||
|
|
||||||
|
Version 4.1.6.6 (21. September 2021 - rev6204) |
||||||
|
Changed: For Xbox, order of checked assemblies when getting Type SocketNativeSource. It's more likely to be in Assembly-CSharp. |
||||||
|
|
||||||
|
Version 4.1.6.5 (24. August 2021 - rev6181) |
||||||
|
Updated: The default name server host to "ns.photonengine.io". When using WSS on this, it expects TLS1.2 (Win 7 and old Unity versions may not support this). |
||||||
|
|
||||||
|
Version 4.1.6.2 (17. June 2021) |
||||||
|
Changed: The enumeration CustomAuthenticationType was changed to fix naming inconsistencies. Use PlayStation4 and PlayStation5 respectively. Old variants are available as obsolete. |
||||||
|
|
||||||
|
Version 4.1.5.2 (12. March 2021) |
||||||
|
ADDED: CustomAuthenticationType.Playstation5 (value 12). |
||||||
|
|
||||||
|
Version 4.1.5.0 (03. March 2021) |
||||||
|
Updated: ChatPeer ConfigUnitySockets() to the analog of the Realtime API. |
||||||
|
|
||||||
|
Version 4.1.5.0 (3. February 2021) |
||||||
|
Internal: AuthenticationValues.Token is now an object instead of a string (so some internal code changed). This enables the server to send a byte[], which is more effective than a string. |
||||||
|
|
||||||
|
Version 4.1.4.6 (16. November 2020) |
||||||
|
Added: ChatClient.PrivateChatHistoryLength field. If set before you connect, this can be used to limit the number of private messages when the server (re)subscribes the client to (still alive) a private chat channel. |
||||||
|
Added: Protocol Fallback option for Chat. Analog to the Realtime API, Chat can now try another protocol, if the initial connect to the Name Server fails. After the timeout or when an error happened, UDP will fallback to TCP. TCP will fallback to UDP. |
||||||
|
Added: EnableProtocolFallback in ChatClient and ChatAppSettings. When using ConnectUsingSettings, the ChatClient's value gets set and used. |
||||||
|
Changed: Connect(appid, appversion, authValues) will only apply the authvalues parameter, if that's non-null. |
||||||
|
Changed: ChatAppSettings field AppId is now AppIdChat (matching the value in Realtime API AppSettings). The old name is currently just obsolete. |
||||||
|
Added: ChatAppSettings.Port to override the Name Server Port if needed. Note: Chat does not support "Alternative Ports" yet (ports pre-defined per server). |
||||||
|
Added: ChatPeer.NameServerPortOverride value to replace/override the default per-protocol port value (by the one in the AppSettings, e.g.). |
||||||
|
|
||||||
|
Version 4.1.4.5 (02. September 2020) |
||||||
|
Added: Option for extended features: Channels may send a user list, channels and users can have custom properties and there are web-forwarding flags. Needs compile define CHAT_EXTENDED. This also adds new methods to the IChatClientListener. |
||||||
|
Changed: AuthenticationValues has been refined, analog to the changes in the Realtime API. |
||||||
|
|
||||||
|
Version 4.1.4.2 (8. May 2020 - rev5519) |
||||||
|
Added: Broadcast receive and read channel using UniqueRoomID UniqueRoomID read from SubscribeChannel response |
||||||
|
|
||||||
|
Version 4.1.2.20 |
||||||
|
Changed: ChatDisconnectCause enum and OnDisconnected callback usage updated to be in sync. with Realtime. |
||||||
|
Added: ChatClient.ConnectUsingSettings(ChatAppSettings appSettings). |
||||||
|
Added: more error logs when something fails internally. |
||||||
|
|
||||||
|
Version 4.1.2.19 (12. November 2019 - rev5266) |
||||||
|
Changed: ChatPeer now look for SocketNativeSource instead of SocketWebTcpNativeDynamic when the target platform is XB One. A new Xbox addon is coming up on our SDK page. |
||||||
|
|
||||||
|
Version 4.1.2.16 (25. June 2019 - rev5168) |
||||||
|
Added: ChatClient.TryGetPrivateChannelByUser. |
||||||
|
|
||||||
|
Version 4.1.2.14 (6. May 2019 - rev5097) |
||||||
|
Changed: Chat API changes are now listed in a separate changes file. |
||||||
|
|
||||||
|
Version 4.1.2.13 (3. May 2019 - rev5086) |
||||||
|
Fixed: Properly add local client's UserId to public channels' Subscribers list when applicable. |
||||||
|
|
||||||
|
Version 4.1.2.11 (15. April 2019 - rev5043) |
||||||
|
Added: Feature: PublishSubscribers. Per channel, you can now define if the server broadcasts users joining and leaving. |
||||||
|
Fixed: proper way to handle Subscribe event when channel properties are returned. |
||||||
|
Added: Viveport Auth Provider enum value. |
||||||
|
Added: Switch-related workaround. Setting a Thread.Name was causing a crash in some exports on console. This affects Unity to Nintendo Switch exports. |
||||||
|
Added: ChannelCreationOptions class to be used in the new Subscribe overload method. |
||||||
|
Changed: Chat to use the same 1.8 serialization as Realtime/PUN. This also now matches the SocketWebTcp.SerializationProtocol default. |
||||||
|
|
||||||
|
Version 4.1.2.9 (13. February 2019 - rev4985) |
||||||
|
Added: Client API for Max Subscribers and Publish Subscribers features inside public channels. |
||||||
|
|
||||||
|
Version 4.1.2.1 (31. July 2018 - rev4787) |
||||||
|
Changed: Namespace from "ExitGames.Client.Photon.Chat" to "Photon.Chat". |
||||||
|
Added: ConnectAndSetStatus method. |
||||||
|
|
||||||
|
Version 4.1.1.17 (11. October 2017 - rev4465) |
||||||
|
Fixed: Unity "6" compile define is now UNITY_2017. |
||||||
|
|
||||||
|
Version 4.1.1.15 (17. July 2017 - rev4232) |
||||||
|
Added: ChatClient.TransportProtocol as shortcut to the use PhotonPeer's TransportProtocol value. This enables setting the protocol easily while not connected. |
||||||
|
Added: ChatClient.SocketImplementationConfig as shortcut to modify PhotonPeer's SocketImplementationConfig. This enables you to setup which IPhotonSocket implementation to use for which network protocol. |
||||||
|
Changed: ChatPeer.ConfigUnitySockets() to try to find our websocket implementations in the assembly, making the SocketWebTcpCoroutine and SocketWebTcpThread classes optional. |
||||||
|
Removed: Class "SocketWebTcp" is no longer found by ConfigUnitySockets(). |
||||||
|
|
||||||
|
Version 4.1.1.14 (5. July 2017 - rev4191) |
||||||
|
Added: ChatClient can optionally run a thread to call SendOutgoingCommands in intervals. This makes sure the connection doesn't fail easily (e.g. when Unity is loading scenes, etc.). You still have to call Service to dispatch received messages. |
||||||
|
Added: ChatClient.UseBackgroundWorkerForSending. Set this to true, to use the new background thread. Note: Do not use this in WebGL exports from Unity cause Threads are unavailable in them. |
||||||
|
|
||||||
|
Version 4.1.1.2 (13. September 2016 - rev3652) |
||||||
|
Changed: GetNameServerAddress() is the same in Chat and LoadBalancing APIs now. |
||||||
|
Changed: ChatPeer now has ConfigUnitySockets(), which defines the SocketImplementationConfig. It's only used in Unity (using UNITY define). |
||||||
|
Changed: ChatClient is not setting socket implementations anymore. |
||||||
|
Added: Hashtable definition to use Photon's own implementation for Windows Store builds (NETFX_CORE). This must be used but it means you to use the same Hashtable definition in all builds (no matter if 8.1 or 10). |
||||||
|
Added: Support for WebGL export in Unity. |
||||||
|
|
||||||
|
Version 4.0.5.0 (3. December 2015 - rev3144) |
||||||
|
Added: A MessageLimit field for ChatClient and ChatChannel to limit the number of messages the client keeps locally. It might be useful to limit memory usage in long running chats. Set ChatClient.MessageLimit to apply the limit to any channel subscribed afterwards or apply a limit individually. |
||||||
|
|
||||||
|
Version 4.0.0.11 (28. October 2015 - rev3093) |
||||||
|
Added: More sanity checks on operations (empty userId or secret, max friends). |
||||||
|
Added: Special debug logging when the server returns an error for "Operation Unknown". In this case, it's highly likely that you don't use a Chat AppId. |
||||||
|
Added: More helpful error logging. |
||||||
|
|
||||||
|
Version 4.0.0.10 (14. July 2015 - rev2988) |
||||||
|
Added: A Unity 4.6 demo with uGUI. It's missing a few features but should give you a good start to making your own. |
||||||
|
Added: Unity/WebGL support (merged from PUN). |
||||||
|
Added: Breaking! IChatClientListener.DebugReturn(). Photon lib and chat client log via this method (no logging to console by default). |
||||||
|
Changed: ChatClient.CustomAuthenticationValues is now .AuthValues. You can use those values to identify a user, even if you don't setup an external, custom authentication service. |
||||||
|
Changed: ChatClient.UserId no longer directly stores the id but puts it into AuthValues. This means, the UserId could also be set via setting AuthValues. |
||||||
|
Changed: The API of AuthenticationValues. There is now the UserId and AddAuthParameter() replaces the less general SetAuthParameters() (which only set specific key/values). |
||||||
|
Note: All users should have a UserId. You can set chatClient.UserId before you connect, or you can set the AuthenticationValues in Connect(..., authValues) to set a UserId. |
||||||
|
Added: ChatChannel.ToStringMessages(), which gets all messages in a single string, line by line. The format is "Sender:Message". |
||||||
|
Added: ChatClient.TryGetChannel() to find a channel only by name, no matter if public or private. |
||||||
|
|
||||||
|
Version 4.0.0.7 (12. January 2015 - rev2763) |
||||||
|
Internal: Changed code for UserID from 7 to 225. The latter is used in LoadBalancing, too, so we want to re-use the code here. |
||||||
|
|
||||||
|
Version 4.0.0.1 (17. June 2014 - rev2663) |
||||||
|
Changed: How the server responds to Subscribe and Unsubscribe. Events will now contain success/failure of those. This allows us to send the answer after calling a WebHook if needed and we can even send it to multiple clients (which authenticated with the same userID). |
||||||
|
Changed: Handling of subscription responsed. This is done to allow web services to subscribe a client remotely and to be able to prevent joining some channel that a user should not join (the channel of some guild or another team, e.g.). |
||||||
|
Changed: Debug loggging. In Unity we can't use Debug.Assert, etc. So we have to log more cleanly. This works in Editor and several platforms (but not all). |
||||||
|
Changed: Folder for Chat API. It now begins with "Photon" which provides some context no matter where you copy the files. Easier to find in Unity projects. |
||||||
|
Changed: Operation FriendList and method SendFriendList renamed to AddFriends |
||||||
|
Added: Operation RemoveFriends and corresponding method in ChatClient.cs |
||||||
|
Added: Console Demo has new command 'fr' to remove friends |
||||||
|
|
||||||
|
Version 4.0.0.0 (23. May 2014 - rev2614) |
||||||
|
Added: SendPrivateMessage() overload that has option to encrypt private messages. Public messages don't need encryption. |
||||||
|
Removed: lastId and LastMessageIndex from channels. Those were impractical and should be removed from the API. |
||||||
|
Changed: UserStatus class to ChatUserStatus. |
||||||
|
Changed: Most classes are defined in their own file now. |
||||||
|
Removed: Folders "Shared" and their subfolders. This gives a much better overview. |
||||||
|
Added: Handling for event SubscribeResponse. This is not actually a response but gives you info about channels that got subscribed (e.g. when you re-login quickly or when a user is logged in in multiple clients). |
||||||
|
Added: HandleSubscriptionResults() method to handle the event and proper responses. |
@ -0,0 +1,7 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: e5c3dda6f11fe7845989297c8a603dc2 |
||||||
|
TextScriptImporter: |
||||||
|
externalObjects: {} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 801c62f7d03cb463ba20067deb330234 |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1537874612 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 1aab6e4c105054f7e91af2cf027064d1 |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1538395282 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: bd5ff9965d0784cad8e07f5eb9cb9c06 |
||||||
|
timeCreated: 1538396402 |
||||||
|
licenseType: Store |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,24 @@ |
|||||||
|
// -------------------------------------------------------------------------------------------------------------------- |
||||||
|
// <copyright file="OnStartDelete.cs" company="Exit Games GmbH"> |
||||||
|
// Part of: Photon Unity Utilities, |
||||||
|
// </copyright> |
||||||
|
// <summary> |
||||||
|
// This component will destroy the GameObject it is attached to (in Start()). |
||||||
|
// </summary> |
||||||
|
// <author>developer@exitgames.com</author> |
||||||
|
// -------------------------------------------------------------------------------------------------------------------- |
||||||
|
|
||||||
|
using UnityEngine; |
||||||
|
|
||||||
|
namespace Photon.Chat.UtilityScripts |
||||||
|
{ |
||||||
|
/// <summary>This component will destroy the GameObject it is attached to (in Start()).</summary> |
||||||
|
public class OnStartDelete : MonoBehaviour |
||||||
|
{ |
||||||
|
// Use this for initialization |
||||||
|
private void Start() |
||||||
|
{ |
||||||
|
Destroy(this.gameObject); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 0b1cdd4de66f84fa1af4cb197e5d901d |
||||||
|
timeCreated: 1538396603 |
||||||
|
licenseType: Store |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 060fe8295761a47268586d33ef5673e0 |
||||||
|
timeCreated: 1538395273 |
||||||
|
licenseType: Store |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 1e808171e8963498bb1db072a977d750 |
||||||
|
timeCreated: 1538395754 |
||||||
|
licenseType: Store |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 4e3a46219ebf94310a9f347733f88f31 |
||||||
|
folderAsset: yes |
||||||
|
timeCreated: 1537874626 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,11 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 4fcf4818ecc9abf4e9b7e0c37af9b851 |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 48caa72710147fc4f9389b0b5ec6137d |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 4eb1284704a754507acb17b07b888086 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 02d148d0890b2d44dbdf7f1c1b39a499 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,6 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ec07267f6a28fb044ac89845274e79af |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 660b16ba396d0465b98be14947420288 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 4ba4c747f6975ea46bcc0a55ffe3bfe8 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 696a5174ff5e707479b3540eb56d14b7 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,7 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ee1734b1a7bac244bb5f15ecd778b5f2 |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,5 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 887ac71c799552346b6cf7654fb699cb |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
Binary file not shown.
@ -0,0 +1,47 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 3b5a0a7dce46a13459199d174ad3db3f |
||||||
|
PluginImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
iconMap: {} |
||||||
|
executionOrder: {} |
||||||
|
defineConstraints: [] |
||||||
|
isPreloaded: 0 |
||||||
|
isOverridable: 0 |
||||||
|
isExplicitlyReferenced: 0 |
||||||
|
validateReferences: 1 |
||||||
|
platformData: |
||||||
|
- first: |
||||||
|
'': Any |
||||||
|
second: |
||||||
|
enabled: 1 |
||||||
|
settings: {} |
||||||
|
- first: |
||||||
|
'': WP8 |
||||||
|
second: |
||||||
|
enabled: 1 |
||||||
|
settings: |
||||||
|
CPU: AnyCPU |
||||||
|
DontProcess: False |
||||||
|
PlaceholderPath: Assets/Photon/PhotonLibs/Photon3Unity3D.dll |
||||||
|
SDK: AnySDK |
||||||
|
ScriptingBackend: DotNet |
||||||
|
- first: |
||||||
|
Editor: Editor |
||||||
|
second: |
||||||
|
enabled: 0 |
||||||
|
settings: |
||||||
|
DefaultValueInitialized: true |
||||||
|
- first: |
||||||
|
Windows Store Apps: WindowsStoreApps |
||||||
|
second: |
||||||
|
enabled: 1 |
||||||
|
settings: |
||||||
|
CPU: AnyCPU |
||||||
|
DontProcess: false |
||||||
|
PlaceholderPath: Assets/Photon/PhotonLibs/Photon3Unity3D.dll |
||||||
|
SDK: AnySDK |
||||||
|
ScriptingBackend: DotNet |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 3439a9e4030efca45b6cc06240106c02 |
||||||
|
timeCreated: 1460035811 |
||||||
|
licenseType: Store |
||||||
|
DefaultImporter: |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,38 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: aadb37a20a33632429047acaef43658a |
||||||
|
labels: |
||||||
|
- ExitGames |
||||||
|
- PUN |
||||||
|
- Photon |
||||||
|
- Networking |
||||||
|
PluginImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
iconMap: {} |
||||||
|
executionOrder: {} |
||||||
|
defineConstraints: [] |
||||||
|
isPreloaded: 0 |
||||||
|
isOverridable: 0 |
||||||
|
isExplicitlyReferenced: 0 |
||||||
|
validateReferences: 1 |
||||||
|
platformData: |
||||||
|
- first: |
||||||
|
'': Any |
||||||
|
second: |
||||||
|
enabled: 1 |
||||||
|
settings: {} |
||||||
|
- first: |
||||||
|
Editor: Editor |
||||||
|
second: |
||||||
|
enabled: 0 |
||||||
|
settings: |
||||||
|
DefaultValueInitialized: true |
||||||
|
- first: |
||||||
|
Windows Store Apps: WindowsStoreApps |
||||||
|
second: |
||||||
|
enabled: 0 |
||||||
|
settings: |
||||||
|
CPU: AnyCPU |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 8d4f08d435c4b6343969d8af249460ff |
||||||
|
labels: |
||||||
|
- ExitGames |
||||||
|
- PUN |
||||||
|
- Photon |
||||||
|
- Networking |
||||||
|
TextScriptImporter: |
||||||
|
userData: |
@ -0,0 +1,5 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 2f243ce0406bd1c40a9ff5fc2d78d905 |
||||||
|
folderAsset: yes |
||||||
|
DefaultImporter: |
||||||
|
userData: |
@ -0,0 +1,369 @@ |
|||||||
|
#if UNITY_WEBGL || WEBSOCKET || ((UNITY_XBOXONE || UNITY_GAMECORE) && UNITY_EDITOR) |
||||||
|
|
||||||
|
// -------------------------------------------------------------------------------------------------------------------- |
||||||
|
// <copyright file="SocketWebTcp.cs" company="Exit Games GmbH"> |
||||||
|
// Copyright (c) Exit Games GmbH. All rights reserved. |
||||||
|
// </copyright> |
||||||
|
// <summary> |
||||||
|
// Internal class to encapsulate the network i/o functionality for the realtime library. |
||||||
|
// </summary> |
||||||
|
// <author>developer@exitgames.com</author> |
||||||
|
// -------------------------------------------------------------------------------------------------------------------- |
||||||
|
|
||||||
|
|
||||||
|
namespace ExitGames.Client.Photon |
||||||
|
{ |
||||||
|
using System; |
||||||
|
using System.Collections; |
||||||
|
using UnityEngine; |
||||||
|
using SupportClassPun = ExitGames.Client.Photon.SupportClass; |
||||||
|
|
||||||
|
|
||||||
|
#if !(UNITY_WEBGL || NETFX_CORE) |
||||||
|
using System.Net; |
||||||
|
using System.Net.Sockets; |
||||||
|
using System.Threading; |
||||||
|
#endif |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Yield Instruction to Wait for real seconds. Very important to keep connection working if Time.TimeScale is altered, we still want accurate network events |
||||||
|
/// </summary> |
||||||
|
public sealed class WaitForRealSeconds : CustomYieldInstruction |
||||||
|
{ |
||||||
|
private readonly float _endTime; |
||||||
|
|
||||||
|
public override bool keepWaiting |
||||||
|
{ |
||||||
|
get { return this._endTime > Time.realtimeSinceStartup; } |
||||||
|
} |
||||||
|
|
||||||
|
public WaitForRealSeconds(float seconds) |
||||||
|
{ |
||||||
|
this._endTime = Time.realtimeSinceStartup + seconds; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Internal class to encapsulate the network i/o functionality for the realtime libary. |
||||||
|
/// </summary> |
||||||
|
public class SocketWebTcp : IPhotonSocket, IDisposable |
||||||
|
{ |
||||||
|
private WebSocket sock; |
||||||
|
|
||||||
|
private readonly object syncer = new object(); |
||||||
|
|
||||||
|
public SocketWebTcp(PeerBase npeer) : base(npeer) |
||||||
|
{ |
||||||
|
this.ServerAddress = npeer.ServerAddress; |
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.INFO)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.INFO, "new SocketWebTcp() for Unity. Server: " + this.ServerAddress); |
||||||
|
} |
||||||
|
|
||||||
|
//this.Protocol = ConnectionProtocol.WebSocket; |
||||||
|
this.PollReceive = false; |
||||||
|
} |
||||||
|
|
||||||
|
public void Dispose() |
||||||
|
{ |
||||||
|
this.State = PhotonSocketState.Disconnecting; |
||||||
|
|
||||||
|
if (this.sock != null) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
if (this.sock.Connected) this.sock.Close(); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
this.EnqueueDebugReturn(DebugLevel.INFO, "Exception in Dispose(): " + ex); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
this.sock = null; |
||||||
|
this.State = PhotonSocketState.Disconnected; |
||||||
|
} |
||||||
|
|
||||||
|
GameObject websocketConnectionObject; |
||||||
|
public override bool Connect() |
||||||
|
{ |
||||||
|
//bool baseOk = base.Connect(); |
||||||
|
//if (!baseOk) |
||||||
|
//{ |
||||||
|
// return false; |
||||||
|
//} |
||||||
|
|
||||||
|
|
||||||
|
this.State = PhotonSocketState.Connecting; |
||||||
|
|
||||||
|
if (this.websocketConnectionObject != null) |
||||||
|
{ |
||||||
|
UnityEngine.Object.Destroy(this.websocketConnectionObject); |
||||||
|
} |
||||||
|
|
||||||
|
this.websocketConnectionObject = new GameObject("websocketConnectionObject"); |
||||||
|
MonoBehaviour mb = this.websocketConnectionObject.AddComponent<MonoBehaviourExt>(); |
||||||
|
this.websocketConnectionObject.hideFlags = HideFlags.HideInHierarchy; |
||||||
|
UnityEngine.Object.DontDestroyOnLoad(this.websocketConnectionObject); |
||||||
|
|
||||||
|
#if UNITY_WEBGL || NETFX_CORE |
||||||
|
this.sock = new WebSocket(new Uri(this.ConnectAddress), this.SerializationProtocol); |
||||||
|
this.sock.Connect(); |
||||||
|
|
||||||
|
mb.StartCoroutine(this.ReceiveLoop()); |
||||||
|
#else |
||||||
|
|
||||||
|
mb.StartCoroutine(this.DetectIpVersionAndConnect(mb)); |
||||||
|
|
||||||
|
#endif |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
#if !(UNITY_WEBGL || NETFX_CORE) |
||||||
|
private bool ipVersionDetectDone; |
||||||
|
private IEnumerator DetectIpVersionAndConnect(MonoBehaviour mb) |
||||||
|
{ |
||||||
|
Uri uri = null; |
||||||
|
try |
||||||
|
{ |
||||||
|
uri = new Uri(this.ConnectAddress); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.ERROR)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ERROR, "Failed to create a URI from ConnectAddress (" + ConnectAddress + "). Exception: " + ex); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (uri != null && uri.HostNameType == UriHostNameType.Dns) |
||||||
|
{ |
||||||
|
ipVersionDetectDone = false; |
||||||
|
|
||||||
|
ThreadPool.QueueUserWorkItem(this.DetectIpVersion, uri.Host); |
||||||
|
|
||||||
|
while (!this.ipVersionDetectDone) |
||||||
|
{ |
||||||
|
yield return new WaitForRealSeconds(0.1f); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (this.AddressResolvedAsIpv6) |
||||||
|
{ |
||||||
|
this.ConnectAddress += "&IPv6"; |
||||||
|
} |
||||||
|
|
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.INFO)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.INFO, "DetectIpVersionAndConnect() AddressResolvedAsIpv6: " + this.AddressResolvedAsIpv6 + " ConnectAddress: " + ConnectAddress); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
this.sock = new WebSocket(new Uri(this.ConnectAddress), this.SerializationProtocol); |
||||||
|
this.sock.Connect(); |
||||||
|
|
||||||
|
mb.StartCoroutine(this.ReceiveLoop()); |
||||||
|
} |
||||||
|
|
||||||
|
// state has to be the hostname string |
||||||
|
private void DetectIpVersion(object state) |
||||||
|
{ |
||||||
|
string host = state as string; |
||||||
|
IPAddress[] ipAddresses; |
||||||
|
try |
||||||
|
{ |
||||||
|
ipAddresses = Dns.GetHostAddresses(host); |
||||||
|
foreach (IPAddress ipAddress in ipAddresses) |
||||||
|
{ |
||||||
|
if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6) |
||||||
|
{ |
||||||
|
this.AddressResolvedAsIpv6 = true; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.INFO, "DetectIpVersionAndConnect (uri: " + host + "= thread failed: " + ex); |
||||||
|
} |
||||||
|
|
||||||
|
this.ipVersionDetectDone = true; |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
|
||||||
|
public override bool Disconnect() |
||||||
|
{ |
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.INFO)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.INFO, "SocketWebTcp.Disconnect()"); |
||||||
|
} |
||||||
|
|
||||||
|
this.State = PhotonSocketState.Disconnecting; |
||||||
|
|
||||||
|
lock (this.syncer) |
||||||
|
{ |
||||||
|
if (this.sock != null) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
this.sock.Close(); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ERROR, "Exception in Disconnect(): " + ex); |
||||||
|
} |
||||||
|
this.sock = null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (this.websocketConnectionObject != null) |
||||||
|
{ |
||||||
|
UnityEngine.Object.Destroy(this.websocketConnectionObject); |
||||||
|
} |
||||||
|
|
||||||
|
this.State = PhotonSocketState.Disconnected; |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// used by TPeer* |
||||||
|
/// </summary> |
||||||
|
public override PhotonSocketError Send(byte[] data, int length) |
||||||
|
{ |
||||||
|
if (this.State != PhotonSocketState.Connected) |
||||||
|
{ |
||||||
|
return PhotonSocketError.Skipped; |
||||||
|
} |
||||||
|
|
||||||
|
try |
||||||
|
{ |
||||||
|
if (data.Length > length) |
||||||
|
{ |
||||||
|
byte[] trimmedData = new byte[length]; |
||||||
|
Buffer.BlockCopy(data, 0, trimmedData, 0, length); |
||||||
|
data = trimmedData; |
||||||
|
} |
||||||
|
|
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.ALL)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ALL, "Sending: " + SupportClassPun.ByteArrayToString(data)); |
||||||
|
} |
||||||
|
|
||||||
|
if (this.sock != null) |
||||||
|
{ |
||||||
|
this.sock.Send(data); |
||||||
|
} |
||||||
|
} |
||||||
|
catch (Exception e) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ERROR, "Cannot send to: " + this.ServerAddress + ". " + e.Message); |
||||||
|
|
||||||
|
this.HandleException(StatusCode.Exception); |
||||||
|
return PhotonSocketError.Exception; |
||||||
|
} |
||||||
|
|
||||||
|
return PhotonSocketError.Success; |
||||||
|
} |
||||||
|
|
||||||
|
public override PhotonSocketError Receive(out byte[] data) |
||||||
|
{ |
||||||
|
data = null; |
||||||
|
return PhotonSocketError.NoData; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
internal const int ALL_HEADER_BYTES = 9; |
||||||
|
internal const int TCP_HEADER_BYTES = 7; |
||||||
|
internal const int MSG_HEADER_BYTES = 2; |
||||||
|
|
||||||
|
public IEnumerator ReceiveLoop() |
||||||
|
{ |
||||||
|
//this.Listener.DebugReturn(DebugLevel.INFO, "ReceiveLoop()"); |
||||||
|
if (this.sock != null) |
||||||
|
{ |
||||||
|
while (this.sock != null && !this.sock.Connected && this.sock.Error == null) |
||||||
|
{ |
||||||
|
yield return new WaitForRealSeconds(0.1f); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
if (this.sock != null) |
||||||
|
{ |
||||||
|
if (this.sock.Error != null) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ERROR, "Exiting receive thread. Server: " + this.ServerAddress + ":" + this.ServerPort + " Error: " + this.sock.Error); |
||||||
|
this.HandleException(StatusCode.ExceptionOnConnect); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
// connected |
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.ALL)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ALL, "Receiving by websocket. this.State: " + this.State); |
||||||
|
} |
||||||
|
|
||||||
|
this.State = PhotonSocketState.Connected; |
||||||
|
this.peerBase.OnConnect(); |
||||||
|
|
||||||
|
while (this.State == PhotonSocketState.Connected) |
||||||
|
{ |
||||||
|
if (this.sock != null) |
||||||
|
{ |
||||||
|
if (this.sock.Error != null) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ERROR, "Exiting receive thread (inside loop). Server: " + this.ServerAddress + ":" + this.ServerPort + " Error: " + this.sock.Error); |
||||||
|
this.HandleException(StatusCode.ExceptionOnReceive); |
||||||
|
break; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
byte[] inBuff = this.sock.Recv(); |
||||||
|
if (inBuff == null || inBuff.Length == 0) |
||||||
|
{ |
||||||
|
// nothing received. wait a bit, try again |
||||||
|
yield return new WaitForRealSeconds(0.02f); |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.ALL)) |
||||||
|
{ |
||||||
|
this.Listener.DebugReturn(DebugLevel.ALL, "TCP << " + inBuff.Length + " = " + SupportClassPun.ByteArrayToString(inBuff)); |
||||||
|
} |
||||||
|
|
||||||
|
if (inBuff.Length > 0) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
this.HandleReceivedDatagram(inBuff, inBuff.Length, false); |
||||||
|
} |
||||||
|
catch (Exception e) |
||||||
|
{ |
||||||
|
if (this.State != PhotonSocketState.Disconnecting && this.State != PhotonSocketState.Disconnected) |
||||||
|
{ |
||||||
|
if (this.ReportDebugOfLevel(DebugLevel.ERROR)) |
||||||
|
{ |
||||||
|
this.EnqueueDebugReturn(DebugLevel.ERROR, "Receive issue. State: " + this.State + ". Server: '" + this.ServerAddress + "' Exception: " + e); |
||||||
|
} |
||||||
|
|
||||||
|
this.HandleException(StatusCode.ExceptionOnReceive); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
this.Disconnect(); |
||||||
|
} |
||||||
|
|
||||||
|
private class MonoBehaviourExt : MonoBehaviour { } |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#endif |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: ac953d6a57a9ea94e96ec689598995d5 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: b1bad04f7805f764dba77f0d4518e0f0 |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
@ -0,0 +1,117 @@ |
|||||||
|
var LibraryWebSockets = { |
||||||
|
$webSocketInstances: [], |
||||||
|
|
||||||
|
SocketCreate: function(url, protocols) |
||||||
|
{ |
||||||
|
var str = UTF8ToString(url); |
||||||
|
var prot = UTF8ToString(protocols); |
||||||
|
var socket = { |
||||||
|
socket: new WebSocket(str, [prot]), |
||||||
|
buffer: new Uint8Array(0), |
||||||
|
error: null, |
||||||
|
messages: [] |
||||||
|
} |
||||||
|
socket.socket.binaryType = 'arraybuffer'; |
||||||
|
socket.socket.onmessage = function (e) { |
||||||
|
// if (e.data instanceof Blob) |
||||||
|
// { |
||||||
|
// var reader = new FileReader(); |
||||||
|
// reader.addEventListener("loadend", function() { |
||||||
|
// var array = new Uint8Array(reader.result); |
||||||
|
// socket.messages.push(array); |
||||||
|
// }); |
||||||
|
// reader.readAsArrayBuffer(e.data); |
||||||
|
// } |
||||||
|
if (e.data instanceof ArrayBuffer) |
||||||
|
{ |
||||||
|
var array = new Uint8Array(e.data); |
||||||
|
socket.messages.push(array); |
||||||
|
} |
||||||
|
}; |
||||||
|
socket.socket.onclose = function (e) { |
||||||
|
if (e.code != 1000) |
||||||
|
{ |
||||||
|
if (e.reason != null && e.reason.length > 0) |
||||||
|
socket.error = e.reason; |
||||||
|
else |
||||||
|
{ |
||||||
|
switch (e.code) |
||||||
|
{ |
||||||
|
case 1001: |
||||||
|
socket.error = "Endpoint going away."; |
||||||
|
break; |
||||||
|
case 1002: |
||||||
|
socket.error = "Protocol error."; |
||||||
|
break; |
||||||
|
case 1003: |
||||||
|
socket.error = "Unsupported message."; |
||||||
|
break; |
||||||
|
case 1005: |
||||||
|
socket.error = "No status."; |
||||||
|
break; |
||||||
|
case 1006: |
||||||
|
socket.error = "Abnormal disconnection."; |
||||||
|
break; |
||||||
|
case 1009: |
||||||
|
socket.error = "Data frame too large."; |
||||||
|
break; |
||||||
|
default: |
||||||
|
socket.error = "Error "+e.code; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
var instance = webSocketInstances.push(socket) - 1; |
||||||
|
return instance; |
||||||
|
}, |
||||||
|
|
||||||
|
SocketState: function (socketInstance) |
||||||
|
{ |
||||||
|
var socket = webSocketInstances[socketInstance]; |
||||||
|
return socket.socket.readyState; |
||||||
|
}, |
||||||
|
|
||||||
|
SocketError: function (socketInstance, ptr, bufsize) |
||||||
|
{ |
||||||
|
var socket = webSocketInstances[socketInstance]; |
||||||
|
if (socket.error == null) |
||||||
|
return 0; |
||||||
|
var str = socket.error.slice(0, Math.max(0, bufsize - 1)); |
||||||
|
writeStringToMemory(str, ptr, false); |
||||||
|
return 1; |
||||||
|
}, |
||||||
|
|
||||||
|
SocketSend: function (socketInstance, ptr, length) |
||||||
|
{ |
||||||
|
var socket = webSocketInstances[socketInstance]; |
||||||
|
socket.socket.send (HEAPU8.buffer.slice(ptr, ptr+length)); |
||||||
|
}, |
||||||
|
|
||||||
|
SocketRecvLength: function(socketInstance) |
||||||
|
{ |
||||||
|
var socket = webSocketInstances[socketInstance]; |
||||||
|
if (socket.messages.length == 0) |
||||||
|
return 0; |
||||||
|
return socket.messages[0].length; |
||||||
|
}, |
||||||
|
|
||||||
|
SocketRecv: function (socketInstance, ptr, length) |
||||||
|
{ |
||||||
|
var socket = webSocketInstances[socketInstance]; |
||||||
|
if (socket.messages.length == 0) |
||||||
|
return 0; |
||||||
|
if (socket.messages[0].length > length) |
||||||
|
return 0; |
||||||
|
HEAPU8.set(socket.messages[0], ptr); |
||||||
|
socket.messages = socket.messages.slice(1); |
||||||
|
}, |
||||||
|
|
||||||
|
SocketClose: function (socketInstance) |
||||||
|
{ |
||||||
|
var socket = webSocketInstances[socketInstance]; |
||||||
|
socket.socket.close(); |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
autoAddDeps(LibraryWebSockets, '$webSocketInstances'); |
||||||
|
mergeInto(LibraryManager.library, LibraryWebSockets); |
@ -0,0 +1,21 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 04bb5f307f2e48b4fbaa6da865fd4091 |
||||||
|
PluginImporter: |
||||||
|
serializedVersion: 1 |
||||||
|
iconMap: {} |
||||||
|
executionOrder: {} |
||||||
|
isPreloaded: 0 |
||||||
|
platformData: |
||||||
|
Any: |
||||||
|
enabled: 0 |
||||||
|
settings: {} |
||||||
|
Editor: |
||||||
|
enabled: 0 |
||||||
|
settings: |
||||||
|
DefaultValueInitialized: true |
||||||
|
WebGL: |
||||||
|
enabled: 1 |
||||||
|
settings: {} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,3 @@ |
|||||||
|
websocket-sharp.dll built from https://github.com/sta/websocket-sharp.git, commit 869dfb09778de51081b0ae64bd2c3217cffe0699 on Aug 24, 2016. |
||||||
|
|
||||||
|
websocket-sharp is provided under The MIT License as mentioned here: https://github.com/sta/websocket-sharp#license |
@ -0,0 +1,4 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 3e262c2b04eaa8440987b50a91e86674 |
||||||
|
DefaultImporter: |
||||||
|
userData: |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue