local #1

Merged
dotori merged 5 commits from local into main 2026-04-30 23:01:06 +00:00
1385 changed files with 384758 additions and 1183 deletions

15
.idea/.idea.Gazuaa/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# 디폴트 무시된 파일
/shelf/
/workspace.xml
# Rider에서 무시된 파일
/modules.xml
/.idea.Gazuaa.iml
/contentModel.xml
/projectSettingsUpdater.xml
# 에디터 기반 HTTP 클라이언트 요청
/httpRequests/
# 쿼리 파일을 포함한 무시된 디폴트 폴더
/queries/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

4
.idea/.idea.Gazuaa/.idea/encodings.xml generated Normal file
View File

@@ -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>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

6
.idea/.idea.Gazuaa/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -322,6 +322,9 @@ MonoBehaviour:
highQualityFiltering:
m_OverrideState: 1
m_Value: 0
filter:
m_OverrideState: 1
m_Value: 0
downscale:
m_OverrideState: 1
m_Value: 0

8
Assets/Fonts.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 282a943f36668ff479bc23eaca294bdd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,343 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &-6184892272082730352
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ChosunGu Atlas Material
m_Shader: {fileID: 4800000, guid: 68e6db2ebdc24f95958faec2be5558d6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 3745761090520965496}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.628
- _Bevel: 0.968
- _BevelClamp: 0
- _BevelOffset: -0.5
- _BevelRoundness: 0
- _BevelWidth: 0.379
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _CullMode: 0
- _Diffuse: 0
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.18
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _PerspectiveFilter: 0.875
- _Reflectivity: 12.31
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2.69
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0.000000059604645, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
m_Name: ChosunGu SDF
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TMP_FontAsset
m_Version: 1.1.0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: ?????
m_StyleName: Regular
m_PointSize: 90
m_Scale: 1
m_UnitsPerEM: 1000
m_LineHeight: 90
m_AscentLine: 77.4
m_CapLine: 68
m_MeanLine: 48
m_Baseline: 0
m_DescentLine: -12.6
m_SuperscriptOffset: 77.4
m_SuperscriptSize: 0.5
m_SubscriptOffset: -12.6
m_SubscriptSize: 0.5
m_UnderlineOffset: -14.400001
m_UnderlineThickness: 3.6000001
m_StrikethroughOffset: 19.2
m_StrikethroughThickness: 3.6000001
m_TabWidth: 27
m_Material: {fileID: -6184892272082730352}
m_SourceFontFileGUID: 90ceb21f33ec4a84f9284288f050fd0a
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: 90ceb21f33ec4a84f9284288f050fd0a
faceIndex: 0
pointSizeSamplingMode: 0
pointSize: 90
padding: 9
paddingMode: 2
packingMode: 0
atlasWidth: 1024
atlasHeight: 1024
characterSetSelectionMode: 7
characterSequence:
referencedFontAssetGUID:
referencedTextAssetGUID:
fontStyle: 0
fontStyleModifier: 0
renderMode: 4165
includeFontFeatures: 0
m_SourceFontFile: {fileID: 12800000, guid: 90ceb21f33ec4a84f9284288f050fd0a, type: 3}
m_SourceFontFilePath:
m_AtlasPopulationMode: 1
InternalDynamicOS: 0
m_GlyphTable: []
m_CharacterTable: []
m_AtlasTextures:
- {fileID: 3745761090520965496}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 0
m_GetFontFeatures: 1
m_ClearDynamicDataOnBuild: 1
m_AtlasWidth: 1024
m_AtlasHeight: 1024
m_AtlasPadding: 9
m_AtlasRenderMode: 4165
m_UsedGlyphRects: []
m_FreeGlyphRects:
- m_X: 0
m_Y: 0
m_Width: 1023
m_Height: 1023
m_FontFeatureTable:
m_MultipleSubstitutionRecords: []
m_LigatureSubstitutionRecords: []
m_GlyphPairAdjustmentRecords:
- m_FirstAdjustmentRecord:
m_GlyphIndex: 64
m_GlyphValueRecord:
m_XPlacement: 0
m_YPlacement: 0
m_XAdvance: 8.64
m_YAdvance: 0
m_SecondAdjustmentRecord:
m_GlyphIndex: 457
m_GlyphValueRecord:
m_XPlacement: 0
m_YPlacement: 0
m_XAdvance: 0
m_YAdvance: 0
m_FeatureLookupFlags: -485368096
- m_FirstAdjustmentRecord:
m_GlyphIndex: 64
m_GlyphValueRecord:
m_XPlacement: 0
m_YPlacement: 0
m_XAdvance: -8.64
m_YAdvance: 0
m_SecondAdjustmentRecord:
m_GlyphIndex: 1776
m_GlyphValueRecord:
m_XPlacement: 0
m_YPlacement: 0
m_XAdvance: 0
m_YAdvance: 0
m_FeatureLookupFlags: -485368096
- m_FirstAdjustmentRecord:
m_GlyphIndex: 64
m_GlyphValueRecord:
m_XPlacement: 0
m_YPlacement: 0
m_XAdvance: -8.64
m_YAdvance: 0
m_SecondAdjustmentRecord:
m_GlyphIndex: 1780
m_GlyphValueRecord:
m_XPlacement: 0
m_YPlacement: 0
m_XAdvance: 0
m_YAdvance: 0
m_FeatureLookupFlags: -485368096
m_MarkToBaseAdjustmentRecords: []
m_MarkToMarkAdjustmentRecords: []
m_ShouldReimportFontFeatures: 0
m_FallbackFontAssetTable: []
m_FontWeightTable:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
fontWeights: []
normalStyle: 0
normalSpacingOffset: 0
boldStyle: 0.75
boldSpacing: 7
italicStyle: 35
tabSize: 10
m_fontInfo:
Name:
PointSize: 0
Scale: 0
CharacterCount: 0
LineHeight: 0
Baseline: 0
Ascender: 0
CapHeight: 0
Descender: 0
CenterLine: 0
SuperscriptOffset: 0
SubscriptOffset: 0
SubSize: 0
Underline: 0
UnderlineThickness: 0
strikethrough: 0
strikethroughThickness: 0
TabWidth: 0
Padding: 0
AtlasWidth: 0
AtlasHeight: 0
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
fallbackFontAssets: []
atlas: {fileID: 0}
--- !u!28 &3745761090520965496
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ChosunGu Atlas
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 4
m_Width: 1
m_Height: 1
m_CompleteImageSize: 1
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMipmapLimit: 1
m_MipmapLimitGroupName:
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 1
m_PlatformBlob:
image data: 1
_typelessdata: 00
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 869674cfb3d61894eb996d32970d370a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fonts/ChosunGu.TTF Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 90ceb21f33ec4a84f9284288f050fd0a
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- ?????
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,87 +1,16 @@
{
"version": 1,
"name": "InputSystem_Actions",
"maps": [
{
"name": "Player",
"id": "df70fa95-8a34-4494-b137-73ab6b9c7d37",
"id": "00cb919c-476f-4fa4-905e-bfe96a56ff82",
"actions": [
{
"name": "Move",
"type": "Value",
"id": "351f2ccd-1f9f-44bf-9bec-d62ac5c5f408",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Look",
"type": "Value",
"id": "6b444451-8a00-4d00-a97e-f47457f736a8",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Attack",
"name": "Gacha",
"type": "Button",
"id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Interact",
"type": "Button",
"id": "852140f2-7766-474d-8707-702459ba45f3",
"expectedControlType": "Button",
"processors": "",
"interactions": "Hold",
"initialStateCheck": false
},
{
"name": "Crouch",
"type": "Button",
"id": "27c5f898-bc57-4ee1-8800-db469aca5fe3",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Jump",
"type": "Button",
"id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Previous",
"type": "Button",
"id": "2776c80d-3c14-4091-8c56-d04ced07a2b0",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Next",
"type": "Button",
"id": "b7230bb6-fc9b-4f52-8b25-f5e19cb2c2ba",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Sprint",
"type": "Button",
"id": "641cd816-40e6-41b4-8c3d-04687c349290",
"expectedControlType": "Button",
"id": "4e678532-f722-4d45-9021-3a57c7cc2e71",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
@@ -90,902 +19,12 @@
"bindings": [
{
"name": "",
"id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "WASD",
"id": "00ca640b-d935-4593-8157-c05846ea39b3",
"path": "Dpad",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "e2062cb9-1b15-46a2-838c-2f8d72a0bdd9",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "320bffee-a40b-4347-ac70-c210eb8bc73a",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "2e46982e-44cc-431b-9f0b-c11910bf467a",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "77bff152-3580-4b21-b6de-dcd0c7e41164",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8",
"path": "<XRController>/{Primary2DAxis}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3ea4d645-4504-4529-b061-ab81934c3752",
"path": "<Joystick>/stick",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8c8e490b-c610-4785-884f-f04217b23ca4",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse;Touch",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3e5f5442-8668-4b27-a940-df99bad7e831",
"path": "<Joystick>/{Hatswitch}",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91",
"path": "<Gamepad>/buttonWest",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "05f6913d-c316-48b2-a6bb-e225f14c7960",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "886e731e-7071-4ae4-95c0-e61739dad6fd",
"path": "<Touchscreen>/primaryTouch/tap",
"interactions": "",
"processors": "",
"groups": ";Touch",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54",
"path": "<Joystick>/trigger",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8255d333-5683-4943-a58a-ccb207ff1dce",
"path": "<XRController>/{PrimaryAction}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7",
"path": "<Keyboard>/enter",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed",
"path": "<Keyboard>/2",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f2e9ba44-c423-42a7-ad56-f20975884794",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6",
"path": "<Gamepad>/leftStickPress",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba",
"path": "<XRController>/trigger",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "eb40bb66-4559-4dfa-9a2f-820438abb426",
"id": "28a944ec-fad8-41f7-af95-24dc449e7f75",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "daba33a1-ad0c-4742-a909-43ad1cdfbeb6",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "603f3daf-40bd-4854-8724-93e8017f59e3",
"path": "<XRController>/secondaryButton",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1534dc16-a6aa-499d-9c3a-22b47347b52a",
"path": "<Keyboard>/1",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Previous",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "25060bbd-a3a6-476e-8fba-45ae484aad05",
"path": "<Gamepad>/dpad/left",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Previous",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1c04ea5f-b012-41d1-a6f7-02e963b52893",
"path": "<Keyboard>/e",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3f66d0b-7751-423f-908b-a11c5bd95930",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4f4649ac-64a8-4a73-af11-b3faef356a4d",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a",
"path": "<Keyboard>/c",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "UI",
"id": "272f6d14-89ba-496f-b7ff-215263d3219f",
"actions": [
{
"name": "Navigate",
"type": "PassThrough",
"id": "c95b2375-e6d9-4b88-9c4c-c5e76515df4b",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Submit",
"type": "Button",
"id": "7607c7b6-cd76-4816-beef-bd0341cfe950",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Cancel",
"type": "Button",
"id": "15cef263-9014-4fd5-94d9-4e4a6234a6ef",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Point",
"type": "PassThrough",
"id": "32b35790-4ed0-4e9a-aa41-69ac6d629449",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Click",
"type": "PassThrough",
"id": "3c7022bf-7922-4f7c-a998-c437916075ad",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "RightClick",
"type": "PassThrough",
"id": "44b200b1-1557-4083-816c-b22cbdf77ddf",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "MiddleClick",
"type": "PassThrough",
"id": "dad70c86-b58c-4b17-88ad-f5e53adf419e",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "ScrollWheel",
"type": "PassThrough",
"id": "0489e84a-4833-4c40-bfae-cea84b696689",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "TrackedDevicePosition",
"type": "PassThrough",
"id": "24908448-c609-4bc3-a128-ea258674378a",
"expectedControlType": "Vector3",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "TrackedDeviceOrientation",
"type": "PassThrough",
"id": "9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be",
"expectedControlType": "Quaternion",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "Gamepad",
"id": "809f371f-c5e2-4e7a-83a1-d867598f40dd",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "9144cbe6-05e1-4687-a6d7-24f99d23dd81",
"path": "<Gamepad>/rightStick/up",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "2db08d65-c5fb-421b-983f-c71163608d67",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "58748904-2ea9-4a80-8579-b500e6a76df8",
"path": "<Gamepad>/rightStick/down",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "8ba04515-75aa-45de-966d-393d9bbd1c14",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "712e721c-bdfb-4b23-a86c-a0d9fcfea921",
"path": "<Gamepad>/rightStick/left",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "fcd248ae-a788-4676-a12e-f4d81205600b",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "1f04d9bc-c50b-41a1-bfcc-afb75475ec20",
"path": "<Gamepad>/rightStick/right",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "fb8277d4-c5cd-4663-9dc7-ee3f0b506d90",
"path": "<Gamepad>/dpad",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Joystick",
"id": "e25d9774-381c-4a61-b47c-7b6b299ad9f9",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "3db53b26-6601-41be-9887-63ac74e79d19",
"path": "<Joystick>/stick/up",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "0cb3e13e-3d90-4178-8ae6-d9c5501d653f",
"path": "<Joystick>/stick/down",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "0392d399-f6dd-4c82-8062-c1e9c0d34835",
"path": "<Joystick>/stick/left",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "942a66d9-d42f-43d6-8d70-ecb4ba5363bc",
"path": "<Joystick>/stick/right",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard",
"id": "ff527021-f211-4c02-933e-5976594c46ed",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "563fbfdd-0f09-408d-aa75-8642c4f08ef0",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "eb480147-c587-4a33-85ed-eb0ab9942c43",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "2bf42165-60bc-42ca-8072-8c13ab40239b",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "85d264ad-e0a0-4565-b7ff-1a37edde51ac",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "74214943-c580-44e4-98eb-ad7eebe17902",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "cea9b045-a000-445b-95b8-0c171af70a3b",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "8607c725-d935-4808-84b1-8354e29bab63",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "4cda81dc-9edd-4e03-9d7c-a71a14345d0b",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc",
"path": "*/{Submit}",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR",
"action": "Submit",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "82627dcc-3b13-4ba9-841d-e4b746d6553e",
"path": "*/{Cancel}",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c52c8e0b-8179-41d3-b8a1-d149033bbe86",
"path": "<Mouse>/position",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e1394cbc-336e-44ce-9ea8-6007ed6193f7",
"path": "<Pen>/position",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "5693e57a-238a-46ed-b5ae-e64e6e574302",
"path": "<Touchscreen>/touch*/position",
"interactions": "",
"processors": "",
"groups": "Touch",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4faf7dc9-b979-4210-aa8c-e808e1ef89f5",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8d66d5ba-88d7-48e6-b1cd-198bbfef7ace",
"path": "<Pen>/tip",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "47c2a644-3ebc-4dae-a106-589b7ca75b59",
"path": "<Touchscreen>/touch*/press",
"interactions": "",
"processors": "",
"groups": "Touch",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "bb9e6b34-44bf-4381-ac63-5aa15d19f677",
"path": "<XRController>/trigger",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "38c99815-14ea-4617-8627-164d27641299",
"path": "<Mouse>/scroll",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "ScrollWheel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4c191405-5738-4d4b-a523-c6a301dbf754",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "RightClick",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "24066f69-da47-44f3-a07e-0015fb02eb2e",
"path": "<Mouse>/middleButton",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "MiddleClick",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77",
"path": "<XRController>/devicePosition",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "TrackedDevicePosition",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "23e01e3a-f935-4948-8d8b-9bcac77714fb",
"path": "<XRController>/deviceRotation",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "TrackedDeviceOrientation",
"action": "Gacha",
"isComposite": false,
"isPartOfComposite": false
}

View File

@@ -8,7 +8,7 @@ ScriptedImporter:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 0
wrapperCodePath:
wrapperClassName:
generateWrapperCode: 1
wrapperCodePath: Assets/Scripts/GazuaInput.cs
wrapperClassName: GazuaInput
wrapperCodeNamespace:

7
Assets/Photon.meta Normal file
View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 98951132346795f438babe7a3183da43
folderAsset: yes
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ea05e6479d592944d955c2a5e1a6d6f1
folderAsset: yes
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: af83a98aaa4f7b64eb7fcec95ee7b1ed
folderAsset: yes
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChannelCreationOptions is a parameter used when subscribing to a public channel for the first time.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2018 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
public class ChannelCreationOptions
{
/// <summary>Default values of channel creation options.</summary>
public static ChannelCreationOptions Default = new ChannelCreationOptions();
/// <summary>Whether or not the channel to be created will allow client to keep a list of users.</summary>
public bool PublishSubscribers { get; set; }
/// <summary>Limit of the number of users subscribed to the channel to be created.</summary>
public int MaxSubscribers { get; set; }
#if CHAT_EXTENDED
public System.Collections.Generic.Dictionary<string, object> CustomProperties { get; set; }
#endif
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 6c1aa0fceaa2bc14eabdf85976f4e2c8
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs
uploadId: 817708

View File

@@ -0,0 +1,14 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChannelWellKnownProperties contains the list of well-known channel properties.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2018 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
public class ChannelWellKnownProperties
{
public const byte MaxSubscribers = 255;
public const byte PublishSubscribers = 254;
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 5eb508ffb7b7b0f47882f0087a668283
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs
uploadId: 817708

View File

@@ -0,0 +1,64 @@
// -----------------------------------------------------------------------
// <copyright file="ChatAppSettings.cs" company="Exit Games GmbH">
// Chat API for Photon - Copyright (C) 2018 Exit Games GmbH
// </copyright>
// <summary>Settings for Photon Chat application and the server to connect to.</summary>
// <author>developer@photonengine.com</author>
// ----------------------------------------------------------------------------
#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER
#define SUPPORTED_UNITY
#endif
namespace Photon.Chat
{
using System;
using ExitGames.Client.Photon;
#if SUPPORTED_UNITY
using UnityEngine.Serialization;
#endif
/// <summary>
/// Settings for Photon application(s) and the server to connect to.
/// </summary>
/// <remarks>
/// This is Serializable for Unity, so it can be included in ScriptableObject instances.
/// </remarks>
#if !NETFX_CORE || SUPPORTED_UNITY
[Serializable]
#endif
public class ChatAppSettings
{
/// <summary>AppId for the Chat Api.</summary>
public string AppIdChat;
/// <summary>The AppVersion can be used to identify builds and will split the AppId distinct "Virtual AppIds" (important for the users to find each other).</summary>
public string AppVersion;
/// <summary>Can be set to any of the Photon Cloud's region names to directly connect to that region.</summary>
public string FixedRegion;
/// <summary>The address (hostname or IP) of the server to connect to.</summary>
public string Server;
/// <summary>If not null, this sets the port of the first Photon server to connect to (that will "forward" the client as needed).</summary>
public ushort Port;
/// <summary>The address (hostname or IP and port) of the proxy server.</summary>
public string ProxyServer;
/// <summary>The network level protocol to use.</summary>
public ConnectionProtocol Protocol = ConnectionProtocol.Udp;
/// <summary>Enables a fallback to another protocol in case a connect to the Name Server fails.</summary>
/// <remarks>See: LoadBalancingClient.EnableProtocolFallback.</remarks>
public bool EnableProtocolFallback = true;
/// <summary>Log level for the network lib.</summary>
public DebugLevel NetworkLogging = DebugLevel.ERROR;
/// <summary>If true, the default nameserver address for the Photon Cloud should be used.</summary>
public bool IsDefaultNameServer { get { return string.IsNullOrEmpty(this.Server); } }
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 87776a9b1f405644abcc38ecd70c37fb
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatAppSettings.cs
uploadId: 817708

View File

@@ -0,0 +1,255 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER
#define SUPPORTED_UNITY
#endif
namespace Photon.Chat
{
using System.Collections.Generic;
using System.Text;
#if SUPPORTED_UNITY || NETFX_CORE
using Hashtable = ExitGames.Client.Photon.Hashtable;
using SupportClass = ExitGames.Client.Photon.SupportClass;
#endif
/// <summary>
/// A channel of communication in Photon Chat, updated by ChatClient and provided as READ ONLY.
/// </summary>
/// <remarks>
/// Contains messages and senders to use (read!) and display by your GUI.
/// Access these by:
/// ChatClient.PublicChannels
/// ChatClient.PrivateChannels
/// </remarks>
public class ChatChannel
{
/// <summary>Name of the channel (used to subscribe and unsubscribe).</summary>
public readonly string Name;
/// <summary>Senders of messages in chronological order. Senders and Messages refer to each other by index. Senders[x] is the sender of Messages[x].</summary>
public readonly List<string> Senders = new List<string>();
/// <summary>Messages in chronological order. Senders and Messages refer to each other by index. Senders[x] is the sender of Messages[x].</summary>
public readonly List<object> Messages = new List<object>();
/// <summary>If greater than 0, this channel will limit the number of messages, that it caches locally.</summary>
public int MessageLimit;
/// <summary>Unique channel ID.</summary>
public int ChannelID;
/// <summary>Is this a private 1:1 channel?</summary>
public bool IsPrivate { get; protected internal set; }
/// <summary>Count of messages this client still buffers/knows for this channel.</summary>
public int MessageCount { get { return this.Messages.Count; } }
/// <summary>
/// ID of the last message received.
/// </summary>
public int LastMsgId { get; protected set; }
private Dictionary<object, object> properties;
/// <summary>Whether or not this channel keeps track of the list of its subscribers.</summary>
public bool PublishSubscribers { get; protected set; }
/// <summary>Maximum number of channel subscribers. 0 means infinite.</summary>
public int MaxSubscribers { get; protected set; }
/// <summary>Subscribed users.</summary>
public readonly HashSet<string> Subscribers = new HashSet<string>();
/// <summary> Properties of subscribers </summary>
private Dictionary<string, Dictionary<object, object>> usersProperties;
/// <summary>Used internally to create new channels. This does NOT create a channel on the server! Use ChatClient.Subscribe.</summary>
public ChatChannel(string name)
{
this.Name = name;
}
/// <summary>Used internally to add messages to this channel.</summary>
public void Add(string sender, object message, int msgId)
{
this.Senders.Add(sender);
this.Messages.Add(message);
this.LastMsgId = msgId;
this.TruncateMessages();
}
/// <summary>Used internally to add messages to this channel.</summary>
public void Add(string[] senders, object[] messages, int lastMsgId)
{
this.Senders.AddRange(senders);
this.Messages.AddRange(messages);
this.LastMsgId = lastMsgId;
this.TruncateMessages();
}
/// <summary>Reduces the number of locally cached messages in this channel to the MessageLimit (if set).</summary>
public void TruncateMessages()
{
if (this.MessageLimit <= 0 || this.Messages.Count <= this.MessageLimit)
{
return;
}
int excessCount = this.Messages.Count - this.MessageLimit;
this.Senders.RemoveRange(0, excessCount);
this.Messages.RemoveRange(0, excessCount);
}
/// <summary>Clear the local cache of messages currently stored. This frees memory but doesn't affect the server.</summary>
public void ClearMessages()
{
this.Senders.Clear();
this.Messages.Clear();
}
/// <summary>Provides a string-representation of all messages in this channel.</summary>
/// <returns>All known messages in format "Sender: Message", line by line.</returns>
public string ToStringMessages()
{
StringBuilder txt = new StringBuilder();
for (int i = 0; i < this.Messages.Count; i++)
{
txt.AppendLine(string.Format("{0}: {1}", this.Senders[i], this.Messages[i]));
}
return txt.ToString();
}
internal void ReadChannelProperties(Dictionary<object, object> newProperties)
{
if (newProperties != null && newProperties.Count > 0)
{
if (this.properties == null)
{
this.properties = new Dictionary<object, object>(newProperties.Count);
}
foreach (var pair in newProperties)
{
if (pair.Value == null)
{
this.properties.Remove(pair.Key);
}
else
{
this.properties[pair.Key] = pair.Value;
}
}
object temp;
if (this.properties.TryGetValue(ChannelWellKnownProperties.PublishSubscribers, out temp))
{
this.PublishSubscribers = (bool)temp;
}
if (this.properties.TryGetValue(ChannelWellKnownProperties.MaxSubscribers, out temp))
{
this.MaxSubscribers = (int)temp;
}
}
}
internal bool AddSubscribers(string[] users)
{
if (users == null)
{
return false;
}
bool result = true;
for (int i = 0; i < users.Length; i++)
{
if (!this.Subscribers.Add(users[i]))
{
result = false;
}
}
return result;
}
internal bool AddSubscriber(string userId)
{
return this.Subscribers.Add(userId);
}
internal bool RemoveSubscriber(string userId)
{
if (this.usersProperties != null)
{
this.usersProperties.Remove(userId);
}
return this.Subscribers.Remove(userId);
}
#if CHAT_EXTENDED
internal void ReadUserProperties(string userId, Dictionary<object, object> changedProperties)
{
if (this.usersProperties == null)
{
this.usersProperties = new Dictionary<string, Dictionary<object, object>>();
}
Dictionary<object, object> userProperties;
if (!this.usersProperties.TryGetValue(userId, out userProperties))
{
userProperties = new Dictionary<object, object>();
this.usersProperties.Add(userId, userProperties);
}
foreach (var property in changedProperties)
{
//UnityEngine.Debug.LogFormat("User {0} property {1} = {2}", userId, property.Key, property.Value);
if (property.Value == null)
{
userProperties.Remove(property.Key);
}
else
{
userProperties[property.Key] = property.Value;
}
}
}
internal bool TryGetChannelProperty<T>(object propertyKey, out T propertyValue)
{
propertyValue = default;
object temp;
if (properties != null && properties.TryGetValue(propertyKey, out temp) && temp is T)
{
propertyValue = (T)temp;
return true;
}
return false;
}
internal bool TryGetUserProperty<T>(string userId, object propertyKey, out T propertyValue)
{
propertyValue = default;
object temp;
Dictionary<object, object> userProperties;
if (this.usersProperties != null && usersProperties.TryGetValue(userId, out userProperties) && userProperties.TryGetValue(propertyKey, out temp) && temp is T)
{
propertyValue = (T)temp;
return true;
}
return false;
}
public bool TryGetCustomChannelProperty<T>(string propertyKey, out T propertyValue)
{
return this.TryGetChannelProperty(propertyKey, out propertyValue);
}
public bool TryGetCustomUserProperty<T>(string userId, string propertyKey, out T propertyValue)
{
return this.TryGetUserProperty(userId, propertyKey, out propertyValue);
}
#endif
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 35b2a4878e5e99e438c97fbe8dbbd863
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatChannel.cs
uploadId: 817708

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 692e391fa2a297c45b3d530aa85be610
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatClient.cs
uploadId: 817708

View File

@@ -0,0 +1,43 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
/// <summary>Enumeration of causes for Disconnects (used in <see cref="ChatClient.DisconnectedCause"/>).</summary>
/// <remarks>Read the individual descriptions to find out what to do about this type of disconnect.</remarks>
public enum ChatDisconnectCause
{
/// <summary>No error was tracked.</summary>
None,
/// <summary>OnStatusChanged: The server is not available or the address is wrong. Make sure the port is provided and the server is up.</summary>
ExceptionOnConnect,
/// <summary>OnStatusChanged: The server disconnected this client from within the room's logic (the C# code).</summary>
DisconnectByServerLogic,
/// <summary>OnStatusChanged: The server disconnected this client for unknown reasons.</summary>
DisconnectByServerReasonUnknown,
/// <summary>OnStatusChanged: The server disconnected this client due to timing out (missing acknowledgement from the client).</summary>
ServerTimeout,
/// <summary>OnStatusChanged: This client detected that the server's responses are not received in due time.</summary>
ClientTimeout,
/// <summary>OnStatusChanged: Some internal exception caused the socket code to fail. Contact Exit Games.</summary>
Exception,
/// <summary>OnOperationResponse: Authenticate in the Photon Cloud with invalid AppId. Update your subscription or contact Exit Games.</summary>
InvalidAuthentication,
/// <summary>OnOperationResponse: Authenticate (temporarily) failed when using a Photon Cloud subscription without CCU Burst. Update your subscription.</summary>
MaxCcuReached,
/// <summary>OnOperationResponse: Authenticate when the app's Photon Cloud subscription is locked to some (other) region(s). Update your subscription or change region.</summary>
InvalidRegion,
/// <summary>OnOperationResponse: Operation that's (currently) not available for this client (not authorized usually). Only tracked for op Authenticate.</summary>
OperationNotAllowedInCurrentState,
/// <summary>OnOperationResponse: Authenticate in the Photon Cloud with invalid client values or custom authentication setup in Cloud Dashboard.</summary>
CustomAuthenticationFailed,
/// <summary>The authentication ticket should provide access to any Photon Cloud server without doing another authentication-service call. However, the ticket expired.</summary>
AuthenticationTicketExpired,
/// <summary>OnStatusChanged: The client disconnected from within the logic (the C# code).</summary>
DisconnectByClientLogic
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: b90b85043f1857f43b94fd00edfc1ef1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs
uploadId: 817708

View File

@@ -0,0 +1,39 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
/// <summary>
/// Wraps up internally used constants in Photon Chat events. You don't have to use them directly usually.
/// </summary>
public class ChatEventCode
{
/// <summary>(0) Event code for messages published in public channels.</summary>
public const byte ChatMessages = 0;
/// <summary>(1) Not Used. </summary>
public const byte Users = 1;// List of users or List of changes for List of users
/// <summary>(2) Event code for messages published in private channels</summary>
public const byte PrivateMessage = 2;
/// <summary>(3) Not Used. </summary>
public const byte FriendsList = 3;
/// <summary>(4) Event code for status updates. </summary>
public const byte StatusUpdate = 4;
/// <summary>(5) Event code for subscription acks. </summary>
public const byte Subscribe = 5;
/// <summary>(6) Event code for unsubscribe acks. </summary>
public const byte Unsubscribe = 6;
/// <summary>(7) Event code for properties update. </summary>
public const byte PropertiesChanged = 7;
/// <summary>(8) Event code for new user subscription to a channel where <see cref="ChatChannel.PublishSubscribers"/> is enabled. </summary>
public const byte UserSubscribed = 8;
/// <summary>(9) Event code for when user unsubscribes from a channel where <see cref="ChatChannel.PublishSubscribers"/> is enabled. </summary>
public const byte UserUnsubscribed = 9;
/// <summary>(10) Event code for when the server sends an error to the client. </summary>
/// <remarks> This is currently only used by Chat WebHooks. </remarks>
public const byte ErrorInfo = 10;
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 188e4a680bce12d4cbad8d57a24f7d44
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatEventCode.cs
uploadId: 817708

View File

@@ -0,0 +1,38 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
/// <summary>
/// Wraps up codes for operations used internally in Photon Chat. You don't have to use them directly usually.
/// </summary>
public class ChatOperationCode
{
/// <summary>(230) Operation Authenticate.</summary>
public const byte Authenticate = 230;
/// <summary>(0) Operation to subscribe to chat channels.</summary>
public const byte Subscribe = 0;
/// <summary>(1) Operation to unsubscribe from chat channels.</summary>
public const byte Unsubscribe = 1;
/// <summary>(2) Operation to publish a message in a chat channel.</summary>
public const byte Publish = 2;
/// <summary>(3) Operation to send a private message to some other user.</summary>
public const byte SendPrivate = 3;
/// <summary>(4) Not used yet.</summary>
public const byte ChannelHistory = 4;
/// <summary>(5) Set your (client's) status.</summary>
public const byte UpdateStatus = 5;
/// <summary>(6) Add friends the list of friends that should update you of their status.</summary>
public const byte AddFriends = 6;
/// <summary>(7) Remove friends from list of friends that should update you of their status.</summary>
public const byte RemoveFriends = 7;
/// <summary>(8) Operation to set properties of public chat channel or users in public chat channels.</summary>
public const byte SetProperties = 8;
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: c90a2a73f3ce648409739c724d3e6cef
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatOperationCode.cs
uploadId: 817708

View File

@@ -0,0 +1,85 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
/// <summary>
/// Wraps up codes for parameters (in operations and events) used internally in Photon Chat. You don't have to use them directly usually.
/// </summary>
public class ChatParameterCode
{
/// <summary>(0) Array of chat channels.</summary>
public const byte Channels = 0;
/// <summary>(1) Name of a single chat channel.</summary>
public const byte Channel = 1;
/// <summary>(2) Array of chat messages.</summary>
public const byte Messages = 2;
/// <summary>(3) A single chat message.</summary>
public const byte Message = 3;
/// <summary>(4) Array of names of the users who sent the array of chat messages.</summary>
public const byte Senders = 4;
/// <summary>(5) Name of a the user who sent a chat message.</summary>
public const byte Sender = 5;
/// <summary>(6) Not used.</summary>
public const byte ChannelUserCount = 6;
/// <summary>(225) Name of user to send a (private) message to.</summary><remarks>The code is used in LoadBalancing and copied over here.</remarks>
public const byte UserId = 225;
/// <summary>(8) Id of a message.</summary>
public const byte MsgId = 8;
/// <summary>(9) Not used.</summary>
public const byte MsgIds = 9;
/// <summary>(221) Secret token to identify an authorized user.</summary><remarks>The code is used in LoadBalancing and copied over here.</remarks>
public const byte Secret = 221;
/// <summary>(15) Subscribe operation result parameter. A bool[] with result per channel.</summary>
public const byte SubscribeResults = 15;
/// <summary>(10) Status</summary>
public const byte Status = 10;
/// <summary>(11) Friends</summary>
public const byte Friends = 11;
/// <summary>(12) SkipMessage is used in SetOnlineStatus and if true, the message is not being broadcast.</summary>
public const byte SkipMessage = 12;
/// <summary>(14) Number of message to fetch from history. 0: no history. 1 and higher: number of messages in history. -1: all history.</summary>
public const byte HistoryLength = 14;
public const byte DebugMessage = 17;
/// <summary>(21) WebFlags object for changing behaviour of webhooks from client.</summary>
public const byte WebFlags = 21;
/// <summary>(22) WellKnown or custom properties of channel or user.</summary>
/// <remarks>
/// In event <see cref="ChatEventCode.Subscribe"/> it's always channel properties,
/// in event <see cref="ChatEventCode.UserSubscribed"/> it's always user properties,
/// in event <see cref="ChatEventCode.PropertiesChanged"/> it's channel properties unless <see cref="UserId"/> parameter value is not null
/// </remarks>
public const byte Properties = 22;
/// <summary>(23) Array of UserIds of users already subscribed to a channel.</summary>
/// <remarks>Used in Subscribe event when PublishSubscribers is enabled.
/// Does not include local user who just subscribed.
/// Maximum length is (<see cref="ChatChannel.MaxSubscribers"/> - 1).</remarks>
public const byte ChannelSubscribers = 23;
/// <summary>(24) Optional data sent in ErrorInfo event from Chat WebHooks. </summary>
public const byte DebugData = 24;
/// <summary>(25) Code for values to be used for "Check And Swap" (CAS) when changing properties.</summary>
public const byte ExpectedValues = 25;
/// <summary>(26) Code for broadcast parameter of <see cref="ChatOperationCode.SetProperties"/> method.</summary>
public const byte Broadcast = 26;
/// <summary>
/// WellKnown and custom user properties.
/// </summary>
/// <remarks>
/// Used only in event <see cref="ChatEventCode.Subscribe"/>
/// </remarks>
public const byte UserProperties = 28;
/// <summary>
/// Generated unique reusable room id
/// </summary>
public const byte UniqueRoomId = 29;
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: d7a17b60c85fb30448492e397c58c7ce
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatParameterCode.cs
uploadId: 817708

View File

@@ -0,0 +1,454 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER
#define SUPPORTED_UNITY
#endif
namespace Photon.Chat
{
using System;
using System.Diagnostics;
using System.Collections.Generic;
using ExitGames.Client.Photon;
#if SUPPORTED_UNITY || NETFX_CORE
using Hashtable = ExitGames.Client.Photon.Hashtable;
using SupportClass = ExitGames.Client.Photon.SupportClass;
#endif
/// <summary>
/// Provides basic operations of the Photon Chat server. This internal class is used by public ChatClient.
/// </summary>
public class ChatPeer : PhotonPeer
{
/// <summary>Name Server Host Name for Photon Cloud. Without port and without any prefix.</summary>
public string NameServerHost = "ns.photonengine.io";
/// <summary>Name Server port per protocol (the UDP port is different than TCP, etc).</summary>
private static readonly Dictionary<ConnectionProtocol, int> ProtocolToNameServerPort = new Dictionary<ConnectionProtocol, int>() { { ConnectionProtocol.Udp, 5058 }, { ConnectionProtocol.Tcp, 4533 }, { ConnectionProtocol.WebSocket, 80 }, { ConnectionProtocol.WebSocketSecure, 443 } };
/// <summary>Name Server Address for Photon Cloud (based on current protocol). You can use the default values and usually won't have to set this value.</summary>
public string NameServerAddress { get { return this.GetNameServerAddress(); } }
virtual internal bool IsProtocolSecure { get { return this.UsedProtocol == ConnectionProtocol.WebSocketSecure; } }
/// <summary> Chat Peer constructor. </summary>
/// <param name="listener">Chat listener implementation.</param>
/// <param name="protocol">Protocol to be used by the peer.</param>
public ChatPeer(IPhotonPeerListener listener, ConnectionProtocol protocol) : base(listener, protocol)
{
this.ConfigUnitySockets();
}
// Sets up the socket implementations to use, depending on platform
[System.Diagnostics.Conditional("SUPPORTED_UNITY")]
private void ConfigUnitySockets()
{
Type websocketType = null;
#if (UNITY_XBOXONE || UNITY_GAMECORE) && !UNITY_EDITOR
websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, Assembly-CSharp", false);
if (websocketType == null)
{
websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, Assembly-CSharp-firstpass", false);
}
if (websocketType == null)
{
websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, PhotonRealtime", false);
}
if (websocketType != null)
{
this.SocketImplementationConfig[ConnectionProtocol.Udp] = websocketType; // on Xbox, the native socket plugin supports UDP as well
}
#else
// to support WebGL export in Unity, we find and assign the SocketWebTcp class (if it's in the project).
// alternatively class SocketWebTcp might be in the Photon3Unity3D.dll
websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, PhotonWebSocket", false);
if (websocketType == null)
{
websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false);
}
if (websocketType == null)
{
websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false);
}
#endif
if (websocketType != null)
{
this.SocketImplementationConfig[ConnectionProtocol.WebSocket] = websocketType;
this.SocketImplementationConfig[ConnectionProtocol.WebSocketSecure] = websocketType;
}
#if NET_4_6 && (UNITY_EDITOR || !ENABLE_IL2CPP) && !NETFX_CORE
this.SocketImplementationConfig[ConnectionProtocol.Udp] = typeof(SocketUdpAsync);
this.SocketImplementationConfig[ConnectionProtocol.Tcp] = typeof(SocketTcpAsync);
#endif
}
/// <summary>If not zero, this is used for the name server port on connect. Independent of protocol (so this better matches). Set by ChatClient.ConnectUsingSettings.</summary>
/// <remarks>This is reset when the protocol fallback is used.</remarks>
public ushort NameServerPortOverride;
/// <summary>
/// Gets the NameServer Address (with prefix and port), based on the set protocol (this.UsedProtocol).
/// </summary>
/// <returns>NameServer Address (with prefix and port).</returns>
private string GetNameServerAddress()
{
var protocolPort = 0;
ProtocolToNameServerPort.TryGetValue(this.TransportProtocol, out protocolPort);
if (this.NameServerPortOverride != 0)
{
this.Listener.DebugReturn(DebugLevel.INFO, string.Format("Using NameServerPortInAppSettings as port for Name Server: {0}", this.NameServerPortOverride));
protocolPort = this.NameServerPortOverride;
}
switch (this.TransportProtocol)
{
case ConnectionProtocol.Udp:
case ConnectionProtocol.Tcp:
return string.Format("{0}:{1}", NameServerHost, protocolPort);
case ConnectionProtocol.WebSocket:
return string.Format("ws://{0}:{1}", NameServerHost, protocolPort);
case ConnectionProtocol.WebSocketSecure:
return string.Format("wss://{0}:{1}", NameServerHost, protocolPort);
default:
throw new ArgumentOutOfRangeException();
}
}
/// <summary> Authenticates on NameServer. </summary>
/// <returns>If the authentication operation request could be sent.</returns>
public bool AuthenticateOnNameServer(string appId, string appVersion, string region, AuthenticationValues authValues)
{
if (this.DebugOut >= DebugLevel.INFO)
{
this.Listener.DebugReturn(DebugLevel.INFO, "OpAuthenticate()");
}
var opParameters = new Dictionary<byte, object>();
opParameters[ParameterCode.AppVersion] = appVersion;
opParameters[ParameterCode.ApplicationId] = appId;
opParameters[ParameterCode.Region] = region;
if (authValues != null)
{
if (!string.IsNullOrEmpty(authValues.UserId))
{
opParameters[ParameterCode.UserId] = authValues.UserId;
}
if (authValues.AuthType != CustomAuthenticationType.None)
{
opParameters[ParameterCode.ClientAuthenticationType] = (byte) authValues.AuthType;
if (authValues.Token != null)
{
opParameters[ParameterCode.Secret] = authValues.Token;
}
else
{
if (!string.IsNullOrEmpty(authValues.AuthGetParameters))
{
opParameters[ParameterCode.ClientAuthenticationParams] = authValues.AuthGetParameters;
}
if (authValues.AuthPostData != null)
{
opParameters[ParameterCode.ClientAuthenticationData] = authValues.AuthPostData;
}
}
}
}
return this.SendOperation(ChatOperationCode.Authenticate, opParameters, new SendOptions() { Reliability = true, Encrypt = this.IsEncryptionAvailable });
}
}
/// <summary>
/// Options for optional "Custom Authentication" services used with Photon. Used by OpAuthenticate after connecting to Photon.
/// </summary>
public enum CustomAuthenticationType : byte
{
/// <summary>Use a custom authentication service. Currently the only implemented option.</summary>
Custom = 0,
/// <summary>Authenticates users by their Steam Account. Set Steam's ticket as "ticket" via AddAuthParameter().</summary>
Steam = 1,
/// <summary>Authenticates users by their Facebook Account. Set Facebooks's tocken as "token" via AddAuthParameter().</summary>
Facebook = 2,
/// <summary>Authenticates users by their Oculus Account and token. Set Oculus' userid as "userid" and nonce as "nonce" via AddAuthParameter().</summary>
Oculus = 3,
/// <summary>Authenticates users by their PSN Account and token on PS4. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter().</summary>
PlayStation4 = 4,
[Obsolete("Use PlayStation4 or PlayStation5 as needed")]
PlayStation = 4,
/// <summary>Authenticates users by their Xbox Account. Pass the XSTS token via SetAuthPostData().</summary>
Xbox = 5,
/// <summary>Authenticates users by their HTC Viveport Account. Set userToken as "userToken" via AddAuthParameter().</summary>
Viveport = 10,
/// <summary>Authenticates users by their NSA ID. Set token as "token" and appversion as "appversion" via AddAuthParameter(). The appversion is optional.</summary>
NintendoSwitch = 11,
/// <summary>Authenticates users by their PSN Account and token on PS5. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter().</summary>
PlayStation5 = 12,
[Obsolete("Use PlayStation4 or PlayStation5 as needed")]
Playstation5 = 12,
/// <summary>Authenticates users with Epic Online Services (EOS). Set token as "token" and ownershipToken as "ownershipToken" via AddAuthParameter(). The ownershipToken is optional.</summary>
Epic = 13,
/// <summary>Authenticates users with Facebook Gaming api. Set token as "token" via AddAuthParameter().</summary>
FacebookGaming = 15,
/// <summary>Disables custom authentication. Same as not providing any AuthenticationValues for connect (more precisely for: OpAuthenticate).</summary>
None = byte.MaxValue
}
/// <summary>
/// Container for user authentication in Photon. Set AuthValues before you connect - all else is handled.
/// </summary>
/// <remarks>
/// On Photon, user authentication is optional but can be useful in many cases.
/// If you want to FindFriends, a unique ID per user is very practical.
///
/// There are basically three options for user authentication: None at all, the client sets some UserId
/// or you can use some account web-service to authenticate a user (and set the UserId server-side).
///
/// Custom Authentication lets you verify end-users by some kind of login or token. It sends those
/// values to Photon which will verify them before granting access or disconnecting the client.
///
/// The AuthValues are sent in OpAuthenticate when you connect, so they must be set before you connect.
/// If the AuthValues.UserId is null or empty when it's sent to the server, then the Photon Server assigns a UserId!
///
/// The Photon Cloud Dashboard will let you enable this feature and set important server values for it.
/// https://dashboard.photonengine.com
/// </remarks>
public class AuthenticationValues
{
/// <summary>See AuthType.</summary>
private CustomAuthenticationType authType = CustomAuthenticationType.None;
/// <summary>The type of authentication provider that should be used. Defaults to None (no auth whatsoever).</summary>
/// <remarks>Several auth providers are available and CustomAuthenticationType.Custom can be used if you build your own service.</remarks>
public CustomAuthenticationType AuthType
{
get { return authType; }
set { authType = value; }
}
/// <summary>This string must contain any (http get) parameters expected by the used authentication service. By default, username and token.</summary>
/// <remarks>
/// Maps to operation parameter 216.
/// Standard http get parameters are used here and passed on to the service that's defined in the server (Photon Cloud Dashboard).
/// </remarks>
public string AuthGetParameters { get; set; }
/// <summary>Data to be passed-on to the auth service via POST. Default: null (not sent). Either string or byte[] (see setters).</summary>
/// <remarks>Maps to operation parameter 214.</remarks>
public object AuthPostData { get; private set; }
/// <summary>Internal <b>Photon token</b>. After initial authentication, Photon provides a token for this client, subsequently used as (cached) validation.</summary>
/// <remarks>Any token for custom authentication should be set via SetAuthPostData or AddAuthParameter.</remarks>
public object Token { get; protected internal set; }
/// <summary>The UserId should be a unique identifier per user. This is for finding friends, etc..</summary>
/// <remarks>See remarks of AuthValues for info about how this is set and used.</remarks>
public string UserId { get; set; }
/// <summary>Creates empty auth values without any info.</summary>
public AuthenticationValues()
{
}
/// <summary>Creates minimal info about the user. If this is authenticated or not, depends on the set AuthType.</summary>
/// <param name="userId">Some UserId to set in Photon.</param>
public AuthenticationValues(string userId)
{
this.UserId = userId;
}
/// <summary>Sets the data to be passed-on to the auth service via POST.</summary>
/// <remarks>AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary.</remarks>
/// <param name="stringData">String data to be used in the body of the POST request. Null or empty string will set AuthPostData to null.</param>
public virtual void SetAuthPostData(string stringData)
{
this.AuthPostData = (string.IsNullOrEmpty(stringData)) ? null : stringData;
}
/// <summary>Sets the data to be passed-on to the auth service via POST.</summary>
/// <remarks>AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary.</remarks>
/// <param name="byteData">Binary token / auth-data to pass on.</param>
public virtual void SetAuthPostData(byte[] byteData)
{
this.AuthPostData = byteData;
}
/// <summary>Sets data to be passed-on to the auth service as Json (Content-Type: "application/json") via Post.</summary>
/// <remarks>AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary.</remarks>
/// <param name="dictData">A authentication-data dictionary will be converted to Json and passed to the Auth webservice via HTTP Post.</param>
public virtual void SetAuthPostData(Dictionary<string, object> dictData)
{
this.AuthPostData = dictData;
}
/// <summary>Adds a key-value pair to the get-parameters used for Custom Auth (AuthGetParameters).</summary>
/// <remarks>This method does uri-encoding for you.</remarks>
/// <param name="key">Key for the value to set.</param>
/// <param name="value">Some value relevant for Custom Authentication.</param>
public virtual void AddAuthParameter(string key, string value)
{
string ampersand = string.IsNullOrEmpty(this.AuthGetParameters) ? "" : "&";
this.AuthGetParameters = string.Format("{0}{1}{2}={3}", this.AuthGetParameters, ampersand, System.Uri.EscapeDataString(key), System.Uri.EscapeDataString(value));
}
/// <summary>
/// Transform this object into string.
/// </summary>
/// <returns>string representation of this object.</returns>
public override string ToString()
{
return string.Format("AuthenticationValues Type: {3} UserId: {0}, GetParameters: {1} Token available: {2}", this.UserId, this.AuthGetParameters, this.Token != null, this.AuthType);
}
/// <summary>
/// Make a copy of the current object.
/// </summary>
/// <param name="copy">The object to be copied into.</param>
/// <returns>The copied object.</returns>
public AuthenticationValues CopyTo(AuthenticationValues copy)
{
copy.AuthType = this.AuthType;
copy.AuthGetParameters = this.AuthGetParameters;
copy.AuthPostData = this.AuthPostData;
copy.UserId = this.UserId;
return copy;
}
}
/// <summary>Class for constants. Codes for parameters of Operations and Events.</summary>
public class ParameterCode
{
/// <summary>(224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud</summary>
public const byte ApplicationId = 224;
/// <summary>(221) Internally used to establish encryption</summary>
public const byte Secret = 221;
/// <summary>(220) Version of your application</summary>
public const byte AppVersion = 220;
/// <summary>(217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate</summary>
public const byte ClientAuthenticationType = 217;
/// <summary>(216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate</summary>
public const byte ClientAuthenticationParams = 216;
/// <summary>(214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate</summary>
public const byte ClientAuthenticationData = 214;
/// <summary>(210) Used for region values in OpAuth and OpGetRegions.</summary>
public const byte Region = 210;
/// <summary>(230) Address of a (game) server to use.</summary>
public const byte Address = 230;
/// <summary>(225) User's ID</summary>
public const byte UserId = 225;
}
/// <summary>
/// ErrorCode defines the default codes associated with Photon client/server communication.
/// </summary>
public class ErrorCode
{
/// <summary>(0) is always "OK", anything else an error or specific situation.</summary>
public const int Ok = 0;
// server - Photon low(er) level: <= 0
/// <summary>
/// (-3) Operation can't be executed yet (e.g. OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room).
/// </summary>
/// <remarks>
/// Before you call any operations on the Cloud servers, the automated client workflow must complete its authorization.
/// In PUN, wait until State is: JoinedLobby or ConnectedToMaster
/// </remarks>
public const int OperationNotAllowedInCurrentState = -3;
/// <summary>(-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications.</summary>
public const int InvalidOperationCode = -2;
/// <summary>(-1) Something went wrong in the server. Try to reproduce and contact Exit Games.</summary>
public const int InternalServerError = -1;
// server - PhotonNetwork: 0x7FFF and down
// logic-level error codes start with short.max
/// <summary>(32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service).</summary>
public const int InvalidAuthentication = 0x7FFF;
/// <summary>(32766) GameId (name) already in use (can't create another). Change name.</summary>
public const int GameIdAlreadyExists = 0x7FFF - 1;
/// <summary>(32765) Game is full. This rarely happens when some player joined the room before your join completed.</summary>
public const int GameFull = 0x7FFF - 2;
/// <summary>(32764) Game is closed and can't be joined. Join another game.</summary>
public const int GameClosed = 0x7FFF - 3;
/// <summary>(32762) Not in use currently.</summary>
public const int ServerFull = 0x7FFF - 5;
/// <summary>(32761) Not in use currently.</summary>
public const int UserBlocked = 0x7FFF - 6;
/// <summary>(32760) Random matchmaking only succeeds if a room exists that is neither closed nor full. Repeat in a few seconds or create a new room.</summary>
public const int NoRandomMatchFound = 0x7FFF - 7;
/// <summary>(32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join.</summary>
public const int GameDoesNotExist = 0x7FFF - 9;
/// <summary>(32757) Authorization on the Photon Cloud failed because the concurrent users (CCU) limit of the app's subscription is reached.</summary>
/// <remarks>
/// Unless you have a plan with "CCU Burst", clients might fail the authentication step during connect.
/// Affected client are unable to call operations. Please note that players who end a game and return
/// to the master server will disconnect and re-connect, which means that they just played and are rejected
/// in the next minute / re-connect.
/// This is a temporary measure. Once the CCU is below the limit, players will be able to connect an play again.
///
/// OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen.
/// Self-hosted Photon servers with a CCU limited license won't let a client connect at all.
/// </remarks>
public const int MaxCcuReached = 0x7FFF - 10;
/// <summary>(32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server.</summary>
/// <remarks>
/// Some subscription plans for the Photon Cloud are region-bound. Servers of other regions can't be used then.
/// Check your master server address and compare it with your Photon Cloud Dashboard's info.
/// https://cloud.photonengine.com/dashboard
///
/// OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen.
/// Self-hosted Photon servers with a CCU limited license won't let a client connect at all.
/// </remarks>
public const int InvalidRegion = 0x7FFF - 11;
/// <summary>
/// (32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details.
/// </summary>
public const int CustomAuthenticationFailed = 0x7FFF - 12;
/// <summary>(32753) The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again.</summary>
public const int AuthenticationTicketExpired = 0x7FF1;
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 3f712805dec728943a668b3bf19dc422
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatPeer.cs
uploadId: 817708

View File

@@ -0,0 +1,39 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
/// <summary>Possible states for a Chat Client.</summary>
public enum ChatState
{
/// <summary>Peer is created but not used yet.</summary>
Uninitialized,
/// <summary>Connecting to name server.</summary>
ConnectingToNameServer,
/// <summary>Connected to name server.</summary>
ConnectedToNameServer,
/// <summary>Authenticating on current server.</summary>
Authenticating,
/// <summary>Finished authentication on current server.</summary>
Authenticated,
/// <summary>Disconnecting from name server. This is usually a transition from name server to frontend server.</summary>
DisconnectingFromNameServer,
/// <summary>Connecting to frontend server.</summary>
ConnectingToFrontEnd,
/// <summary>Connected to frontend server.</summary>
ConnectedToFrontEnd,
/// <summary>Disconnecting from frontend server.</summary>
DisconnectingFromFrontEnd,
/// <summary>Currently not used.</summary>
QueuedComingFromFrontEnd,
/// <summary>The client disconnects (from any server).</summary>
Disconnecting,
/// <summary>The client is no longer connected (to any server).</summary>
Disconnected,
/// <summary>Client was unable to connect to Name Server and will attempt to connect with an alternative network protocol (TCP).</summary>
ConnectWithFallbackProtocol
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 8f482d8c4fe7ade4cbb08eb4a2d83b39
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatState.cs
uploadId: 817708

View File

@@ -0,0 +1,35 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
/// <summary>Contains commonly used status values for SetOnlineStatus. You can define your own.</summary>
/// <remarks>
/// While "online" (value 2 and up), the status message will be sent to anyone who has you on his friend list.
///
/// Define custom online status values as you like with these rules:
/// 0: Means "offline". It will be used when you are not connected. In this status, there is no status message.
/// 1: Means "invisible" and is sent to friends as "offline". They see status 0, no message but you can chat.
/// 2: And any higher value will be treated as "online". Status can be set.
/// </remarks>
public static class ChatUserStatus
{
/// <summary>(0) Offline.</summary>
public const int Offline = 0;
/// <summary>(1) Be invisible to everyone. Sends no message.</summary>
public const int Invisible = 1;
/// <summary>(2) Online and available.</summary>
public const int Online = 2;
/// <summary>(3) Online but not available.</summary>
public const int Away = 3;
/// <summary>(4) Do not disturb.</summary>
public const int DND = 4;
/// <summary>(5) Looking For Game/Group. Could be used when you want to be invited or do matchmaking.</summary>
public const int LFG = 5;
/// <summary>(6) Could be used when in a room, playing.</summary>
public const int Playing = 6;
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 7db67e7f5face2e42b6daafcaf4e6c82
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/ChatUserStatus.cs
uploadId: 817708

View File

@@ -0,0 +1,148 @@
// ----------------------------------------------------------------------------------------------------------------------
// <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
// <remarks>ChatClient is the main class of this api.</remarks>
// <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
// ----------------------------------------------------------------------------------------------------------------------
namespace Photon.Chat
{
using System.Collections.Generic;
using ExitGames.Client.Photon;
/// <summary>
/// Callback interface for Chat client side. Contains callback methods to notify your app about updates.
/// Must be provided to new ChatClient in constructor
/// </summary>
public interface IChatClientListener
{
/// <summary>
/// All debug output of the library will be reported through this method. Print it or put it in a
/// buffer to use it on-screen.
/// </summary>
/// <param name="level">DebugLevel (severity) of the message.</param>
/// <param name="message">Debug text. Print to System.Console or screen.</param>
void DebugReturn(DebugLevel level, string message);
/// <summary>
/// Disconnection happened.
/// </summary>
void OnDisconnected();
/// <summary>
/// Client is connected now.
/// </summary>
/// <remarks>
/// Clients have to be connected before they can send their state, subscribe to channels and send any messages.
/// </remarks>
void OnConnected();
/// <summary>The ChatClient's state changed. Usually, OnConnected and OnDisconnected are the callbacks to react to.</summary>
/// <param name="state">The new state.</param>
void OnChatStateChange(ChatState state);
/// <summary>
/// Notifies app that client got new messages from server
/// Number of senders is equal to number of messages in 'messages'. Sender with number '0' corresponds to message with
/// number '0', sender with number '1' corresponds to message with number '1' and so on
/// </summary>
/// <param name="channelName">channel from where messages came</param>
/// <param name="senders">list of users who sent messages</param>
/// <param name="messages">list of messages it self</param>
void OnGetMessages(string channelName, string[] senders, object[] messages);
/// <summary>
/// Notifies client about private message
/// </summary>
/// <param name="sender">user who sent this message</param>
/// <param name="message">message it self</param>
/// <param name="channelName">channelName for private messages (messages you sent yourself get added to a channel per target username)</param>
void OnPrivateMessage(string sender, object message, string channelName);
/// <summary>
/// Result of Subscribe operation. Returns subscription result for every requested channel name.
/// </summary>
/// <remarks>
/// If multiple channels sent in Subscribe operation, OnSubscribed may be called several times, each call with part of sent array or with single channel in "channels" parameter.
/// Calls order and order of channels in "channels" parameter may differ from order of channels in "channels" parameter of Subscribe operation.
/// </remarks>
/// <param name="channels">Array of channel names.</param>
/// <param name="results">Per channel result if subscribed.</param>
void OnSubscribed(string[] channels, bool[] results);
/// <summary>
/// Result of Unsubscribe operation. Returns for channel name if the channel is now unsubscribed.
/// </summary>
/// If multiple channels sent in Unsubscribe operation, OnUnsubscribed may be called several times, each call with part of sent array or with single channel in "channels" parameter.
/// Calls order and order of channels in "channels" parameter may differ from order of channels in "channels" parameter of Unsubscribe operation.
/// <param name="channels">Array of channel names that are no longer subscribed.</param>
void OnUnsubscribed(string[] channels);
/// <summary>
/// New status of another user (you get updates for users set in your friends list).
/// </summary>
/// <param name="user">Name of the user.</param>
/// <param name="status">New status of that user.</param>
/// <param name="gotMessage">True if the status contains a message you should cache locally. False: This status update does not include a message (keep any you have).</param>
/// <param name="message">Message that user set.</param>
void OnStatusUpdate(string user, int status, bool gotMessage, object message);
/// <summary>
/// A user has subscribed to a public chat channel
/// </summary>
/// <param name="channel">Name of the chat channel</param>
/// <param name="user">UserId of the user who subscribed</param>
void OnUserSubscribed(string channel, string user);
/// <summary>
/// A user has unsubscribed from a public chat channel
/// </summary>
/// <param name="channel">Name of the chat channel</param>
/// <param name="user">UserId of the user who unsubscribed</param>
void OnUserUnsubscribed(string channel, string user);
#if CHAT_EXTENDED
/// <summary>
/// Properties of a public channel has been changed
/// </summary>
/// <param name="channel">Channel name in which the properties have changed</param>
/// <param name="senderUserId">The UserID of the user who changed the properties</param>
/// <param name="properties">The properties that have changed</param>
void OnChannelPropertiesChanged(string channel, string senderUserId, Dictionary<object, object> properties);
/// <summary>
/// Properties of a user in a public channel has been changed
/// </summary>
/// <param name="channel">Channel name in which the properties have changed</param>
/// <param name="targetUserId">The UserID whom properties have changed</param>
/// <param name="senderUserId">The UserID of the user who changed the properties</param>
/// <param name="properties">The properties that have changed</param>
void OnUserPropertiesChanged(string channel, string targetUserId, string senderUserId, Dictionary<object, object> properties);
/// <summary>
/// The server uses error events to make the client aware of some issues.
/// </summary>
/// <remarks>
/// This is currently used only in Chat WebHooks.
/// </remarks>
/// <param name="channel">The name of the channel in which this error info has been received</param>
/// <param name="error">The text message of the error info</param>
/// <param name="data">Optional error data</param>
void OnErrorInfo(string channel, string error, object data);
#endif
#if SDK_V4
/// <summary>
/// Received a broadcast message
/// </summary>
/// <param name="channel">Name of the chat channel</param>
/// <param name="message">Message data</param>
void OnReceiveBroadcastMessage(string channel, byte[] message);
#endif
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: bab7c8053b486e34aa0d4ca99dcbec80
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/IChatClientListener.cs
uploadId: 817708

View File

@@ -0,0 +1,12 @@
{
"name": "PhotonChat",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 08a110bd598f7604f9519c2d7e1fb3cc
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/PhotonChat.asmdef
uploadId: 817708

View File

@@ -0,0 +1,240 @@
Photon Chat C# Client - Changelog
www.photonengine.com - Join our Discord Server: https://dashboard.photonengine.com/account/profile
Version 4.1.8.17 (10. November 2025 - rev8151)
No notable changes.
Version 4.1.8.16 (31. July 2025 - rev8016)
No notable changes.
Version 4.1.8.15 (08. May 2025 - rev7931)
No notable changes.
Version 4.1.8.14 (11. March 2025 - rev7866)
No notable changes.
Version 4.1.8.13 (09. January 2025 - rev7815)
No notable changes.
Version 4.1.8.12 (16. December 2024 - rev7801)
No notable changes.
Version 4.1.8.11 (17. October 2024 - rev7735)
No notable changes.
Version 4.1.8.10 (14. October 2024 - rev7732)
No notable changes.
Version 4.1.8.9 (02. September 2024 - rev7660)
No notable changes.
Version 4.1.8.8 (02. August 2024 - rev7638)
No notable changes.
Version 4.1.8.7 (05. July 2024 - rev7622)
No notable changes.
Version 4.1.8.6 (25. May 2024 - rev7571)
No notable changes. The Realtime API has fixes for non-Unity projects.
Version 4.1.8.5 (13. May 2024 - rev7556)
No notable changes (except in library).
Version 4.1.8.4 (26. April 2024 - rev7530)
No notable changes (except in library).
Version 4.1.8.3 (24. April 2024 - rev7519)
No notable changes.
Version 4.1.8.2 (25. March 2024 - rev7471)
No notable changes.
Version 4.1.8.1 (12. March 2024 - rev7444)
No notable changes.
Version 4.1.8.0 (31. January 2024 - rev7364)
No notable changes.
Version 4.1.7.4 (13. December 2023 - rev7284)
No notable changes.
Version 4.1.7.3 (07. December 2023 - rev7252)
No notable changes.
Version 4.1.7.1 (06. September 2023 - rev7148)
No notable changes.
Version 4.1.7.0 (18. August 2023 - rev7111)
Changed: Some default Name Server ports: WS now connects via port 80, WSS via 443.
Note: The Frontend Server ports are provided by the Name Server. They might be changed to 80/443 respectively at some point (but are not yet).
Version 4.1.6.26 (09. August 2023 - rev7076)
Changed: Name Server default port for WS is now 80, WSS is 443.
Version 4.1.6.25 (05. June 2023 - rev6925)
No notable changes.
Version 4.1.6.24 (15. May 2023 - rev6894)
No notable changes.
Version 4.1.6.23 (15. March 2023 - rev6743)
Note: No notable changes for Chat API.
Version 4.1.6.22 (21. December 2022 - rev6637)
Note: No notable changes. Only Reatime API changed.
Version 4.1.6.21 (14. December 2022 - rev6623)
Note: No notable changes.
Version 4.1.6.20 (23. September 2022 - rev6568)
No notable changes.
Version 4.1.6.19 (12. October 2022 - rev6519)
No notable changes.
Version 4.1.6.18 (20. September 2022 - rev6501)
Added: More details to some reference docs.
Version 4.1.6.17 (02. August 2022 - rev6472)
Removed: ChatAppSettings.AppId (was obsolete for a while).
Version 4.1.6.16 (20. June 2022)
Fixed: The ProxyServerAddress is also applied when connecting to the Frontend Server (was missing in previous update).
Version 4.1.6.15 (02. June 2022)
Added: Proxy support (with WS/WSS) to Chat API. This can be used via ConnectUsingSettings() or by setting ChatClient.ProxyServerAddress before connecting.
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.

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: e5c3dda6f11fe7845989297c8a603dc2
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Code/changes-chat.txt
uploadId: 817708

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 801c62f7d03cb463ba20067deb330234
folderAsset: yes
timeCreated: 1537874612
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: bae955485736a2e4e81d400a75a2f703

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 34000188cb69376469c1894be10c5bc2
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Chat-Scene.unity
uploadId: 817708

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7eb0bd8aaf2d990469e7842113c31ac3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Photon.Chat.DemoChat
{
public class ChannelSelector : MonoBehaviour, IPointerClickHandler
{
public string Channel;
public void SetChannel(string channel)
{
this.Channel = channel;
Text t = GetComponentInChildren<Text>();
t.text = this.Channel;
}
public void OnPointerClick(PointerEventData eventData)
{
#if UNITY_6000_0_OR_NEWER
ChatNewGui handler = GameObject.FindFirstObjectByType<ChatNewGui>();
#else
ChatNewGui handler = FindObjectOfType<ChatNewGui>();
#endif
handler.ShowChannel(this.Channel);
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 48caa72710147fc4f9389b0b5ec6137d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/ChannelSelector.cs
uploadId: 817708

View File

@@ -0,0 +1,651 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Photon.Chat.DemoChat
{
/// <summary>
/// This simple Chat UI demonstrate basics usages of the Chat Api
/// </summary>
/// <remarks>
/// The ChatClient basically lets you create any number of channels.
///
/// some friends are already set in the Chat demo "DemoChat-Scene", 'Joe', 'Jane' and 'Bob', simply log with them so that you can see the status changes in the Interface
///
/// Workflow:
/// Create ChatClient, Connect to a server with your AppID, Authenticate the user (apply a unique name,)
/// and subscribe to some channels.
/// Subscribe a channel before you publish to that channel!
///
///
/// Note:
/// Don't forget to call ChatClient.Service() on Update to keep the Chatclient operational.
/// </remarks>
public class ChatNewGui : MonoBehaviour, IChatClientListener
{
public string[] ChannelsToJoinOnConnect; // set in inspector. Demo channels to join automatically.
public string[] FriendsList; // this is a hidden inspector field! use debug mode to see and edit it
public int HistoryLengthToFetch; // set in inspector. Up to a certain degree, previously sent messages can be fetched for context
public string UserName { get; set; }
private string selectedChannelName; // mainly used for GUI/input
public ChatClient chatClient;
public GameObject ConnectingLabel;
public RectTransform ChatPanel; // set in inspector (to enable/disable panel)
public GameObject UserIdFormPanel;
public InputField InputFieldChat; // set in inspector
public Text CurrentChannelText; // set in inspector
public Toggle ChannelToggleToInstantiate; // set in inspector
public GameObject FriendListUiItemtoInstantiate;
private readonly Dictionary<string, Toggle> channelToggles = new Dictionary<string, Toggle>();
private readonly Dictionary<string, FriendItem> friendListItemLUT = new Dictionary<string, FriendItem>();
public bool ShowState = true;
public GameObject Title;
public Text StateText; // set in inspector
public Text UserIdText; // set in inspector
// private static string WelcomeText = "Welcome to chat. Type \\help to list commands.";
private static string HelpText = "\n -- HELP --\n" +
"To subscribe to channel(s):\n" +
"\t<color=#E07B00>\\subscribe</color> <color=green><list of channelnames></color>\n" +
"\tor\n" +
"\t<color=#E07B00>\\s</color> <color=green><list of channelnames></color>\n" +
"\n" +
"To leave channel(s):\n" +
"\t<color=#E07B00>\\unsubscribe</color> <color=green><list of channelnames></color>\n" +
"\tor\n" +
"\t<color=#E07B00>\\u</color> <color=green><list of channelnames></color>\n" +
"\n" +
"To switch the active channel\n" +
"\t<color=#E07B00>\\join</color> <color=green><channelname></color>\n" +
"\tor\n" +
"\t<color=#E07B00>\\j</color> <color=green><channelname></color>\n" +
"\n" +
"To send a private message:\n" +
"\t\\<color=#E07B00>msg</color> <color=green><username></color> <color=green><message></color>\n" +
"\n" +
"To add friend(s):\n" +
"\t\\<color=#E07B00>friend</color> <color=green><username></color> [<color=green><username></color>]\n" +
"\n" +
"To remove friend(s):\n" +
"\t\\<color=#E07B00>unfriend</color> <color=green><username></color> [<color=green><username></color>]\n" +
"\n" +
"To change status:\n" +
"\t\\<color=#E07B00>state</color> <color=green><stateIndex></color> <color=green><message></color>\n" +
"<color=green>0</color> = Offline " +
"<color=green>1</color> = Invisible " +
"<color=green>2</color> = Online " +
"<color=green>3</color> = Away \n" +
"<color=green>4</color> = Do not disturb " +
"<color=green>5</color> = Looking For Group " +
"<color=green>6</color> = Playing" +
"\n\n" +
"To clear the current chat tab (private chats get closed):\n" +
"\t<color=#E07B00>\\clear</color>";
public void Start()
{
DontDestroyOnLoad(gameObject);
UserIdText.text = "";
StateText.text = "";
StateText.gameObject.SetActive(true);
UserIdText.gameObject.SetActive(true);
Title.SetActive(true);
ChatPanel.gameObject.SetActive(false);
ConnectingLabel.SetActive(false);
if (string.IsNullOrEmpty(UserName))
{
UserName = "user" + Environment.TickCount % 99; //made-up username
}
this.UserIdFormPanel.gameObject.SetActive(true);
if (string.IsNullOrEmpty(ChatSettings.Instance.AppId))
{
Debug.LogError("You need to set the chat app ID in the PhotonServerSettings file in order to continue.");
return;
}
}
public void Connect()
{
this.UserIdFormPanel.gameObject.SetActive(false);
this.chatClient = new ChatClient(this);
#if UNITY_WEBGL
this.chatClient.UseBackgroundWorkerForSending = false;
#else
this.chatClient.UseBackgroundWorkerForSending = true;
#endif
this.chatClient.Connect(ChatSettings.Instance.AppId, "1.0", new AuthenticationValues(UserName));
this.ChannelToggleToInstantiate.gameObject.SetActive(false);
Debug.Log("Connecting as: " + UserName);
ConnectingLabel.SetActive(true);
}
/// <summary>To avoid that the Editor becomes unresponsive, disconnect all Photon connections in OnDestroy.</summary>
public void OnDestroy()
{
if (this.chatClient != null)
{
this.chatClient.Disconnect();
}
}
/// <summary>To avoid that the Editor becomes unresponsive, disconnect all Photon connections in OnApplicationQuit.</summary>
public void OnApplicationQuit()
{
if (this.chatClient != null)
{
this.chatClient.Disconnect();
}
}
public void Update()
{
if (this.chatClient != null)
{
this.chatClient.Service(); // make sure to call this regularly! it limits effort internally, so calling often is ok!
}
// check if we are missing context, which means we got kicked out to get back to the Photon Demo hub.
if (this.StateText == null)
{
Destroy(this.gameObject);
return;
}
this.StateText.gameObject.SetActive(ShowState); // this could be handled more elegantly, but for the demo it's ok.
}
public void OnEnterSend()
{
if (Input.GetKey(KeyCode.Return) || Input.GetKey(KeyCode.KeypadEnter))
{
SendChatMessage(this.InputFieldChat.text);
this.InputFieldChat.text = "";
}
}
public void OnClickSend()
{
if (this.InputFieldChat != null)
{
SendChatMessage(this.InputFieldChat.text);
this.InputFieldChat.text = "";
}
}
public int TestLength = 2048;
private byte[] testBytes = new byte[2048];
private void SendChatMessage(string inputLine)
{
if (string.IsNullOrEmpty(inputLine))
{
return;
}
if ("test".Equals(inputLine))
{
if (this.TestLength != this.testBytes.Length)
{
this.testBytes = new byte[this.TestLength];
}
this.chatClient.SendPrivateMessage(this.chatClient.AuthValues.UserId, testBytes, true);
}
bool doingPrivateChat = this.chatClient.PrivateChannels.ContainsKey(this.selectedChannelName);
string privateChatTarget = string.Empty;
if (doingPrivateChat)
{
// the channel name for a private conversation is (on the client!!) always composed of both user's IDs: "this:remote"
// so the remote ID is simple to figure out
string[] splitNames = this.selectedChannelName.Split(new char[] { ':' });
privateChatTarget = splitNames[1];
}
//UnityEngine.Debug.Log("selectedChannelName: " + selectedChannelName + " doingPrivateChat: " + doingPrivateChat + " privateChatTarget: " + privateChatTarget);
if (inputLine[0].Equals('\\'))
{
string[] tokens = inputLine.Split(new char[] { ' ' }, 2);
if (tokens[0].Equals("\\help"))
{
PostHelpToCurrentChannel();
}
if (tokens[0].Equals("\\state"))
{
int newState = 0;
List<string> messages = new List<string>();
messages.Add("i am state " + newState);
string[] subtokens = tokens[1].Split(new char[] { ' ', ',' });
if (subtokens.Length > 0)
{
newState = int.Parse(subtokens[0]);
}
if (subtokens.Length > 1)
{
messages.Add(subtokens[1]);
}
this.chatClient.SetOnlineStatus(newState, messages.ToArray()); // this is how you set your own state and (any) message
}
else if ((tokens[0].Equals("\\subscribe") || tokens[0].Equals("\\s")) && !string.IsNullOrEmpty(tokens[1]))
{
this.chatClient.Subscribe(tokens[1].Split(new char[] { ' ', ',' }));
}
else if ((tokens[0].Equals("\\unsubscribe") || tokens[0].Equals("\\u")) && !string.IsNullOrEmpty(tokens[1]))
{
this.chatClient.Unsubscribe(tokens[1].Split(new char[] { ' ', ',' }));
}
else if (tokens[0].Equals("\\clear"))
{
if (doingPrivateChat)
{
this.chatClient.PrivateChannels.Remove(this.selectedChannelName);
}
else
{
ChatChannel channel;
if (this.chatClient.TryGetChannel(this.selectedChannelName, doingPrivateChat, out channel))
{
channel.ClearMessages();
}
}
}
else if (tokens[0].Equals("\\msg") && !string.IsNullOrEmpty(tokens[1]))
{
string[] subtokens = tokens[1].Split(new char[] { ' ', ',' }, 2);
if (subtokens.Length < 2)
return;
string targetUser = subtokens[0];
string message = subtokens[1];
this.chatClient.SendPrivateMessage(targetUser, message);
}
else if ((tokens[0].Equals("\\join") || tokens[0].Equals("\\j")) && !string.IsNullOrEmpty(tokens[1]))
{
string[] subtokens = tokens[1].Split(new char[] { ' ', ',' }, 2);
// If we are already subscribed to the channel we directly switch to it, otherwise we subscribe to it first and then switch to it implicitly
if (channelToggles.ContainsKey(subtokens[0]))
{
ShowChannel(subtokens[0]);
}
else
{
this.chatClient.Subscribe(new string[] { subtokens[0] });
}
}
else if (tokens[0].Equals("\\friend") && !string.IsNullOrEmpty(tokens[1]))
{
string[] friends = tokens[1].Split(new char[] { ' ', ',' });
Debug.Log("Adding friends (" + friends.Length + "): " + string.Join(",", friends));
this.chatClient.AddFriends(friends);
foreach (string _friend in friends)
{
if (this.FriendListUiItemtoInstantiate != null && _friend != this.UserName)
{
this.InstantiateFriendButton(_friend);
}
}
}
else if (tokens[0].Equals("\\unfriend") && !string.IsNullOrEmpty(tokens[1]))
{
string[] friends = tokens[1].Split(new char[] { ' ', ',' });
Debug.Log("Removing friends (" + friends.Length + "): " + string.Join(",", friends));
this.chatClient.RemoveFriends(friends);
foreach (string _friend in friends)
{
if (this.FriendListUiItemtoInstantiate != null && _friend != this.UserName)
{
this.DestroyFriendButton(_friend);
}
}
}
else
{
Debug.Log("The command '" + tokens[0] + "' is invalid.");
}
}
else
{
if (doingPrivateChat)
{
this.chatClient.SendPrivateMessage(privateChatTarget, inputLine);
}
else
{
this.chatClient.PublishMessage(this.selectedChannelName, inputLine);
}
}
}
public void PostHelpToCurrentChannel()
{
this.CurrentChannelText.text += HelpText;
}
public void DebugReturn(ExitGames.Client.Photon.DebugLevel level, string message)
{
if (level == ExitGames.Client.Photon.DebugLevel.ERROR)
{
UnityEngine.Debug.LogError(message);
}
else if (level == ExitGames.Client.Photon.DebugLevel.WARNING)
{
UnityEngine.Debug.LogWarning(message);
}
else
{
UnityEngine.Debug.Log(message);
}
}
public void OnConnected()
{
if (this.ChannelsToJoinOnConnect != null && this.ChannelsToJoinOnConnect.Length > 0)
{
this.chatClient.Subscribe(this.ChannelsToJoinOnConnect, this.HistoryLengthToFetch);
}
ConnectingLabel.SetActive(false);
UserIdText.text = "Connected as " + this.UserName;
this.ChatPanel.gameObject.SetActive(true);
if (FriendsList != null && FriendsList.Length > 0)
{
this.chatClient.AddFriends(FriendsList); // Add some users to the server-list to get their status updates
// add to the UI as well
foreach (string _friend in FriendsList)
{
if (this.FriendListUiItemtoInstantiate != null && _friend != this.UserName)
{
this.InstantiateFriendButton(_friend);
}
}
}
if (this.FriendListUiItemtoInstantiate != null)
{
this.FriendListUiItemtoInstantiate.SetActive(false);
}
this.chatClient.SetOnlineStatus(ChatUserStatus.Online); // You can set your online state (without a mesage).
}
public void OnDisconnected()
{
ConnectingLabel.SetActive(false);
}
public void OnChatStateChange(ChatState state)
{
// use OnConnected() and OnDisconnected()
// this method might become more useful in the future, when more complex states are being used.
this.StateText.text = state.ToString();
}
public void OnSubscribed(string[] channels, bool[] results)
{
// in this demo, we simply send a message into each channel. This is NOT a must have!
foreach (string channel in channels)
{
this.chatClient.PublishMessage(channel, "says 'hi'."); // you don't HAVE to send a msg on join but you could.
if (this.ChannelToggleToInstantiate != null)
{
this.InstantiateChannelButton(channel);
}
}
Debug.Log("OnSubscribed: " + string.Join(", ", channels));
/*
// select first subscribed channel in alphabetical order
if (this.chatClient.PublicChannels.Count > 0)
{
var l = new List<string>(this.chatClient.PublicChannels.Keys);
l.Sort();
string selected = l[0];
if (this.channelToggles.ContainsKey(selected))
{
ShowChannel(selected);
foreach (var c in this.channelToggles)
{
c.Value.isOn = false;
}
this.channelToggles[selected].isOn = true;
AddMessageToSelectedChannel(WelcomeText);
}
}
*/
// Switch to the first newly created channel
ShowChannel(channels[0]);
}
private void InstantiateChannelButton(string channelName)
{
if (this.channelToggles.ContainsKey(channelName))
{
Debug.Log("Skipping creation for an existing channel toggle.");
return;
}
Toggle cbtn = (Toggle)GameObject.Instantiate(this.ChannelToggleToInstantiate);
cbtn.gameObject.SetActive(true);
cbtn.GetComponentInChildren<ChannelSelector>().SetChannel(channelName);
cbtn.transform.SetParent(this.ChannelToggleToInstantiate.transform.parent, false);
this.channelToggles.Add(channelName, cbtn);
}
private void InstantiateFriendButton(string friendId)
{
GameObject fbtn = (GameObject)GameObject.Instantiate(this.FriendListUiItemtoInstantiate);
fbtn.gameObject.SetActive(true);
FriendItem _friendItem = fbtn.GetComponent<FriendItem>();
_friendItem.FriendId = friendId;
fbtn.transform.SetParent(this.FriendListUiItemtoInstantiate.transform.parent, false);
this.friendListItemLUT[friendId] = _friendItem;
}
private void DestroyFriendButton(string friendId)
{
if (this.friendListItemLUT.ContainsKey(friendId))
{
Destroy(this.friendListItemLUT[friendId].gameObject);
this.friendListItemLUT.Remove(friendId);
}
}
public void OnUnsubscribed(string[] channels)
{
foreach (string channelName in channels)
{
if (this.channelToggles.ContainsKey(channelName))
{
Toggle t = this.channelToggles[channelName];
Destroy(t.gameObject);
this.channelToggles.Remove(channelName);
Debug.Log("Unsubscribed from channel '" + channelName + "'.");
// Showing another channel if the active channel is the one we unsubscribed from before
if (channelName == selectedChannelName && channelToggles.Count > 0)
{
IEnumerator<KeyValuePair<string, Toggle>> firstEntry = channelToggles.GetEnumerator();
firstEntry.MoveNext();
ShowChannel(firstEntry.Current.Key);
firstEntry.Current.Value.isOn = true;
}
}
else
{
Debug.Log("Can't unsubscribe from channel '" + channelName + "' because you are currently not subscribed to it.");
}
}
}
public void OnGetMessages(string channelName, string[] senders, object[] messages)
{
if (channelName.Equals(this.selectedChannelName))
{
// update text
ShowChannel(this.selectedChannelName);
}
}
public void OnPrivateMessage(string sender, object message, string channelName)
{
// as the ChatClient is buffering the messages for you, this GUI doesn't need to do anything here
// you also get messages that you sent yourself. in that case, the channelName is determinded by the target of your msg
this.InstantiateChannelButton(channelName);
byte[] msgBytes = message as byte[];
if (msgBytes != null)
{
Debug.Log("Message with byte[].Length: " + msgBytes.Length);
}
if (this.selectedChannelName.Equals(channelName))
{
ShowChannel(channelName);
}
}
/// <summary>
/// New status of another user (you get updates for users set in your friends list).
/// </summary>
/// <param name="user">Name of the user.</param>
/// <param name="status">New status of that user.</param>
/// <param name="gotMessage">True if the status contains a message you should cache locally. False: This status update does not include a
/// message (keep any you have).</param>
/// <param name="message">Message that user set.</param>
public void OnStatusUpdate(string user, int status, bool gotMessage, object message)
{
Debug.LogWarning("status: " + string.Format("{0} is {1}. Msg:{2}", user, status, message));
if (friendListItemLUT.ContainsKey(user))
{
FriendItem _friendItem = friendListItemLUT[user];
if (_friendItem != null)
_friendItem.OnFriendStatusUpdate(status, gotMessage, message);
}
}
public void OnUserSubscribed(string channel, string user)
{
}
public void OnUserUnsubscribed(string channel, string user)
{
}
public void OnReceiveBroadcastMessage(string channel, byte[] message)
{
}
public void AddMessageToSelectedChannel(string msg, int msgId)
{
ChatChannel channel = null;
bool found = this.chatClient.TryGetChannel(this.selectedChannelName, out channel);
if (!found)
{
Debug.Log("AddMessageToSelectedChannel failed to find channel: " + this.selectedChannelName);
return;
}
if (channel != null)
{
channel.Add("Bot", msg, msgId);
}
}
public void ShowChannel(string channelName)
{
if (string.IsNullOrEmpty(channelName))
{
return;
}
ChatChannel channel = null;
bool found = this.chatClient.TryGetChannel(channelName, out channel);
if (!found)
{
Debug.Log("ShowChannel failed to find channel: " + channelName);
return;
}
this.selectedChannelName = channelName;
this.CurrentChannelText.text = channel.ToStringMessages();
Debug.Log("ShowChannel: " + this.selectedChannelName);
foreach (KeyValuePair<string, Toggle> pair in channelToggles)
{
pair.Value.isOn = pair.Key == channelName ? true : false;
}
}
public void OpenDashboard()
{
Application.OpenURL("https://dashboard.photonengine.com");
}
public void OpenChatDocs()
{
Application.OpenURL("https://doc.photonengine.com/chat");
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 8626678ad1db422409a1803edb7f6d72
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/ChatNewGui.cs
uploadId: 817708

View File

@@ -0,0 +1,90 @@
using System.IO;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Photon.Chat.DemoChat
{
/// <summary>
/// Utility class to provide an instance with the Chat AppId to use by the demo. Can use PUN PhotonServerSettings or work as standalone.
/// </summary>
/// <remarks>
/// See the Instance getter for the different implementations (with and without PUN).
/// </remarks>
public class ChatSettings : ScriptableObject
{
[Tooltip("Your Chat AppId from Photon Dashboard")]
public string AppId;
[HideInInspector]
public bool WizardDone;
// backing field for property
private static ChatSettings instance;
// provides access to instance of ChatSettings. file gets created if not available
public static ChatSettings Instance
{
get
{
#if PUN_2_OR_NEWER
if (instance == null)
{
instance = ScriptableObject.CreateInstance<ChatSettings>();
}
instance.AppId = Photon.Pun.PhotonNetwork.PhotonServerSettings.AppSettings.AppIdChat;
return instance;
#else
if (instance == null)
{
instance = Load();
}
return instance;
#endif
}
}
// loads existing "ChatSettingsFile" of type ChatSettings from a Resources folder
public static ChatSettings Load()
{
ChatSettings settings = (ChatSettings)Resources.Load("ChatSettingsFile", typeof(ChatSettings));
if (settings != null)
{
return settings;
}
else
{
return Create();
}
}
// creates an instance of ChatSettings and in Editor, stores it in a default path
private static ChatSettings Create()
{
ChatSettings settings = (ChatSettings)ScriptableObject.CreateInstance("ChatSettings");
#if UNITY_EDITOR
if (!Directory.Exists("Assets/Resources"))
{
AssetDatabase.CreateFolder("Assets", "Resources");
AssetDatabase.ImportAsset("Assets/Resources");
}
AssetDatabase.CreateAsset(settings, "Assets/Resources/ChatSettingsFile.asset");
EditorUtility.SetDirty(settings);
settings = (ChatSettings)Resources.Load("ChatSettingsFile", typeof(ChatSettings));
#endif
return settings;
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: c8078fb5ca219c34ea80805fec36beae
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/ChatSettings.cs
uploadId: 817708

View File

@@ -0,0 +1,79 @@
using UnityEngine;
using UnityEngine.UI;
namespace Photon.Chat.DemoChat
{
/// <summary>
/// Friend UI item used to represent the friend status as well as message.
/// It aims at showing how to share health for a friend that plays on a different room than you for example.
/// But of course the message can be anything and a lot more complex.
/// </summary>
public class FriendItem : MonoBehaviour
{
[HideInInspector]
public string FriendId
{
set { NameLabel.text = value; }
get { return NameLabel.text; }
}
public Text NameLabel;
public Text StatusLabel;
public Text Health;
public void Awake()
{
Health.text = string.Empty;
}
public void OnFriendStatusUpdate(int status, bool gotMessage, object message)
{
string _status;
// status string for the remote-user status code to show in ui
switch (status)
{
case 1:
_status = "Invisible";
break;
case 2:
_status = "Online";
break;
case 3:
_status = "Away";
break;
case 4:
_status = "Do not disturb";
break;
case 5:
_status = "Looking For Game/Group";
break;
case 6:
_status = "Playing";
break;
default:
_status = "Offline";
break;
}
StatusLabel.text = _status;
if (gotMessage)
{
string _health = string.Empty;
if (message != null)
{
string[] _messages = message as string[];
if (_messages != null && _messages.Length >= 2)
{
_health = (string)_messages[1] + "%";
}
}
Health.text = _health;
}
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 2a3cc2bf2597946e3a355de2affc40b5
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/FriendItem.cs
uploadId: 817708

View File

@@ -0,0 +1,61 @@
using UnityEngine;
using UnityEngine.UI;
namespace Photon.Chat.DemoChat
{
[RequireComponent(typeof(ChatNewGui))]
public class NamePickNewGui : MonoBehaviour
{
private const string UserNamePlayerPref = "NamePickUserName";
public ChatNewGui chatNewComponent;
public InputField idInput;
public void Start()
{
InitChatNewComponent();
string prefsName = PlayerPrefs.GetString(NamePickNewGui.UserNamePlayerPref);
if (!string.IsNullOrEmpty(prefsName))
{
this.idInput.text = prefsName;
}
}
// new UI will fire "EndEdit" event also when loosing focus. So check "enter" key and only then StartChat.
public void EndEditOnEnter()
{
if (Input.GetKey(KeyCode.Return) || Input.GetKey(KeyCode.KeypadEnter))
{
this.StartChat();
}
}
public void StartChat()
{
if (!InitChatNewComponent())
{
return;
}
this.chatNewComponent.UserName = this.idInput.text.Trim();
this.chatNewComponent.Connect();
this.enabled = false;
PlayerPrefs.SetString(NamePickNewGui.UserNamePlayerPref, this.chatNewComponent.UserName);
}
public bool InitChatNewComponent()
{
#if UNITY_6000_0_OR_NEWER
this.chatNewComponent = GameObject.FindFirstObjectByType<ChatNewGui>();
#else
this.chatNewComponent = FindObjectOfType<ChatNewGui>();
#endif
return this.chatNewComponent != null;
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: f5e77b98bc3c7be4d838fbfe21004ce3
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/NamePickNewGui.cs
uploadId: 817708

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8195fd485f4b78e41a66d4ab2e62ff99
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using UnityEngine;
namespace Photon.Chat.DemoChat.Utilities
{
/// <summary>
/// This is used in the Editor Splash to properly inform the developer about the chat AppId requirement.
/// </summary>
[ExecuteInEditMode]
public class ChatIdCheckerUI : MonoBehaviour
{
public GameObject VisibilityRoot; // must be set in inspector
void Update()
{
if (this.VisibilityRoot != null)
{
this.VisibilityRoot.SetActive(string.IsNullOrEmpty(ChatSettings.Instance.AppId));
}
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 49f8b1206d1f448aca7d730f027d8c09
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/Utilities/ChatIdCheckerUI.cs
uploadId: 817708

View File

@@ -0,0 +1,22 @@
using UnityEngine;
namespace Photon.Chat.DemoChat.Utilities
{
/// <summary>This component will destroy the Target GameObject (or the one it is attached to).</summary>
public class DestroyOnStart : MonoBehaviour
{
[Tooltip("If null, this game object gets destroyed in this Start().")]
public GameObject Target; // set in inspector
void Start()
{
if (this.Target == null)
{
this.Target = this.gameObject;
}
GameObject.Destroy(this.Target);
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: a2895d30d4d2c3f4cb5d2c92fcd9125f
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/Utilities/DestroyOnStart.cs
uploadId: 817708

View File

@@ -0,0 +1,22 @@
using UnityEngine;
namespace Photon.Chat.DemoChat.Utilities
{
/// <summary>This component will enable (setactive) the Target GameObject (or the one it is attached to).</summary>
public class EnableOnStart : MonoBehaviour
{
[Tooltip("If null, this game object becomes active in this Start().")]
public GameObject Target; // set in inspector
void Start()
{
if (this.Target == null)
{
this.Target = this.gameObject;
}
this.Target.SetActive(true);
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 8555b4060b53841439f2c0c6f10db6ff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/Utilities/EnableOnStart.cs
uploadId: 817708

View File

@@ -0,0 +1,14 @@
using UnityEngine;
namespace Photon.Chat.DemoChat.Utilities
{
// small script to avoid clicks picking inactive UI elements
public class IgnoreUiRaycastWhenInactive : MonoBehaviour, ICanvasRaycastFilter
{
public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
{
return gameObject.activeInHierarchy;
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 4ba4c747f6975ea46bcc0a55ffe3bfe8
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/Utilities/IgnoreUiRaycastWhenInactive.cs
uploadId: 817708

View File

@@ -0,0 +1,43 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TextButtonTransition.cs" company="Exit Games GmbH">
// </copyright>
// <summary>
// Use this on Button texts to have some color transition on the text as well without corrupting button's behaviour.
// </summary>
// <author>developer@exitgames.com</author>
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Photon.Chat.DemoChat.Utilities
{
/// <summary>
/// Use this on Button texts to have some color transition on the text as well without corrupting button's behaviour.
/// </summary>
[RequireComponent(typeof(Text))]
public class TextButtonTransition : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {
Text _text;
public Color NormalColor= Color.white;
public Color HoverColor = Color.black;
public void Awake()
{
_text = GetComponent<Text>();
}
public void OnPointerEnter(PointerEventData eventData)
{
_text.color = HoverColor;
}
public void OnPointerExit(PointerEventData eventData)
{
_text.color = NormalColor;
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 0a2169250a70845ffa2a9d25e9cd84cd
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/Utilities/TextButtonTransition.cs
uploadId: 817708

View File

@@ -0,0 +1,64 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TextToggleIsOnTransition.cs" company="Exit Games GmbH">
// </copyright>
// <summary>
// Use this on Button texts to have some color transition on the text as well without corrupting button's behaviour.
// </summary>
// <author>developer@exitgames.com</author>
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Photon.Chat.DemoChat.Utilities
{
/// <summary>
/// Use this on toggles texts to have some color transition on the text depending on the isOnState.
/// </summary>
[RequireComponent(typeof(Text))]
public class TextToggleIsOnTransition : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public Toggle toggle;
Text _text;
public Color NormalOnColor = Color.white;
public Color NormalOffColor = Color.black;
public Color HoverOnColor = Color.black;
public Color HoverOffColor = Color.black;
bool isHover;
public void OnEnable()
{
_text = GetComponent<Text>();
toggle.onValueChanged.AddListener(OnValueChanged);
}
public void OnDisable()
{
toggle.onValueChanged.RemoveListener(OnValueChanged);
}
public void OnValueChanged(bool isOn)
{
_text.color = isOn ? (isHover ? HoverOnColor : HoverOffColor) : (isHover ? NormalOnColor : NormalOffColor);
}
public void OnPointerEnter(PointerEventData eventData)
{
isHover = true;
_text.color = toggle.isOn ? HoverOnColor : HoverOffColor;
}
public void OnPointerExit(PointerEventData eventData)
{
isHover = false;
_text.color = toggle.isOn ? NormalOnColor : NormalOffColor;
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 5f64fb930d3f24c5ebc31aa95dba1c0b
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Code/Utilities/TextToggleIsOnTransition.cs
uploadId: 817708

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: bb03069818b452447a87b341c634c9ef

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: d853fa7d5f479434e8c272b2dfa71983
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
customCharacters:
fontRenderingMode: 0
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/Jura-Medium.ttf
uploadId: 817708

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: c50aca096225b41dfb0a1010884a72b9
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -0,0 +1,201 @@
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.

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3132b20ffdf43924da403021f95590ae
TextScriptImporter:
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/OpenSans/Apache License.txt
uploadId: 817708

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: c2d622bc4892ff441aee9289a6006707
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
customCharacters:
fontRenderingMode: 0
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/OpenSans/OpenSans-Bold.ttf
uploadId: 817708

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: a6aa145e5b99127428ecde3a5acbf68b
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
customCharacters:
fontRenderingMode: 0
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/OpenSans/OpenSans-Light.ttf
uploadId: 817708

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 439afd3f954cea94c8e910eef29cd81f
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
customCharacters:
fontRenderingMode: 0
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/OpenSans/OpenSans-Regular.ttf
uploadId: 817708

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 23ccffaf915b101419d098a118141d9a
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
customCharacters:
fontRenderingMode: 0
userData:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/OpenSans/OpenSans-Semibold.ttf
uploadId: 817708

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,95 @@
fileFormatVersion: 2
guid: 32d648ef894184c88902b4e50fcba2c1
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 1024
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 16
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 2, y: 2, z: 2, w: 2}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: e03d953f5d936b947bd9172007ab8835
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/OutlinedSquaredBox.png
uploadId: 817708

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 KiB

View File

@@ -0,0 +1,147 @@
fileFormatVersion: 2
guid: 3f07e121dff858b46be11c81416b617b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/chat-background.png
uploadId: 817708

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,147 @@
fileFormatVersion: 2
guid: 354a413d966364de49f604d541f56c31
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonChat/Demos/Demo Chat/Resources/chat-logo.png
uploadId: 817708

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ee1734b1a7bac244bb5f15ecd778b5f2
folderAsset: yes
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 887ac71c799552346b6cf7654fb699cb
folderAsset: yes
DefaultImporter:
userData:

Binary file not shown.

View File

@@ -0,0 +1,48 @@
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:
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:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll
uploadId: 817708

Binary file not shown.

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 3439a9e4030efca45b6cc06240106c02
timeCreated: 1460035811
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 119922
packageName: PUN 2 - FREE
packageVersion: 2.52
assetPath: Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri
uploadId: 817708

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More