Facebook sdk接入

This commit is contained in:
Caiyanpeng committed 2021-12-23 15:36:11 +08:00
1 parent 4260cf05d3
commit 6423007638
123 files changed
+6764 -39

No files matched your search

@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: AccessTokenMenu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4cc408e158eec46b28b93a44fc8819ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 67cb5b2387b8e4ec9b2fa69ad9510e9b
timeCreated: 1447720184
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+212
View File
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: AppEvents
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e3c0dd81ff77c4c30834810815c69f6d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 68ab940fa15e34433bff18301686b080
timeCreated: 1434663633
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+212
View File
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: AppLinks
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f9f0b7257fa054227be6e26bf1f6b339, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4ac12dfde6570493291366d0ab3eb20d
timeCreated: 1434663633
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: AppRequests
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3b4c675f81a254b87adc8ad01006c580, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c2250c9c5cf00425384401321f8dffb4
timeCreated: 1434135388
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: DialogShare
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e93c4155902d3496399630ee494eab6b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 190c345841ecc464e9a122f04369757e
timeCreated: 1434132966
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: GraphRequest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 23c3cb06c2209474e9a8441e2712d5d2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 444ae7ddf432b457a97bfe42021075e3
timeCreated: 1434488369
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+212
View File
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &17281797
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 17281802}
- 20: {fileID: 17281801}
- 92: {fileID: 17281800}
- 124: {fileID: 17281799}
- 81: {fileID: 17281798}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &17281798
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!124 &17281799
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!92 &17281800
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
--- !u!20 &17281801
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &17281802
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 17281797}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1482271768
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1482271770}
- 114: {fileID: 1482271769}
m_Layer: 0
m_Name: LogView
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1482271769
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 910cbe16250cb4363b70464c39fc701a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1482271770
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482271768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c07ff0bf6bea74c2eb681ac0cae44265
timeCreated: 1434143106
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+212
View File
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientEquatorColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientGroundColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 1
m_BakeResolution: 50
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 0
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666657
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &787078726
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 787078731}
- 20: {fileID: 787078730}
- 92: {fileID: 787078729}
- 124: {fileID: 787078728}
- 81: {fileID: 787078727}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &787078727
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
--- !u!124 &787078728
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
--- !u!92 &787078729
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
--- !u!20 &787078730
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &787078731
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1988862590
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1988862591}
- 114: {fileID: 1988862593}
m_Layer: 0
m_Name: MainMenu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1988862591
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1988862590}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &1988862593
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1988862590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 922e3ad8d88a146b3b392cd8c84edd6a, type: 3}
m_Name:
m_EditorClassIdentifier:
@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 7c38a8c9adc9d5c4b869612e4033ead8
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+212
View File
@@ -0,0 +1,212 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientEquatorColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientGroundColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 1
m_BakeResolution: 50
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 0
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666657
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &787078726
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 787078731}
- 20: {fileID: 787078730}
- 92: {fileID: 787078729}
- 124: {fileID: 787078728}
- 81: {fileID: 787078727}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &787078727
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
--- !u!124 &787078728
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
--- !u!92 &787078729
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
--- !u!20 &787078730
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &787078731
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 787078726}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1988862590
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1988862591}
- 114: {fileID: 1988862593}
m_Layer: 0
m_Name: Pay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1988862591
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1988862590}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &1988862593
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1988862590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7f08c9721703046ec883e57562184726, type: 3}
m_Name:
m_EditorClassIdentifier:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ee189cdb21ea4bdb9d7022a0780c44c
timeCreated: 1441927990
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 69127c4c57aff0a4ebdbc24c5fd306ea
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,263 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement;
internal class ConsoleBase : MonoBehaviour
{
private const int DpiScalingFactor = 160;
private static Stack<string> menuStack = new Stack<string>();
private string status = "Ready";
private string lastResponse = string.Empty;
private Vector2 scrollPosition = Vector2.zero;
// DPI scaling
private float? scaleFactor;
private GUIStyle textStyle;
private GUIStyle buttonStyle;
private GUIStyle textInputStyle;
private GUIStyle labelStyle;
protected static int ButtonHeight
{
get
{
return Constants.IsMobile ? 60 : 24;
}
}
protected static int MainWindowWidth
{
get
{
return Constants.IsMobile ? Screen.width - 30 : 700;
}
}
protected static int MainWindowFullWidth
{
get
{
return Constants.IsMobile ? Screen.width : 760;
}
}
protected static int MarginFix
{
get
{
return Constants.IsMobile ? 0 : 48;
}
}
protected static Stack<string> MenuStack
{
get
{
return ConsoleBase.menuStack;
}
set
{
ConsoleBase.menuStack = value;
}
}
protected string Status
{
get
{
return this.status;
}
set
{
this.status = value;
}
}
protected Texture2D LastResponseTexture { get; set; }
protected string LastResponse
{
get
{
return this.lastResponse;
}
set
{
this.lastResponse = value;
}
}
protected Vector2 ScrollPosition
{
get
{
return this.scrollPosition;
}
set
{
this.scrollPosition = value;
}
}
// Note we assume that these styles will be accessed from OnGUI otherwise the
// unity APIs will fail.
protected float ScaleFactor
{
get
{
if (!this.scaleFactor.HasValue)
{
this.scaleFactor = Screen.dpi / ConsoleBase.DpiScalingFactor;
}
return this.scaleFactor.Value;
}
}
protected int FontSize
{
get
{
return (int)Math.Round(this.ScaleFactor * 16);
}
}
protected GUIStyle TextStyle
{
get
{
if (this.textStyle == null)
{
this.textStyle = new GUIStyle(GUI.skin.textArea);
this.textStyle.alignment = TextAnchor.UpperLeft;
this.textStyle.wordWrap = true;
this.textStyle.padding = new RectOffset(10, 10, 10, 10);
this.textStyle.stretchHeight = true;
this.textStyle.stretchWidth = false;
this.textStyle.fontSize = this.FontSize;
}
return this.textStyle;
}
}
protected GUIStyle ButtonStyle
{
get
{
if (this.buttonStyle == null)
{
this.buttonStyle = new GUIStyle(GUI.skin.button);
this.buttonStyle.fontSize = this.FontSize;
}
return this.buttonStyle;
}
}
protected GUIStyle TextInputStyle
{
get
{
if (this.textInputStyle == null)
{
this.textInputStyle = new GUIStyle(GUI.skin.textField);
this.textInputStyle.fontSize = this.FontSize;
}
return this.textInputStyle;
}
}
protected GUIStyle LabelStyle
{
get
{
if (this.labelStyle == null)
{
this.labelStyle = new GUIStyle(GUI.skin.label);
this.labelStyle.fontSize = this.FontSize;
}
return this.labelStyle;
}
}
protected virtual void Awake()
{
// Limit the framerate to 60 to keep device from burning through cpu
Application.targetFrameRate = 60;
}
protected bool Button(string label)
{
return GUILayout.Button(
label,
this.ButtonStyle,
GUILayout.MinHeight(ConsoleBase.ButtonHeight * this.ScaleFactor),
GUILayout.MaxWidth(ConsoleBase.MainWindowWidth));
}
protected void LabelAndTextField(string label, ref string text)
{
GUILayout.BeginHorizontal();
GUILayout.Label(label, this.LabelStyle, GUILayout.MaxWidth(200 * this.ScaleFactor));
text = GUILayout.TextField(
text,
this.TextInputStyle,
GUILayout.MaxWidth(ConsoleBase.MainWindowWidth - 150));
GUILayout.EndHorizontal();
}
protected bool IsHorizontalLayout()
{
#if UNITY_IOS || UNITY_ANDROID
return Screen.orientation == ScreenOrientation.Landscape;
#else
return true;
#endif
}
protected void SwitchMenu(Type menuClass)
{
ConsoleBase.menuStack.Push(this.GetType().Name);
SceneManager.LoadScene(menuClass.Name);
}
protected void GoBack()
{
if (ConsoleBase.menuStack.Any())
{
SceneManager.LoadScene(ConsoleBase.menuStack.Pop());
}
}
}
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e8659f5605d094c19a8b7ef9471c3603
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
internal class LogView : ConsoleBase
{
private static string datePatt = @"M/d/yyyy hh:mm:ss tt";
private static IList<string> events = new List<string>();
public static void AddLog(string log)
{
events.Insert(0, string.Format("{0}\n{1}\n", DateTime.Now.ToString(datePatt), log));
}
protected void OnGUI()
{
GUILayout.BeginVertical();
//GUILayout.Space(Screen.safeArea.yMin + 10);
if (this.Button("Back"))
{
this.GoBack();
}
#if UNITY_IOS || UNITY_ANDROID || UNITY_WP8
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved)
{
Vector2 scrollPosition = this.ScrollPosition;
scrollPosition.y += Input.GetTouch(0).deltaPosition.y;
this.ScrollPosition = scrollPosition;
}
#endif
this.ScrollPosition = GUILayout.BeginScrollView(
this.ScrollPosition,
GUILayout.MinWidth(ConsoleBase.MainWindowFullWidth));
GUILayout.TextArea(
string.Join("\n", events.ToArray()),
this.TextStyle,
GUILayout.ExpandHeight(true),
GUILayout.MaxWidth(ConsoleBase.MainWindowWidth));
GUILayout.EndScrollView();
GUILayout.EndVertical();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 910cbe16250cb4363b70464c39fc701a
timeCreated: 1434143113
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,232 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System;
using System.Linq;
using UnityEngine;
internal abstract class MenuBase : ConsoleBase
{
private static ShareDialogMode shareDialogMode;
protected abstract void GetGui();
protected virtual bool ShowDialogModeSelector()
{
return false;
}
protected virtual bool ShowBackButton()
{
return true;
}
protected void HandleResult(IResult result)
{
if (result == null)
{
this.LastResponse = "Null Response\n";
LogView.AddLog(this.LastResponse);
return;
}
this.LastResponseTexture = null;
// Some platforms return the empty string instead of null.
if (!string.IsNullOrEmpty(result.Error))
{
this.Status = "Error - Check log for details";
this.LastResponse = "Error Response:\n" + result.Error;
}
else if (result.Cancelled)
{
this.Status = "Cancelled - Check log for details";
this.LastResponse = "Cancelled Response:\n" + result.RawResult;
}
else if (!string.IsNullOrEmpty(result.RawResult))
{
this.Status = "Success - Check log for details";
this.LastResponse = "Success Response:\n" + result.RawResult;
}
else
{
this.LastResponse = "Empty Response\n";
}
LogView.AddLog(result.ToString());
}
protected void HandleLimitedLoginResult(IResult result)
{
if (result == null)
{
this.LastResponse = "Null Response\n";
LogView.AddLog(this.LastResponse);
return;
}
this.LastResponseTexture = null;
// Some platforms return the empty string instead of null.
if (!string.IsNullOrEmpty(result.Error))
{
this.Status = "Error - Check log for details";
this.LastResponse = "Error Response:\n" + result.Error;
}
else if (result.Cancelled)
{
this.Status = "Cancelled - Check log for details";
this.LastResponse = "Cancelled Response:\n" + result.RawResult;
}
else if (!string.IsNullOrEmpty(result.RawResult))
{
this.Status = "Success - Check log for details";
this.LastResponse = "Success Response:\n" + result.RawResult;
}
else
{
this.LastResponse = "Empty Response\n";
}
String resultSummary = "Limited login results\n\n";
var profile = FB.Mobile.CurrentProfile();
resultSummary += "name: " + profile.Name + "\n";
resultSummary += "id: " + profile.UserID + "\n";
resultSummary += "email: " + profile.Email + "\n";
resultSummary += "pic URL: " + profile.ImageURL + "\n";
resultSummary += "birthday: " + profile.Birthday + "\n";
resultSummary += "age range: " + profile.AgeRange + "\n";
resultSummary += "first name: " + profile.FirstName + "\n";
resultSummary += "middle name: " + profile.MiddleName + "\n";
resultSummary += "last name: " + profile.LastName + "\n";
resultSummary += "friends: " + String.Join(",", profile.FriendIDs) + "\n";
resultSummary += "hometown: " + profile.Hometown?.Name + "\n";
resultSummary += "location: " + profile.Location?.Name + "\n";
resultSummary += "gender: " + profile.Gender + "\n";
LogView.AddLog(resultSummary);
}
protected void OnGUI()
{
if (this.IsHorizontalLayout())
{
GUILayout.BeginHorizontal();
GUILayout.BeginVertical();
}
//GUILayout.Space(Screen.safeArea.yMin + 10);
GUILayout.Label(this.GetType().Name, this.LabelStyle);
this.AddStatus();
#if UNITY_IOS || UNITY_ANDROID || UNITY_WP8
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved)
{
Vector2 scrollPosition = this.ScrollPosition;
scrollPosition.y += Input.GetTouch(0).deltaPosition.y;
this.ScrollPosition = scrollPosition;
}
#endif
this.ScrollPosition = GUILayout.BeginScrollView(
this.ScrollPosition,
GUILayout.MinWidth(ConsoleBase.MainWindowFullWidth));
GUILayout.BeginHorizontal();
if (this.ShowBackButton())
{
this.AddBackButton();
}
this.AddLogButton();
if (this.ShowBackButton())
{
// Fix GUILayout margin issues
GUILayout.Label(GUIContent.none, GUILayout.MinWidth(ConsoleBase.MarginFix));
}
GUILayout.EndHorizontal();
if (this.ShowDialogModeSelector())
{
this.AddDialogModeButtons();
}
GUILayout.BeginVertical();
// Add the ui from decendants
this.GetGui();
GUILayout.Space(10);
GUILayout.EndVertical();
GUILayout.EndScrollView();
}
private void AddStatus()
{
GUILayout.Space(5);
GUILayout.Box("Status: " + this.Status, this.TextStyle, GUILayout.MinWidth(ConsoleBase.MainWindowWidth));
}
private void AddBackButton()
{
GUI.enabled = ConsoleBase.MenuStack.Any();
if (this.Button("Back"))
{
this.GoBack();
}
GUI.enabled = true;
}
private void AddLogButton()
{
if (this.Button("Log"))
{
this.SwitchMenu(typeof(LogView));
}
}
private void AddDialogModeButtons()
{
GUILayout.BeginHorizontal();
foreach (var value in Enum.GetValues(typeof(ShareDialogMode)))
{
this.AddDialogModeButton((ShareDialogMode)value);
}
GUILayout.EndHorizontal();
}
private void AddDialogModeButton(ShareDialogMode mode)
{
bool enabled = GUI.enabled;
GUI.enabled = enabled && (mode != shareDialogMode);
if (this.Button(mode.ToString()))
{
shareDialogMode = mode;
FB.Mobile.ShareDialogMode = mode;
}
GUI.enabled = enabled;
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8f28f9112a7d44d3c999fbd95333abbb
timeCreated: 1465553943
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f187a1fd548e2a049a6cfef1dcef73e6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
internal class AccessTokenMenu : MenuBase
{
protected override void GetGui()
{
if (this.Button("Refresh Access Token"))
{
FB.Mobile.RefreshCurrentAccessToken(this.HandleResult);
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 4cc408e158eec46b28b93a44fc8819ff
timeCreated: 1447720427
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,45 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System.Collections.Generic;
internal class AppEvents : MenuBase
{
protected override void GetGui()
{
if (this.Button("Log FB App Event"))
{
this.Status = "Logged FB.AppEvent";
FB.LogAppEvent(
AppEventName.UnlockedAchievement,
null,
new Dictionary<string, object>()
{
{ AppEventParameterName.Description, "Clicked 'Log AppEvent' button" }
});
LogView.AddLog(
"You may see results showing up at https://www.facebook.com/analytics/"
+ FB.AppId);
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e3c0dd81ff77c4c30834810815c69f6d
timeCreated: 1435018470
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,38 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
internal class AppLinks : MenuBase
{
protected override void GetGui()
{
if (this.Button("Get App Link"))
{
FB.GetAppLink(this.HandleResult);
}
if (Constants.IsMobile && this.Button("Fetch Deferred App Link"))
{
FB.Mobile.FetchDeferredAppLinkData(this.HandleResult);
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f9f0b7257fa054227be6e26bf1f6b339
timeCreated: 1435164891
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,143 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
internal class AppRequests : MenuBase
{
private string requestMessage = string.Empty;
private string requestTo = string.Empty;
private string requestFilter = string.Empty;
private string requestExcludes = string.Empty;
private string requestMax = string.Empty;
private string requestData = string.Empty;
private string requestTitle = string.Empty;
private string requestObjectID = string.Empty;
private int selectedAction = 0;
private string[] actionTypeStrings =
{
"NONE",
OGActionType.SEND.ToString(),
OGActionType.ASKFOR.ToString(),
OGActionType.TURN.ToString()
};
protected override void GetGui()
{
if (this.Button("Select - Filter None"))
{
FB.AppRequest("Test Message", callback: this.HandleResult);
}
if (this.Button("Select - Filter app_users"))
{
List<object> filter = new List<object>() { "app_users" };
// workaround for mono failing with named parameters
FB.AppRequest("Test Message", null, filter, null, 0, string.Empty, string.Empty, this.HandleResult);
}
if (this.Button("Select - Filter app_non_users"))
{
List<object> filter = new List<object>() { "app_non_users" };
FB.AppRequest("Test Message", null, filter, null, 0, string.Empty, string.Empty, this.HandleResult);
}
// Custom options
this.LabelAndTextField("Message: ", ref this.requestMessage);
this.LabelAndTextField("To (optional): ", ref this.requestTo);
this.LabelAndTextField("Filter (optional): ", ref this.requestFilter);
this.LabelAndTextField("Exclude Ids (optional): ", ref this.requestExcludes);
this.LabelAndTextField("Filters: ", ref this.requestExcludes);
this.LabelAndTextField("Max Recipients (optional): ", ref this.requestMax);
this.LabelAndTextField("Data (optional): ", ref this.requestData);
this.LabelAndTextField("Title (optional): ", ref this.requestTitle);
GUILayout.BeginHorizontal();
GUILayout.Label(
"Request Action (optional): ",
this.LabelStyle,
GUILayout.MaxWidth(200 * this.ScaleFactor));
this.selectedAction = GUILayout.Toolbar(
this.selectedAction,
this.actionTypeStrings,
this.ButtonStyle,
GUILayout.MinHeight(ConsoleBase.ButtonHeight * this.ScaleFactor),
GUILayout.MaxWidth(ConsoleBase.MainWindowWidth - 150));
GUILayout.EndHorizontal();
this.LabelAndTextField("Request Object ID (optional): ", ref this.requestObjectID);
if (this.Button("Custom App Request"))
{
OGActionType? action = this.GetSelectedOGActionType();
if (action != null)
{
FB.AppRequest(
this.requestMessage,
action.Value,
this.requestObjectID,
string.IsNullOrEmpty(this.requestTo) ? null : this.requestTo.Split(','),
this.requestData,
this.requestTitle,
this.HandleResult);
}
else
{
FB.AppRequest(
this.requestMessage,
string.IsNullOrEmpty(this.requestTo) ? null : this.requestTo.Split(','),
string.IsNullOrEmpty(this.requestFilter) ? null : this.requestFilter.Split(',').OfType<object>().ToList(),
string.IsNullOrEmpty(this.requestExcludes) ? null : this.requestExcludes.Split(','),
string.IsNullOrEmpty(this.requestMax) ? 0 : int.Parse(this.requestMax),
this.requestData,
this.requestTitle,
this.HandleResult);
}
}
}
private OGActionType? GetSelectedOGActionType()
{
string actionString = this.actionTypeStrings[this.selectedAction];
if (actionString == OGActionType.SEND.ToString())
{
return OGActionType.SEND;
}
else if (actionString == OGActionType.ASKFOR.ToString())
{
return OGActionType.ASKFOR;
}
else if (actionString == OGActionType.TURN.ToString())
{
return OGActionType.TURN;
}
else
{
return null;
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 3b4c675f81a254b87adc8ad01006c580
timeCreated: 1435018470
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,125 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
internal class DialogShare : MenuBase
{
// Custom Share Link
private string shareLink = "https://developers.facebook.com/";
private string shareTitle = "Link Title";
private string shareDescription = "Link Description";
private string shareImage = "http://i.imgur.com/j4M7vCO.jpg";
// Custom Feed Share
private string feedTo = string.Empty;
private string feedLink = "https://developers.facebook.com/";
private string feedTitle = "Test Title";
private string feedCaption = "Test Caption";
private string feedDescription = "Test Description";
private string feedImage = "http://i.imgur.com/zkYlB.jpg";
private string feedMediaSource = string.Empty;
protected override bool ShowDialogModeSelector()
{
#if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
return true;
#else
return false;
#endif
}
protected override void GetGui()
{
bool enabled = GUI.enabled;
if (this.Button("Share - Link"))
{
FB.ShareLink(new Uri("https://developers.facebook.com/"), callback: this.HandleResult);
}
// Note: Web dialog doesn't support photo urls.
if (this.Button("Share - Link Photo"))
{
FB.ShareLink(
new Uri("https://developers.facebook.com/"),
"Link Share",
"Look I'm sharing a link",
new Uri("http://i.imgur.com/j4M7vCO.jpg"),
callback: this.HandleResult);
}
this.LabelAndTextField("Link", ref this.shareLink);
this.LabelAndTextField("Title", ref this.shareTitle);
this.LabelAndTextField("Description", ref this.shareDescription);
this.LabelAndTextField("Image", ref this.shareImage);
if (this.Button("Share - Custom"))
{
FB.ShareLink(
new Uri(this.shareLink),
this.shareTitle,
this.shareDescription,
new Uri(this.shareImage),
this.HandleResult);
}
GUI.enabled = enabled && (!Constants.IsEditor || (Constants.IsEditor && FB.IsLoggedIn));
if (this.Button("Feed Share - No To"))
{
FB.FeedShare(
string.Empty,
new Uri("https://developers.facebook.com/"),
"Test Title",
"Test caption",
"Test Description",
new Uri("http://i.imgur.com/zkYlB.jpg"),
string.Empty,
this.HandleResult);
}
this.LabelAndTextField("To", ref this.feedTo);
this.LabelAndTextField("Link", ref this.feedLink);
this.LabelAndTextField("Title", ref this.feedTitle);
this.LabelAndTextField("Caption", ref this.feedCaption);
this.LabelAndTextField("Description", ref this.feedDescription);
this.LabelAndTextField("Image", ref this.feedImage);
this.LabelAndTextField("Media Source", ref this.feedMediaSource);
if (this.Button("Feed Share - Custom"))
{
FB.FeedShare(
this.feedTo,
string.IsNullOrEmpty(this.feedLink) ? null : new Uri(this.feedLink),
this.feedTitle,
this.feedCaption,
this.feedDescription,
string.IsNullOrEmpty(this.feedImage) ? null : new Uri(this.feedImage),
this.feedMediaSource,
this.HandleResult);
}
GUI.enabled = enabled;
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e93c4155902d3496399630ee494eab6b
timeCreated: 1435018470
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,93 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System.Collections;
using UnityEngine;
internal class GraphRequest : MenuBase
{
private string apiQuery = string.Empty;
private Texture2D profilePic;
protected override void GetGui()
{
bool enabled = GUI.enabled;
GUI.enabled = enabled && FB.IsLoggedIn;
if (this.Button("Basic Request - Me"))
{
FB.API("/me", HttpMethod.GET, this.HandleResult);
}
if (this.Button("Retrieve Profile Photo"))
{
FB.API("/me/picture", HttpMethod.GET, this.ProfilePhotoCallback);
}
if (this.Button("Take and Upload screenshot"))
{
this.StartCoroutine(this.TakeScreenshot());
}
this.LabelAndTextField("Request", ref this.apiQuery);
if (this.Button("Custom Request"))
{
FB.API(this.apiQuery, HttpMethod.GET, this.HandleResult);
}
if (this.profilePic != null)
{
GUILayout.Box(this.profilePic);
}
GUI.enabled = enabled;
}
private void ProfilePhotoCallback(IGraphResult result)
{
if (string.IsNullOrEmpty(result.Error) && result.Texture != null)
{
this.profilePic = result.Texture;
}
this.HandleResult(result);
}
private IEnumerator TakeScreenshot()
{
yield return new WaitForEndOfFrame();
var width = Screen.width;
var height = Screen.height;
var tex = new Texture2D(width, height, TextureFormat.RGB24, false);
// Read screen contents into the texture
tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
tex.Apply();
byte[] screenshot = tex.EncodeToPNG();
var wwwForm = new WWWForm();
wwwForm.AddBinaryData("image", screenshot, "InteractiveConsole.png");
wwwForm.AddField("message", "herp derp. I did a thing! Did I do this right?");
FB.API("me/photos", HttpMethod.POST, this.HandleResult, wwwForm);
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 23c3cb06c2209474e9a8441e2712d5d2
timeCreated: 1435018470
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,274 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
internal sealed class MainMenu : MenuBase
{
enum Scope {
PublicProfile = 0b_0000_0001,
UserFriends = 0b_0000_0010,
UserBirthday = 0b_0000_0100,
UserAgeRange = 0b_0000_1000,
PublishActions = 0b_0001_0000,
UserLocation = 0b_0010_0000,
UserHometown = 0b_0100_0000,
UserGender = 0b_1000_0000,
};
protected override bool ShowBackButton()
{
return false;
}
protected override void GetGui()
{
GUILayout.BeginVertical();
bool enabled = GUI.enabled;
if (this.Button("FB.Init"))
{
FB.Init(this.OnInitComplete, this.OnHideUnity);
this.Status = "FB.Init() called with " + FB.AppId;
}
GUILayout.BeginHorizontal();
GUI.enabled = enabled && FB.IsInitialized;
if (this.Button("Classic login"))
{
this.CallFBLogin(LoginTracking.ENABLED, Scope.PublicProfile);
this.Status = "Classic login called";
}
if (this.Button("Get publish_actions"))
{
this.CallFBLoginForPublish();
this.Status = "Login (for publish_actions) called";
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (this.Button("Limited login"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile);
this.Status = "Limited login called";
}
if (this.Button("Limited login +friends"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile | Scope.UserFriends);
this.Status = "Limited login +friends called";
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (this.Button("Limited Login+bday"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile | Scope.UserBirthday);
this.Status = "Limited login +bday called";
}
if (this.Button("Limited Login+agerange"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile | Scope.UserAgeRange);
this.Status = "Limited login +agerange called";
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (this.Button("Limited Login + location"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile | Scope.UserLocation);
}
if (this.Button("Limited Login + Hometown"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile | Scope.UserHometown);
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (this.Button("Limited Login + Gender"))
{
this.CallFBLogin(LoginTracking.LIMITED, Scope.PublicProfile | Scope.UserGender);
}
GUI.enabled = FB.IsLoggedIn;
// Fix GUILayout margin issues
GUILayout.Label(GUIContent.none, GUILayout.MinWidth(ConsoleBase.MarginFix));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
// Fix GUILayout margin issues
GUILayout.Label(GUIContent.none, GUILayout.MinWidth(ConsoleBase.MarginFix));
GUILayout.EndHorizontal();
#if !UNITY_WEBGL
if (this.Button("Logout"))
{
CallFBLogout();
this.Status = "Logout called";
}
#endif
GUI.enabled = enabled && FB.IsInitialized;
if (this.Button("Share Dialog"))
{
this.SwitchMenu(typeof(DialogShare));
}
if (this.Button("App Requests"))
{
this.SwitchMenu(typeof(AppRequests));
}
if (this.Button("Graph Request"))
{
this.SwitchMenu(typeof(GraphRequest));
}
if (Constants.IsWeb && this.Button("Pay"))
{
this.SwitchMenu(typeof(Pay));
}
if (this.Button("App Events"))
{
this.SwitchMenu(typeof(AppEvents));
}
if (this.Button("App Links"))
{
this.SwitchMenu(typeof(AppLinks));
}
if (Constants.IsMobile && this.Button("Access Token"))
{
this.SwitchMenu(typeof(AccessTokenMenu));
}
GUILayout.EndVertical();
GUI.enabled = enabled;
}
private void CallFBLogin(LoginTracking mode, Scope scopemask)
{
List<string> scopes = new List<string>();
if((scopemask & Scope.PublicProfile) > 0) {
scopes.Add("public_profile");
}
if((scopemask & Scope.UserFriends) > 0)
{
scopes.Add("user_friends");
}
if((scopemask & Scope.UserBirthday) > 0)
{
scopes.Add("user_birthday");
}
if((scopemask & Scope.UserAgeRange) > 0)
{
scopes.Add("user_age_range");
}
if ((scopemask & Scope.UserLocation) > 0)
{
scopes.Add("user_location");
}
if ((scopemask & Scope.UserHometown) > 0)
{
scopes.Add("user_hometown");
}
if ((scopemask & Scope.UserGender) > 0)
{
scopes.Add("user_gender");
}
if (mode == LoginTracking.ENABLED)
{
FB.Mobile.LoginWithTrackingPreference(LoginTracking.ENABLED, scopes, "classic_nonce123", this.HandleResult);
}
else // mode == loginTracking.LIMITED
{
FB.Mobile.LoginWithTrackingPreference(LoginTracking.LIMITED, scopes, "limited_nonce123", this.HandleLimitedLoginResult);
}
}
private void CallFBLoginForPublish()
{
// It is generally good behavior to split asking for read and publish
// permissions rather than ask for them all at once.
//
// In your own game, consider postponing this call until the moment
// you actually need it.
FB.LogInWithPublishPermissions(new List<string>() { "publish_actions" }, this.HandleResult);
}
private void CallFBLogout()
{
FB.LogOut();
}
private void OnInitComplete()
{
this.Status = "Success - Check log for details";
this.LastResponse = "Success Response: OnInitComplete Called\n";
string logMessage = string.Format(
"OnInitCompleteCalled IsLoggedIn='{0}' IsInitialized='{1}'",
FB.IsLoggedIn,
FB.IsInitialized);
LogView.AddLog(logMessage);
if (AccessToken.CurrentAccessToken != null)
{
LogView.AddLog(AccessToken.CurrentAccessToken.ToString());
}
}
private void OnHideUnity(bool isGameShown)
{
this.Status = "Success - Check log for details";
this.LastResponse = string.Format("Success Response: OnHideUnity Called {0}\n", isGameShown);
LogView.AddLog("Is game shown: " + isGameShown);
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 922e3ad8d88a146b3b392cd8c84edd6a
timeCreated: 1465553943
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,45 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
namespace Facebook.Unity.Example
{
using UnityEngine;
internal class Pay : MenuBase
{
private string payProduct = string.Empty;
protected override void GetGui()
{
this.LabelAndTextField("Product: ", ref this.payProduct);
if (this.Button("Call Pay"))
{
this.CallFBPay();
}
GUILayout.Space(10);
}
private void CallFBPay()
{
FB.Canvas.Pay(this.payProduct, callback: this.HandleResult);
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7f08c9721703046ec883e57562184726
timeCreated: 1435018470
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 186fe0001a4d8494b8517e800edadd80
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,55 @@
fileFormatVersion: 2
guid: 6f2bd1fb3a7ec4616b4311f171db577d
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant: