diff --git a/Assets/ExternalDependencyManager.meta b/Assets/ExternalDependencyManager.meta new file mode 100644 index 00000000..14666e83 --- /dev/null +++ b/Assets/ExternalDependencyManager.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e076935cb7a13e942a62cc26cfd53401 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor.meta b/Assets/ExternalDependencyManager/Editor.meta new file mode 100644 index 00000000..d3145d04 --- /dev/null +++ b/Assets/ExternalDependencyManager/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 00a558accb32e4d4c98b416ab890ed1b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll b/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll new file mode 100644 index 00000000..056207f9 Binary files /dev/null and b/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll differ diff --git a/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta b/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta new file mode 100644 index 00000000..61eb5f26 --- /dev/null +++ b/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: bb6999c8a5ce4ba99688ec579babe5b7 +labels: +- gvh +- gvh_targets-editor +- gvh_version-1.2.135.0 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK.meta b/Assets/FacebookSDK.meta new file mode 100644 index 00000000..667cd862 --- /dev/null +++ b/Assets/FacebookSDK.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e35dd3967d7d19e4daab702656eb05dc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples.meta b/Assets/FacebookSDK/Examples.meta new file mode 100644 index 00000000..0817d069 --- /dev/null +++ b/Assets/FacebookSDK/Examples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f015a0243569fdd499d97c148a25456c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/AccessTokenMenu.unity b/Assets/FacebookSDK/Examples/AccessTokenMenu.unity new file mode 100644 index 00000000..1497596e --- /dev/null +++ b/Assets/FacebookSDK/Examples/AccessTokenMenu.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/AccessTokenMenu.unity.meta b/Assets/FacebookSDK/Examples/AccessTokenMenu.unity.meta new file mode 100644 index 00000000..21090fd4 --- /dev/null +++ b/Assets/FacebookSDK/Examples/AccessTokenMenu.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 67cb5b2387b8e4ec9b2fa69ad9510e9b +timeCreated: 1447720184 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/AppEvents.unity b/Assets/FacebookSDK/Examples/AppEvents.unity new file mode 100644 index 00000000..1b11accf --- /dev/null +++ b/Assets/FacebookSDK/Examples/AppEvents.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/AppEvents.unity.meta b/Assets/FacebookSDK/Examples/AppEvents.unity.meta new file mode 100644 index 00000000..1f97042f --- /dev/null +++ b/Assets/FacebookSDK/Examples/AppEvents.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68ab940fa15e34433bff18301686b080 +timeCreated: 1434663633 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/AppLinks.unity b/Assets/FacebookSDK/Examples/AppLinks.unity new file mode 100644 index 00000000..909e8517 --- /dev/null +++ b/Assets/FacebookSDK/Examples/AppLinks.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/AppLinks.unity.meta b/Assets/FacebookSDK/Examples/AppLinks.unity.meta new file mode 100644 index 00000000..327030ab --- /dev/null +++ b/Assets/FacebookSDK/Examples/AppLinks.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ac12dfde6570493291366d0ab3eb20d +timeCreated: 1434663633 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/AppRequests.unity b/Assets/FacebookSDK/Examples/AppRequests.unity new file mode 100644 index 00000000..be864f04 --- /dev/null +++ b/Assets/FacebookSDK/Examples/AppRequests.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/AppRequests.unity.meta b/Assets/FacebookSDK/Examples/AppRequests.unity.meta new file mode 100644 index 00000000..e7f8fcf5 --- /dev/null +++ b/Assets/FacebookSDK/Examples/AppRequests.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2250c9c5cf00425384401321f8dffb4 +timeCreated: 1434135388 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/DialogShare.unity b/Assets/FacebookSDK/Examples/DialogShare.unity new file mode 100644 index 00000000..f7242035 --- /dev/null +++ b/Assets/FacebookSDK/Examples/DialogShare.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/DialogShare.unity.meta b/Assets/FacebookSDK/Examples/DialogShare.unity.meta new file mode 100644 index 00000000..1942f703 --- /dev/null +++ b/Assets/FacebookSDK/Examples/DialogShare.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 190c345841ecc464e9a122f04369757e +timeCreated: 1434132966 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/GraphRequest.unity b/Assets/FacebookSDK/Examples/GraphRequest.unity new file mode 100644 index 00000000..13a30c92 --- /dev/null +++ b/Assets/FacebookSDK/Examples/GraphRequest.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/GraphRequest.unity.meta b/Assets/FacebookSDK/Examples/GraphRequest.unity.meta new file mode 100644 index 00000000..c5546169 --- /dev/null +++ b/Assets/FacebookSDK/Examples/GraphRequest.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 444ae7ddf432b457a97bfe42021075e3 +timeCreated: 1434488369 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/LogView.unity b/Assets/FacebookSDK/Examples/LogView.unity new file mode 100644 index 00000000..713675ed --- /dev/null +++ b/Assets/FacebookSDK/Examples/LogView.unity @@ -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 diff --git a/Assets/FacebookSDK/Examples/LogView.unity.meta b/Assets/FacebookSDK/Examples/LogView.unity.meta new file mode 100644 index 00000000..ac61c4ce --- /dev/null +++ b/Assets/FacebookSDK/Examples/LogView.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c07ff0bf6bea74c2eb681ac0cae44265 +timeCreated: 1434143106 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/MainMenu.unity b/Assets/FacebookSDK/Examples/MainMenu.unity new file mode 100644 index 00000000..492be095 --- /dev/null +++ b/Assets/FacebookSDK/Examples/MainMenu.unity @@ -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: diff --git a/Assets/FacebookSDK/Examples/MainMenu.unity.meta b/Assets/FacebookSDK/Examples/MainMenu.unity.meta new file mode 100644 index 00000000..083e17b0 --- /dev/null +++ b/Assets/FacebookSDK/Examples/MainMenu.unity.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 7c38a8c9adc9d5c4b869612e4033ead8 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Pay.unity b/Assets/FacebookSDK/Examples/Pay.unity new file mode 100644 index 00000000..72481a14 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Pay.unity @@ -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: diff --git a/Assets/FacebookSDK/Examples/Pay.unity.meta b/Assets/FacebookSDK/Examples/Pay.unity.meta new file mode 100644 index 00000000..5a726037 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Pay.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ee189cdb21ea4bdb9d7022a0780c44c +timeCreated: 1441927990 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts.meta b/Assets/FacebookSDK/Examples/Scripts.meta new file mode 100644 index 00000000..07f5af25 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69127c4c57aff0a4ebdbc24c5fd306ea +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/ConsoleBase.cs b/Assets/FacebookSDK/Examples/Scripts/ConsoleBase.cs new file mode 100644 index 00000000..df077bd5 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/ConsoleBase.cs @@ -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 menuStack = new Stack(); + 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 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()); + } + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/ConsoleBase.cs.meta b/Assets/FacebookSDK/Examples/Scripts/ConsoleBase.cs.meta new file mode 100644 index 00000000..d499af3d --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/ConsoleBase.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e8659f5605d094c19a8b7ef9471c3603 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/LogView.cs b/Assets/FacebookSDK/Examples/Scripts/LogView.cs new file mode 100644 index 00000000..dfd13e14 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/LogView.cs @@ -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 events = new List(); + + 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(); + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/LogView.cs.meta b/Assets/FacebookSDK/Examples/Scripts/LogView.cs.meta new file mode 100644 index 00000000..4d9123fb --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/LogView.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 910cbe16250cb4363b70464c39fc701a +timeCreated: 1434143113 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/MenuBase.cs b/Assets/FacebookSDK/Examples/Scripts/MenuBase.cs new file mode 100644 index 00000000..f2c3a602 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/MenuBase.cs @@ -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; + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/MenuBase.cs.meta b/Assets/FacebookSDK/Examples/Scripts/MenuBase.cs.meta new file mode 100644 index 00000000..b0940325 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/MenuBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8f28f9112a7d44d3c999fbd95333abbb +timeCreated: 1465553943 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus.meta new file mode 100644 index 00000000..6aed4d47 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f187a1fd548e2a049a6cfef1dcef73e6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AccessTokenMenu.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AccessTokenMenu.cs new file mode 100644 index 00000000..f995a21a --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AccessTokenMenu.cs @@ -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); + } + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AccessTokenMenu.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AccessTokenMenu.cs.meta new file mode 100644 index 00000000..926a4794 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AccessTokenMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4cc408e158eec46b28b93a44fc8819ff +timeCreated: 1447720427 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppEvents.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppEvents.cs new file mode 100644 index 00000000..4e6cda97 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppEvents.cs @@ -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() + { + { AppEventParameterName.Description, "Clicked 'Log AppEvent' button" } + }); + LogView.AddLog( + "You may see results showing up at https://www.facebook.com/analytics/" + + FB.AppId); + } + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppEvents.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppEvents.cs.meta new file mode 100644 index 00000000..dc71cd42 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppEvents.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e3c0dd81ff77c4c30834810815c69f6d +timeCreated: 1435018470 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppLinks.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppLinks.cs new file mode 100644 index 00000000..935774f2 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppLinks.cs @@ -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); + } + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppLinks.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppLinks.cs.meta new file mode 100644 index 00000000..525aa840 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppLinks.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f9f0b7257fa054227be6e26bf1f6b339 +timeCreated: 1435164891 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppRequests.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppRequests.cs new file mode 100644 index 00000000..90b4b643 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppRequests.cs @@ -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 filter = new List() { "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 filter = new List() { "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().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; + } + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppRequests.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppRequests.cs.meta new file mode 100644 index 00000000..9cd81474 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/AppRequests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3b4c675f81a254b87adc8ad01006c580 +timeCreated: 1435018470 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs new file mode 100644 index 00000000..ec7069cd --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs @@ -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; + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs.meta new file mode 100644 index 00000000..bb1c7836 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e93c4155902d3496399630ee494eab6b +timeCreated: 1435018470 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/GraphRequest.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/GraphRequest.cs new file mode 100644 index 00000000..b84b8a13 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/GraphRequest.cs @@ -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); + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/GraphRequest.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/GraphRequest.cs.meta new file mode 100644 index 00000000..3cc8f3f8 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/GraphRequest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23c3cb06c2209474e9a8441e2712d5d2 +timeCreated: 1435018470 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs new file mode 100644 index 00000000..7766a904 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs @@ -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 scopes = new List(); + + 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() { "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); + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs.meta new file mode 100644 index 00000000..5915994e --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 922e3ad8d88a146b3b392cd8c84edd6a +timeCreated: 1465553943 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/Pay.cs b/Assets/FacebookSDK/Examples/Scripts/SubMenus/Pay.cs new file mode 100644 index 00000000..c620e6f5 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/Pay.cs @@ -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); + } + } +} diff --git a/Assets/FacebookSDK/Examples/Scripts/SubMenus/Pay.cs.meta b/Assets/FacebookSDK/Examples/Scripts/SubMenus/Pay.cs.meta new file mode 100644 index 00000000..de5ac0a9 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Scripts/SubMenus/Pay.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7f08c9721703046ec883e57562184726 +timeCreated: 1435018470 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Textures.meta b/Assets/FacebookSDK/Examples/Textures.meta new file mode 100644 index 00000000..2d2b44cf --- /dev/null +++ b/Assets/FacebookSDK/Examples/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 186fe0001a4d8494b8517e800edadd80 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Examples/Textures/White.psd b/Assets/FacebookSDK/Examples/Textures/White.psd new file mode 100644 index 00000000..4cc7f9c8 Binary files /dev/null and b/Assets/FacebookSDK/Examples/Textures/White.psd differ diff --git a/Assets/FacebookSDK/Examples/Textures/White.psd.meta b/Assets/FacebookSDK/Examples/Textures/White.psd.meta new file mode 100644 index 00000000..8ccc9bf9 --- /dev/null +++ b/Assets/FacebookSDK/Examples/Textures/White.psd.meta @@ -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: diff --git a/Assets/FacebookSDK/Plugins.meta b/Assets/FacebookSDK/Plugins.meta new file mode 100644 index 00000000..cf40c338 --- /dev/null +++ b/Assets/FacebookSDK/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9cce7a0a3f6331044aef446fb39f0b98 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Android.meta b/Assets/FacebookSDK/Plugins/Android.meta new file mode 100644 index 00000000..3bcac126 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f5f2fb4268a83643a462f3717ee7f97 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll b/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll new file mode 100644 index 00000000..a0d00e8c Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll differ diff --git a/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta b/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta new file mode 100644 index 00000000..4a342f5d --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta @@ -0,0 +1,154 @@ +fileFormatVersion: 2 +guid: fb286cd0f33ce4f5e81baf10dab8d865 +timeCreated: 1561663365 +licenseType: Pro +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + OS: AnyOS + data: + first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + data: + first: + tvOS: tvOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Android/libs.meta b/Assets/FacebookSDK/Plugins/Android/libs.meta new file mode 100644 index 00000000..aa8eb51e --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Android/libs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 304660bc365f9034db9aa6872a54f6b8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-11.0.0.aar b/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-11.0.0.aar new file mode 100644 index 00000000..60603b9d Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-11.0.0.aar differ diff --git a/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-11.0.0.aar.meta b/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-11.0.0.aar.meta new file mode 100644 index 00000000..338d4487 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-11.0.0.aar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: abcfdae5d23df40e9a7ec554ddc17a22 +timeCreated: 1623191241 +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + Android: Android + second: + enabled: 1 + settings: {} + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Canvas.meta b/Assets/FacebookSDK/Plugins/Canvas.meta new file mode 100644 index 00000000..29c26491 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Canvas.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c306adc6985aea64e8e8a093aba2e61c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Canvas/CanvasJSSDKBindings.jslib b/Assets/FacebookSDK/Plugins/Canvas/CanvasJSSDKBindings.jslib new file mode 100644 index 00000000..0439287a --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Canvas/CanvasJSSDKBindings.jslib @@ -0,0 +1,276 @@ +/** + * 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. + */ + +var FBUnityLib = { + $FBUnity: { + init: function(connectFacebookUrl, locale, debug, initParams, status) { + // make element for js sdk + if (!document.getElementById('fb-root')) { + var fbroot = document.createElement('div'); + fbroot.id = 'fb-root'; + var body = document.getElementsByTagName('body')[0]; + body.insertBefore(fbroot, body.children[0]); + } + + // load js sdk + var js, id = 'facebook-jssdk', ref = document.getElementsByTagName('script')[0]; + if (document.getElementById(id)) {return;} + js = document.createElement('script'); js.id = id; js.async = true; + js.src = connectFacebookUrl + '/' + locale + '/sdk' + (debug ? '/debug' : '') + '.js'; + ref.parentNode.insertBefore(js, ref); + // once jssdk is loaded, init + window.fbAsyncInit = function() { + initParams = JSON.parse(initParams); + initParams.hideFlashCallback = FBUnity.onHideUnity; + FB.init(initParams); + // send url to unity - needed for deep linking + FBUnity.sendMessage('OnUrlResponse', location.href); + if (status) { + FBUnity.onInitWithStatus(); + } else { + FBUnity.onInit(); + } + }; + }, + + initScreenPosition: function() { + if (!screenPosition) { + var body = document.getElementsByTagName('body')[0]; + var screenPosition = {omo : body.onmouseover || function(){}, iframeX: 0, iframeY: 0}; + body.onmouseover = function(e) { + // Distance from top of screen to top of client area + screenPosition.iframeX = e.screenX - e.clientX; + screenPosition.iframeY = e.screenY - e.clientY; + + screenPosition.omo(e); + } + } + }, + + sendMessage: function(method, param) { + SendMessage('FacebookJsBridge', method, param); + }, + + login: function(scope, callback_id) { + FB.login(FBUnity.loginCallback.bind(null, callback_id), scope ? {scope: scope, auth_type: 'rerequest', return_scopes: true} : {return_scopes: true}); + }, + + loginCallback: function(callback_id, response) { + response = {'callback_id': callback_id, 'response': response}; + FBUnity.sendMessage('OnLoginComplete', JSON.stringify(response)); + }, + + onInitWithStatus: function() { + var timeoutHandler = setTimeout(function() { requestFailed(); }, 3000); + + function requestFailed() { + FBUnity.onInit(); + } + + // try to get the login status right after init'ing + FB.getLoginStatus(function(response) { + clearTimeout(timeoutHandler); + FBUnity.onInit(response); + }); + }, + + onInit: function(response) { + var jsonResponse = ''; + if (response && response.authResponse) { + jsonResponse = JSON.stringify(response); + } + + FBUnity.sendMessage('OnInitComplete', jsonResponse); + FB.Event.subscribe('auth.authResponseChange', function(r){ FBUnity.onAuthResponseChange(r) }); + + FBUnity.logLoadingTime(response); + }, + + logLoadingTime: function(response) { + FB.Canvas.setDoneLoading( + function(result) { + // send implicitly event to log the time from the canvas pages load to facebook init being called. + FBUnity.logAppEvent('fb_canvas_time_till_init_complete', result.time_delta_ms / 1000, null); + } + ); + }, + + onAuthResponseChange: function(response) { + FBUnity.sendMessage('OnFacebookAuthResponseChange', response ? JSON.stringify(response) : ''); + }, + + apiCallback: function(query, response) { + response = {'query': query, 'response': response}; + FBUnity.sendMessage('OnFacebookAPIResponse', JSON.stringify(response)); + }, + + api: function(query) { + FB.api(query, FBUnity.apiCallback.bind(null, query)); + }, + + activateApp: function() { + FB.AppEvents.activateApp(); + }, + + uiCallback: function(uid, callbackMethodName, response) { + response = {'callback_id': uid, 'response': response}; + FBUnity.sendMessage(callbackMethodName, JSON.stringify(response)); + }, + + logout: function() { + FB.logout(); + }, + + logAppEvent: function(eventName, valueToSum, parameters) { + FB.AppEvents.logEvent( + eventName, + valueToSum, + JSON.parse(parameters) + ); + }, + + logPurchase: function(purchaseAmount, currency, parameters) { + FB.AppEvents.logPurchase( + purchaseAmount, + currency, + JSON.parse(parameters) + ); + }, + + ui: function(x, uid, callbackMethodName) { + x = JSON.parse(x); + FB.ui(x, FBUnity.uiCallback.bind(null, uid, callbackMethodName)); + }, + + + hideUnity: function(direction) { + direction = direction || 'hide'; + //TODO support this for webgl + var unityDiv = jQuery(u.getUnity()); + + if (direction == 'hide') { + FBUnity.sendMessage('OnFacebookFocus', 'hide'); + } else /*show*/ { + FBUnity.sendMessage('OnFacebookFocus', 'show'); + + if (FBUnity.showScreenshotBackground.savedBackground) { + /* + if(fbShowScreenshotBackground.savedBackground == 'sentinel') { + jQuery('body').css('background', null); + } else { + jQuery('body').css('background', fbShowScreenshotBackground.savedBackground); + } + */ + } + + hideUnity.savedCSS = FBUnity.showScreenshotBackground.savedBackground = null; + } + }, + + showScreenshotBackground: function(pngbytes) /*and hide unity*/ { + // window.screenxX and window.screenY = browser position + // window.screen.height and window.screen.width = screen size + // findPos, above, locates the iframe within the browser + /* + if (!fbShowScreenshotBackground.savedBackground) + fbShowScreenshotBackground.savedBackground = jQuery('body').css('background') || 'sentinel'; + + jQuery('body').css('background-image', 'url(data:image/png;base64,'+pngbytes+')'); + jQuery('body').css( + 'background-position', + -(screenPosition.iframeX)+'px '+ + -(screenPosition.iframeY)+'px' + ); + jQuery('body').css('background-size', '100%'); + jquery('body').css('background-repeat', 'no-repeat'); + // TODO: Zoom detection + */ + }, + + onHideUnity: function(info) { + if (info.state == 'opened') { + FBUnity.sendMessage('OnFacebookFocus', 'hide'); + } else { + FBUnity.sendMessage('OnFacebookFocus', 'show'); + } + } + }, + + init: function(connectFacebookUrl, locale, debug, initParams, status) { + var connectFacebookUrlString = Pointer_stringify(connectFacebookUrl); + var localeString = Pointer_stringify(locale); + var initParamsString = Pointer_stringify(initParams); + + FBUnity.init(connectFacebookUrlString, localeString, debug, initParamsString, status); + }, + + initScreenPosition: function() { + FBUnity.initScreenPosition(); + }, + + login: function(scope, callback_id) { + var scopeString = Pointer_stringify(scope); + var scopeArray = JSON.parse(scopeString); + + var callback_idString = Pointer_stringify(callback_id); + + FBUnity.login(scopeArray, callback_idString); + }, + + activateApp: function() { + FBUnity.activateApp(); + }, + + logout: function() { + FBUnity.logout(); + }, + + logAppEvent: function(eventName, valueToSum, parameters) { + var eventNameString = Pointer_stringify(eventName); + var parametersString = Pointer_stringify(parameters); + + FBUnity.logAppEvent(eventNameString, valueToSum, parametersString); + }, + + logAppEventWithoutValue: function(eventName, parameters) { + var eventNameString = Pointer_stringify(eventName); + var parametersString = Pointer_stringify(parameters); + + FBUnity.logAppEvent(eventNameString, null, parametersString); + }, + + logPurchase: function(purchaseAmount, currency, parameters) { + var currencyString = Pointer_stringify(currency); + var parametersString = Pointer_stringify(parameters); + + FBUnity.logPurchase(purchaseAmount, currencyString, parametersString); + }, + + ui: function(x, uid, callbackMethodName) { + var xString = Pointer_stringify(x); + var uidString = Pointer_stringify(uid); + var callbackMethodNameString = Pointer_stringify(callbackMethodName); + + FBUnity.ui(xString, uidString, callbackMethodNameString); + } +}; + +autoAddDeps(LibraryManager.library, '$FBUnity'); +mergeInto(LibraryManager.library, FBUnityLib); \ No newline at end of file diff --git a/Assets/FacebookSDK/Plugins/Canvas/CanvasJSSDKBindings.jslib.meta b/Assets/FacebookSDK/Plugins/Canvas/CanvasJSSDKBindings.jslib.meta new file mode 100644 index 00000000..8a3680bc --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Canvas/CanvasJSSDKBindings.jslib.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: 082cd93ddb11e4437b52ea3d121816d8 +timeCreated: 1561663365 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Facebook: WebGL + second: + enabled: 1 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Canvas/Facebook.Unity.Canvas.dll b/Assets/FacebookSDK/Plugins/Canvas/Facebook.Unity.Canvas.dll new file mode 100644 index 00000000..1b3e7474 Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Canvas/Facebook.Unity.Canvas.dll differ diff --git a/Assets/FacebookSDK/Plugins/Canvas/Facebook.Unity.Canvas.dll.meta b/Assets/FacebookSDK/Plugins/Canvas/Facebook.Unity.Canvas.dll.meta new file mode 100644 index 00000000..75ae639d --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Canvas/Facebook.Unity.Canvas.dll.meta @@ -0,0 +1,160 @@ +fileFormatVersion: 2 +guid: c57105322a98c474faf1ce607f20c3f8 +timeCreated: 1561663364 +licenseType: Pro +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + OS: AnyOS + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + data: + first: + tvOS: tvOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Editor.meta b/Assets/FacebookSDK/Plugins/Editor.meta new file mode 100644 index 00000000..96b75720 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd6f82586c983d14881ca1a5d869b5c7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml b/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml new file mode 100644 index 00000000..0d248b3f --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml.meta b/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml.meta new file mode 100644 index 00000000..9f7284f6 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1543e5f9bab73423c96b42cab90363ab +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.Editor.dll b/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.Editor.dll new file mode 100644 index 00000000..1749f888 Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.Editor.dll differ diff --git a/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.Editor.dll.meta b/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.Editor.dll.meta new file mode 100644 index 00000000..ad6b774e --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.Editor.dll.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 137a102f808364a0fb444bedefe2575d +timeCreated: 1561663361 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Facebook.Unity.dll b/Assets/FacebookSDK/Plugins/Facebook.Unity.dll new file mode 100644 index 00000000..86bc232b Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Facebook.Unity.dll differ diff --git a/Assets/FacebookSDK/Plugins/Facebook.Unity.dll.meta b/Assets/FacebookSDK/Plugins/Facebook.Unity.dll.meta new file mode 100644 index 00000000..7c35a828 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Facebook.Unity.dll.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 08462833fafe743b8bd59914b9f52696 +timeCreated: 1561663359 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Gameroom.meta b/Assets/FacebookSDK/Plugins/Gameroom.meta new file mode 100644 index 00000000..a10737ad --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Gameroom.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 56e97142b4054564b818ddb4a996bcbf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Gameroom/Facebook.Unity.Gameroom.dll b/Assets/FacebookSDK/Plugins/Gameroom/Facebook.Unity.Gameroom.dll new file mode 100644 index 00000000..734cb819 Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Gameroom/Facebook.Unity.Gameroom.dll differ diff --git a/Assets/FacebookSDK/Plugins/Gameroom/Facebook.Unity.Gameroom.dll.meta b/Assets/FacebookSDK/Plugins/Gameroom/Facebook.Unity.Gameroom.dll.meta new file mode 100644 index 00000000..376dac4c --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Gameroom/Facebook.Unity.Gameroom.dll.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 99f23b07cdda04baea08736723cf3aad +timeCreated: 1561663362 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Gameroom/FacebookNamedPipeClient.dll b/Assets/FacebookSDK/Plugins/Gameroom/FacebookNamedPipeClient.dll new file mode 100644 index 00000000..df64d7ff Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Gameroom/FacebookNamedPipeClient.dll differ diff --git a/Assets/FacebookSDK/Plugins/Gameroom/FacebookNamedPipeClient.dll.meta b/Assets/FacebookSDK/Plugins/Gameroom/FacebookNamedPipeClient.dll.meta new file mode 100644 index 00000000..2f2a41f6 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Gameroom/FacebookNamedPipeClient.dll.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: cfd587f32401443d0b223aa6246fe5bc +timeCreated: 1561663364 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Settings.meta b/Assets/FacebookSDK/Plugins/Settings.meta new file mode 100644 index 00000000..c4bdcd5c --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 89644ab96437bb3429d31f916a4c37c7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll b/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll new file mode 100644 index 00000000..70fb0426 Binary files /dev/null and b/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll differ diff --git a/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta b/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta new file mode 100644 index 00000000..fd7daf2a --- /dev/null +++ b/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: c49f2b3ca212b47fc9cd8ce655177c89 +timeCreated: 1561663363 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/iOS.meta b/Assets/FacebookSDK/Plugins/iOS.meta new file mode 100644 index 00000000..6ecb8221 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d215dd8cabdd0444795d89904078812a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll b/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll new file mode 100644 index 00000000..27aaae4a Binary files /dev/null and b/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll differ diff --git a/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta b/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta new file mode 100644 index 00000000..a6585292 --- /dev/null +++ b/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta @@ -0,0 +1,154 @@ +fileFormatVersion: 2 +guid: 516664901472b44fe83b720b195b5b60 +timeCreated: 1561663362 +licenseType: Pro +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + Exclude tvOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + OS: AnyOS + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + data: + first: + tvOS: tvOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK.meta b/Assets/FacebookSDK/SDK.meta new file mode 100644 index 00000000..42414134 --- /dev/null +++ b/Assets/FacebookSDK/SDK.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ee89b335532a5f488b376b06860b7de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor.meta b/Assets/FacebookSDK/SDK/Editor.meta new file mode 100644 index 00000000..1df58195 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e3fef18aa44be6f468bc58c1256eb010 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS.meta b/Assets/FacebookSDK/SDK/Editor/iOS.meta new file mode 100644 index 00000000..98444554 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 204ee537bef79284ca9b2f4b9aa6d3da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBSDK+Internal.h b/Assets/FacebookSDK/SDK/Editor/iOS/FBSDK+Internal.h new file mode 100644 index 00000000..a0927913 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBSDK+Internal.h @@ -0,0 +1,35 @@ +// 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. + +// An internal header for declaring interfaces for internal methods in the FacebookSDK +// These are INTERNAL APIs that can change without warning and should not be used directly. +#import + +@interface FBSDKSettings(UnityInternal) + ++ (NSString *)userAgentSuffix; ++ (void)setUserAgentSuffix:(NSString *)suffix; + +@end + +@interface FBSDKShareLinkContent (UnityInternal) + +// Deprecated parameters for Feed Dialog - for usage with Unity only. +@property (nonatomic, copy) NSDictionary *feedParameters; + +@end \ No newline at end of file diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBSDK+Internal.h.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBSDK+Internal.h.meta new file mode 100644 index 00000000..e859956f --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBSDK+Internal.h.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 66952bdb75cae4c348f3d0521da59bfd +timeCreated: 1435164989 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.h b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.h new file mode 100644 index 00000000..bc868d36 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.h @@ -0,0 +1,44 @@ +// 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. + +#import + +#import "AppDelegateListener.h" + +//if we are on a version of unity that has the version number defined use it, otherwise we have added it ourselves in the post build step +#if HAS_UNITY_VERSION_DEF +#include "UnityTrampolineConfigure.h" +#endif + +@interface FBUnityInterface : NSObject +{ + //If you make changes in here make the same changes in Assets/Facebook/Scripts/NativeDialogModes.cs + enum ShareDialogMode + { + AUTOMATIC = 0, + NATIVE = 1, + WEB = 2, + FEED = 3, + }; +} + +@property (assign, nonatomic) BOOL useFrictionlessRequests; +@property (nonatomic) ShareDialogMode shareDialogMode; + ++ (FBUnityInterface *)sharedInstance; +@end diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.h.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.h.meta new file mode 100644 index 00000000..89d4fb42 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.h.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 511e95bcdad89425999ccbb3e315246a +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm new file mode 100644 index 00000000..15ad25ad --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm @@ -0,0 +1,803 @@ +// 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. + +#include "FBUnityInterface.h" + +#import +#import +#import +#import +#import + +#include "FBUnitySDKDelegate.h" +#include "FBUnityUtility.h" +#include "FBSDK+Internal.h" + +@interface FBUnityInterface() + +@property (nonatomic, copy) NSString *openURLString; + +@end + +@implementation FBUnityInterface + +#pragma mark Object Initialization + ++ (FBUnityInterface *)sharedInstance +{ + static dispatch_once_t pred; + static FBUnityInterface *shared = nil; + + dispatch_once(&pred, ^{ + shared = [[FBUnityInterface alloc] init]; + shared.shareDialogMode = ShareDialogMode::AUTOMATIC; + }); + + return shared; +} + ++ (void)load +{ + UnityRegisterAppDelegateListener([FBUnityInterface sharedInstance]); +} + +#pragma mark - App (Delegate) Lifecycle + +// didBecomeActive: and onOpenURL: are called by Unity's AppController +// because we implement and registered via UnityRegisterAppDelegateListener(...) above. + +- (void)didFinishLaunching:(NSNotification *)notification +{ + [[FBSDKApplicationDelegate sharedInstance] application:[UIApplication sharedApplication] + didFinishLaunchingWithOptions:notification.userInfo]; +} + +- (void)didBecomeActive:(NSNotification *)notification +{ + +} + +- (void)onOpenURL:(NSNotification *)notification +{ + NSURL *url = notification.userInfo[@"url"]; + BOOL isHandledByFBSDK = [[FBSDKApplicationDelegate sharedInstance] application:[UIApplication sharedApplication] + openURL:url + sourceApplication:notification.userInfo[@"sourceApplication"] + annotation:notification.userInfo[@"annotation"]]; + if (!isHandledByFBSDK) { + [FBUnityInterface sharedInstance].openURLString = [url absoluteString]; + } +} + +#pragma mark - Implementation + +- (void)configureAppId:(const char *)appId + frictionlessRequests:(bool)frictionlessRequests + urlSuffix:(const char *)urlSuffix +{ + self.useFrictionlessRequests = frictionlessRequests; + + if(appId) { + [FBSDKSettings setAppID:[FBUnityUtility stringFromCString:appId]]; + } + + if(urlSuffix && strlen(urlSuffix) > 0) { + [FBSDKSettings setAppURLSchemeSuffix:[FBUnityUtility stringFromCString:urlSuffix]]; + } + + NSDictionary *userData = [self getAccessTokenUserData] ?: @{}; + + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnInitComplete userData:userData requestId:0]; +} + +- (void)logInWithPublishPermissions:(int) requestId + scope:(const char *)scope +{ + [self startLogin:requestId scope:scope isPublishPermLogin:YES]; +} + +- (void)logInWithReadPermissions:(int) requestId + scope:(const char *)scope +{ + [self startLogin:requestId scope:scope isPublishPermLogin:NO]; +} + +- (void)startLogin:(int) requestId + scope:(const char *)scope +isPublishPermLogin:(BOOL)isPublishPermLogin +{ + NSString *scopeStr = [FBUnityUtility stringFromCString:scope]; + NSArray *permissions = nil; + if(scope && strlen(scope) > 0) { + permissions = [scopeStr componentsSeparatedByString:@","]; + } + + void (^loginHandler)(FBSDKLoginManagerLoginResult *,NSError *) = ^(FBSDKLoginManagerLoginResult *result, NSError *error) { + if (error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnLoginComplete error:error requestId:requestId]; + return; + } else if (result.isCancelled) { + [FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnLoginComplete requestId:requestId]; + return; + } + + if ([self tryCompleteLoginWithRequestId:requestId]) { + return; + } else { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnLoginComplete errorMessage:@"Unknown login error" requestId:requestId]; + } + }; + + FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; + [login logInWithPermissions:permissions + fromViewController:nil + handler:loginHandler]; +} + +- (void)loginWithTrackingPreference:(int)requestId + scope:(const char *)scope + tracking:(const char *)tracking + nonce:(const char *)nonce +{ + NSString *scopeStr = [FBUnityUtility stringFromCString:scope]; + NSArray *permissions = nil; + if(scope && strlen(scope) > 0) { + permissions = [scopeStr componentsSeparatedByString:@","]; + } + + NSString *trackingStr = [FBUnityUtility stringFromCString:tracking]; + NSString *nonceStr = nil; + if (nonce) { + nonceStr = [FBUnityUtility stringFromCString:nonce]; + } + FBSDKLoginConfiguration *config; + if (nonce) { + config = [[FBSDKLoginConfiguration alloc] initWithPermissions:permissions tracking:([trackingStr isEqualToString:@"enabled"] ? FBSDKLoginTrackingEnabled : FBSDKLoginTrackingLimited) nonce:nonceStr]; + } else { + config = [[FBSDKLoginConfiguration alloc] initWithPermissions:permissions tracking:([trackingStr isEqualToString:@"enabled"] ? FBSDKLoginTrackingEnabled : FBSDKLoginTrackingLimited)]; + } + + void (^loginHandler)(FBSDKLoginManagerLoginResult *,NSError *) = ^(FBSDKLoginManagerLoginResult *result, NSError *error) { + if (error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnLoginComplete error:error requestId:requestId]; + return; + } else if (result.isCancelled) { + [FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnLoginComplete requestId:requestId]; + return; + } + + if ([self tryCompleteLoginWithRequestId:requestId]) { + return; + } else { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnLoginComplete errorMessage:@"Unknown login error" requestId:requestId]; + } + }; + + FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; + [login logInFromViewController:nil configuration:config completion:loginHandler]; +} + +- (void)logOut +{ + FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; + [login logOut]; + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnLogoutComplete userData:@{} requestId:0]; +} + +- (void)appRequestWithRequestId:(int)requestId + message:(const char *)message + actionType:(const char *)actionType + objectId:(const char *)objectId + to:(const char **)to + toLength:(int)toLength + filters:(const char *)filters + data:(const char *)data + title:(const char *)title +{ + FBSDKGameRequestContent *content = [[FBSDKGameRequestContent alloc] init]; + content.message = [FBUnityUtility stringFromCString:message]; + content.actionType = [FBUnityUtility gameRequestActionTypeFromString:[FBUnityUtility stringFromCString:actionType]]; + content.objectID = [FBUnityUtility stringFromCString:objectId]; + if(to && toLength) { + NSMutableArray *toArray = [NSMutableArray array]; + for(int i = 0; i < toLength; i++) { + [toArray addObject:[FBUnityUtility stringFromCString:to[i]]]; + } + content.recipients = toArray; + } + content.filters = [FBUnityUtility gameRequestFilterFromString:[FBUnityUtility stringFromCString:filters]]; + content.data = [FBUnityUtility stringFromCString:data]; + content.title = [FBUnityUtility stringFromCString:title]; + + FBUnitySDKDelegate *delegate = [FBUnitySDKDelegate instanceWithRequestID:requestId]; + NSError *error; + FBSDKGameRequestDialog *dialog = [[FBSDKGameRequestDialog alloc] init]; + dialog.content = content; + dialog.delegate = delegate; + dialog.frictionlessRequestsEnabled = self.useFrictionlessRequests; + + if (![dialog validateWithError:&error]) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnAppRequestsComplete error:error requestId:requestId]; + } + if (![dialog show]) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnAppRequestsComplete errorMessage:@"Failed to show request dialog" requestId:requestId]; + } +} + +- (void)shareLinkWithRequestId:(int)requestId + contentURL:(const char *)contentURL + contentTitle:(const char *)contentTitle + contentDescription:(const char *)contentDescription + photoURL:(const char *)photoURL +{ + FBSDKShareLinkContent *linkContent = [[FBSDKShareLinkContent alloc] init]; + + NSString *contentUrlStr = [FBUnityUtility stringFromCString:contentURL]; + if (contentUrlStr) { + linkContent.contentURL = [NSURL URLWithString:contentUrlStr]; + } + + [self shareContentWithRequestId:requestId + shareContent:linkContent + dialogMode:[self getDialogMode]]; +} + +- (void)shareFeedWithRequestId:(int)requestId + toId:(const char *)toID + link:(const char *)link + linkName:(const char *)linkName + linkCaption:(const char *)linkCaption + linkDescription:(const char *)linkDescription + picture:(const char *)picture + mediaSource:(const char *)mediaSource +{ + FBSDKShareLinkContent *linkContent = [[FBSDKShareLinkContent alloc] init]; + NSString *contentUrlStr = [FBUnityUtility stringFromCString:link]; + if (contentUrlStr) { + linkContent.contentURL = [NSURL URLWithString:contentUrlStr]; + } + + NSMutableDictionary *feedParameters = [[NSMutableDictionary alloc] init]; + NSString *toStr = [FBUnityUtility stringFromCString:toID]; + if (toStr) { + [feedParameters setObject:toStr forKey:@"to"]; + } + + NSString *captionStr = [FBUnityUtility stringFromCString:linkCaption]; + if (captionStr) { + [feedParameters setObject:captionStr forKey:@"caption"]; + } + + NSString *sourceStr = [FBUnityUtility stringFromCString:mediaSource]; + if (sourceStr) { + [feedParameters setObject:sourceStr forKey:@"source"]; + } + + [linkContent addParameters:feedParameters bridgeOptions:FBSDKShareBridgeOptionsDefault]; + [self shareContentWithRequestId:requestId + shareContent:linkContent + dialogMode:FBSDKShareDialogModeFeedWeb]; +} + +- (void)shareContentWithRequestId:(int)requestId + shareContent:(FBSDKShareLinkContent *)linkContent + dialogMode:(FBSDKShareDialogMode)dialogMode +{ + FBSDKShareDialog *dialog = [[FBSDKShareDialog alloc] init]; + dialog.shareContent = linkContent; + dialog.mode = dialogMode; + FBUnitySDKDelegate *delegate = [FBUnitySDKDelegate instanceWithRequestID:requestId]; + dialog.delegate = delegate; + + NSError *error; + if (![dialog validateWithError:&error]) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnShareLinkComplete error:error requestId:requestId]; + } + if (![dialog show]) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnShareLinkComplete errorMessage:@"Failed to show share dialog" requestId:requestId]; + } +} + +- (FBSDKShareDialogMode)getDialogMode +{ + switch (self.shareDialogMode) { + case ShareDialogMode::AUTOMATIC: + return FBSDKShareDialogModeAutomatic; + case ShareDialogMode::NATIVE: + return FBSDKShareDialogModeNative; + case ShareDialogMode::WEB: + return FBSDKShareDialogModeWeb; + case ShareDialogMode::FEED: + return FBSDKShareDialogModeFeedWeb; + default: + NSLog(@"Unexpected dialog mode: %@", [NSNumber numberWithInt:self.shareDialogMode]); + return FBSDKShareDialogModeAutomatic; + } +} + +- (BOOL)tryCompleteLoginWithRequestId:(int) requestId +{ + NSMutableDictionary *userData = [[NSMutableDictionary alloc] init]; + NSDictionary *accessTokenUserData = [self getAccessTokenUserData]; + NSDictionary *authenticationTokenUserData = [self getAuthenticationTokenUserData]; + if (accessTokenUserData) { + [userData addEntriesFromDictionary:accessTokenUserData]; + } + if (authenticationTokenUserData) { + [userData addEntriesFromDictionary:authenticationTokenUserData]; + } + if (userData) { + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnLoginComplete + userData:[userData copy] + requestId:requestId]; + return YES; + } else { + return NO; + } +} + +- (NSDictionary *)getAccessTokenUserData +{ + FBSDKAccessToken *token = [FBSDKAccessToken currentAccessToken]; + if (token) { + // Old v3 sdk tokens don't always contain a UserID. If the user ID is null + // treat the token as bad and clear it. These values are all required + // on c# side for initlizing a token. + NSDictionary *userData = [FBUnityUtility getUserDataFromAccessToken:token]; + if (userData) { + return userData; + } else { + // The token is missing a required value. Clear the token + [[[FBSDKLoginManager alloc] init] logOut]; + } + } + + return nil; +} + +- (NSDictionary *)getAuthenticationTokenUserData +{ + FBSDKAuthenticationToken *token = [FBSDKAuthenticationToken currentAuthenticationToken]; + if (token.tokenString && token.nonce) { + return @{ + @"auth_token_string": token.tokenString, + @"auth_nonce": token.nonce + }; + } + + return nil; +} + +@end + +#pragma mark - Actual Unity C# interface (extern C) + +extern "C" { + + void IOSFBSendViewHierarchy(const char *_tree ) + { + Class FBUnityUtility = NSClassFromString(@"FBSDKCodelessIndexer"); + [FBUnityUtility performSelector:NSSelectorFromString(@"uploadIndexing:") + withObject:[NSString stringWithUTF8String:_tree]]; + } + + void IOSFBInit(const char *_appId, bool _frictionlessRequests, const char *_urlSuffix, const char *_userAgentSuffix) + { + // Set the user agent before calling init to ensure that calls made during + // init use the user agent suffix. + [FBSDKSettings setUserAgentSuffix:[FBUnityUtility stringFromCString:_userAgentSuffix]]; + + [[FBUnityInterface sharedInstance] configureAppId:_appId + frictionlessRequests:_frictionlessRequests + urlSuffix:_urlSuffix]; + [FBSDKAppEvents setIsUnityInit:true]; + [FBSDKAppEvents sendEventBindingsToUnity]; + } + + void IOSFBEnableProfileUpdatesOnAccessTokenChange(bool enable) + { + [FBSDKProfile enableUpdatesOnAccessTokenChange:enable]; + } + + void IOSFBLoginWithTrackingPreference(int requestId, const char *scope, const char *tracking, const char *nonce) + { + [[FBUnityInterface sharedInstance] loginWithTrackingPreference:requestId scope:scope + tracking:tracking + nonce:nonce]; + } + + void IOSFBLogInWithReadPermissions(int requestId, + const char *scope) + { + [[FBUnityInterface sharedInstance] logInWithReadPermissions:requestId scope:scope]; + } + + void IOSFBLogInWithPublishPermissions(int requestId, + const char *scope) + { + [[FBUnityInterface sharedInstance] logInWithPublishPermissions:requestId scope:scope]; + } + + void IOSFBLogOut() + { + [[FBUnityInterface sharedInstance] logOut]; + } + + char* IOSFBCurrentAuthenticationToken() + { + FBSDKAuthenticationToken *token = [FBSDKAuthenticationToken currentAuthenticationToken]; + NSString *str = @""; + if (token.tokenString && token.nonce) { + try { + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:@{ + @"auth_token_string": token.tokenString, + @"auth_nonce": token.nonce + } options:NSJSONWritingPrettyPrinted error:nil]; + if (jsonData) { + str = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } + } catch (NSException *exception) { + NSLog(@"Fail to parse AuthenticationToken"); + } + } + const char* string = [str UTF8String]; + char* res = (char*)malloc(strlen(string) + 1); + strcpy(res, string); + return res; + } + + char* IOSFBCurrentProfile() + { + FBSDKProfile *profile = [FBSDKProfile currentProfile]; + NSString *str = @""; + NSMutableDictionary *data = [NSMutableDictionary new]; + if (profile.userID) { + data[@"userID"] = profile.userID; + } + if (profile.firstName) { + data[@"firstName"] = profile.firstName; + } + if (profile.middleName) { + data[@"middleName"] = profile.middleName; + } + if (profile.lastName) { + data[@"lastName"] = profile.lastName; + } + if (profile.name) { + data[@"name"] = profile.name; + } + if (profile.email) { + data[@"email"] = profile.email; + } + if (profile.imageURL) { + data[@"imageURL"] = profile.imageURL.absoluteString; + } + if (profile.linkURL) { + data[@"linkURL"] = profile.linkURL.absoluteString; + } + if (profile.friendIDs) { + data[@"friendIDs"] = [profile.friendIDs componentsJoinedByString:@","]; + } + if (profile.birthday) { + data[@"birthday"] = [NSString stringWithFormat:@"%@", @((time_t)[profile.birthday timeIntervalSince1970])]; + } + if (profile.ageRange) { + if (profile.ageRange.min) { + data[@"ageMin"] = profile.ageRange.min.stringValue; + } + if (profile.ageRange.max) { + data[@"ageMax"] = profile.ageRange.max.stringValue; + } + } + + if (profile.hometown) { + data[@"hometown_id"] = profile.hometown.id; + data[@"hometown_name"] = profile.hometown.name; + } + + if (profile.location) { + data[@"location_id"] = profile.location.id; + data[@"location_name"] = profile.location.name; + } + + if (profile.gender) { + data[@"gender"] = profile.gender; + } + + try { + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:NSJSONWritingPrettyPrinted error:nil]; + if (jsonData) { + str = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } + } catch (NSException *exception) { + NSLog(@"Fail to parse Profile"); + } + const char* string = [str UTF8String]; + char* res = (char*)malloc(strlen(string) + 1); + strcpy(res, string); + return res; + } + + void IOSFBSetPushNotificationsDeviceTokenString(const char *token) + { + [FBSDKAppEvents setPushNotificationsDeviceTokenString:[FBUnityUtility stringFromCString:token]]; + } + + void IOSFBSetShareDialogMode(int mode) + { + [FBUnityInterface sharedInstance].shareDialogMode = static_cast(mode); + } + + void IOSFBAppRequest(int requestId, + const char *message, + const char *actionType, + const char *objectId, + const char **to, + int toLength, + const char *filters, + const char **excludeIds, //not supported on mobile + int excludeIdsLength, //not supported on mobile + bool hasMaxRecipients, //not supported on mobile + int maxRecipients, //not supported on mobile + const char *data, + const char *title) + { + [[FBUnityInterface sharedInstance] appRequestWithRequestId: requestId + message: message + actionType: actionType + objectId: objectId + to: to + toLength: toLength + filters: filters + data: data + title: title]; + } + + void IOSFBGetAppLink(int requestId) + { + NSURL *url = [NSURL URLWithString:[FBUnityInterface sharedInstance].openURLString]; + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnGetAppLinkComplete + userData:[FBUnityUtility appLinkDataFromUrl:url] + requestId:requestId]; + [FBUnityInterface sharedInstance].openURLString = nil; + } + + void IOSFBShareLink(int requestId, + const char *contentURL, + const char *contentTitle, + const char *contentDescription, + const char *photoURL) + { + [[FBUnityInterface sharedInstance] shareLinkWithRequestId:requestId + contentURL:contentURL + contentTitle:contentTitle + contentDescription:contentDescription + photoURL:photoURL]; + } + + void IOSFBFeedShare(int requestId, + const char *toId, + const char *link, + const char *linkName, + const char *linkCaption, + const char *linkDescription, + const char *picture, + const char *mediaSource) + { + [[FBUnityInterface sharedInstance] shareFeedWithRequestId:requestId + toId:toId + link:link + linkName:linkName + linkCaption:linkCaption + linkDescription:linkDescription + picture:picture + mediaSource:mediaSource]; + } + + void IOSFBAppEventsActivateApp() + { + [FBSDKAppEvents activateApp]; + } + + void IOSFBAppEventsLogEvent(const char *eventName, + double valueToSum, + int numParams, + const char **paramKeys, + const char **paramVals) + { + NSDictionary *params = [FBUnityUtility dictionaryFromKeys:paramKeys values:paramVals length:numParams]; + [FBSDKAppEvents logEvent:[FBUnityUtility stringFromCString:eventName] valueToSum:valueToSum parameters:params]; + } + + void IOSFBAppEventsLogPurchase(double amount, + const char *currency, + int numParams, + const char **paramKeys, + const char **paramVals) + { + NSDictionary *params = [FBUnityUtility dictionaryFromKeys:paramKeys values:paramVals length:numParams]; + [FBSDKAppEvents logPurchase:amount currency:[FBUnityUtility stringFromCString:currency] parameters:params]; + } + + void IOSFBAppEventsSetLimitEventUsage(BOOL limitEventUsage) + { + [FBSDKSettings setLimitEventAndDataUsage:limitEventUsage]; + } + + void IOSFBAutoLogAppEventsEnabled(BOOL autoLogAppEventsEnabledID) + { + [FBSDKSettings setAutoLogAppEventsEnabled:autoLogAppEventsEnabledID]; + } + + void IOSFBAdvertiserIDCollectionEnabled(BOOL advertiserIDCollectionEnabledID) + { + [FBSDKSettings setAdvertiserIDCollectionEnabled:advertiserIDCollectionEnabledID]; + } + + BOOL IOSFBAdvertiserTrackingEnabled(BOOL advertiserTrackingEnabled) + { + return [FBSDKSettings setAdvertiserTrackingEnabled:advertiserTrackingEnabled]; + } + + char* IOSFBSdkVersion() + { + const char* string = [[FBSDKSettings sdkVersion] UTF8String]; + char* res = (char*)malloc(strlen(string) + 1); + strcpy(res, string); + return res; + } + + void IOSFBSetUserID(const char *userID) + { + [FBSDKAppEvents setUserID:[FBUnityUtility stringFromCString:userID]]; + } + + void IOSFBOpenGamingServicesFriendFinder(int requestId) + { + [FBSDKFriendFinderDialog + launchFriendFinderDialogWithCompletionHandler:^(BOOL success, NSError * _Nullable error) { + if (!success || error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnFriendFinderComplete error:error requestId:requestId]; + } else { + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnFriendFinderComplete + userData:NULL + requestId:requestId]; + } + }]; + } + + void IOSFBSetDataProcessingOptions( + const char** options, + int numOptions, + int country, + int state) { + NSMutableArray* array = [[NSMutableArray alloc] init]; + for (int i = 0; i < numOptions; i++) { + NSString* option = [FBUnityUtility stringFromCString:options[i]]; + if (option) { + [array addObject:option]; + } + } + [FBSDKSettings setDataProcessingOptions:array country:country state:state]; + } + + void IOSFBUploadImageToMediaLibrary(int requestId, + const char *caption, + const char *imageUri, + bool shouldLaunchMediaDialog) + { + NSString *captionString = [FBUnityUtility stringFromCString:caption]; + NSString *imageUriString = [FBUnityUtility stringFromCString:imageUri]; + UIImage *image = [UIImage imageWithContentsOfFile:imageUriString]; + + FBSDKGamingImageUploaderConfiguration *config = + [[FBSDKGamingImageUploaderConfiguration alloc] + initWithImage:image + caption:captionString + shouldLaunchMediaDialog:shouldLaunchMediaDialog ? YES: NO]; + + [FBSDKGamingImageUploader + uploadImageWithConfiguration:config + andResultCompletionHandler:^(BOOL success, id result, NSError * _Nullable error) { + if (!success || error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnUploadImageToMediaLibraryComplete + error:error + requestId:requestId]; + } else { + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnUploadImageToMediaLibraryComplete + userData:@{@"id":result[@"id"]} + requestId:requestId]; + } + }]; + + } + + void IOSFBUploadVideoToMediaLibrary(int requestId, + const char *caption, + const char *videoUri) + { + NSString *captionString = [FBUnityUtility stringFromCString:caption]; + NSString *videoUriString = [FBUnityUtility stringFromCString:videoUri]; + NSURL *videoURL = [NSURL fileURLWithPath:videoUriString]; + + FBSDKGamingVideoUploaderConfiguration *config = + [[FBSDKGamingVideoUploaderConfiguration alloc] + initWithVideoURL:videoURL + caption:captionString]; + + [FBSDKGamingVideoUploader + uploadVideoWithConfiguration:config + andResultCompletionHandler:^(BOOL success, id result, NSError * _Nullable error) { + if (!success || error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnUploadVideoToMediaLibraryComplete + error:error + requestId:requestId]; + } else { + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnUploadVideoToMediaLibraryComplete + userData:@{@"id":result[@"id"]} + requestId:requestId]; + } + }]; + + } + + char* IOSFBGetUserID() + { + NSString *userID = [FBSDKAppEvents userID]; + if (!userID) { + return NULL; + } + const char* string = [userID UTF8String]; + char* res = (char*)malloc(strlen(string) + 1); + strcpy(res, string); + return res; + } + + void IOSFBUpdateUserProperties(int numParams, + const char **paramKeys, + const char **paramVals) + { } + + void IOSFBFetchDeferredAppLink(int requestId) + { + [FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) { + if (error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnFetchDeferredAppLinkComplete error:error requestId:requestId]; + return; + } + + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnFetchDeferredAppLinkComplete + userData:[FBUnityUtility appLinkDataFromUrl:url] + requestId:requestId]; + }]; + } + + void IOSFBRefreshCurrentAccessToken(int requestId) + { + [FBSDKAccessToken refreshCurrentAccessToken:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (error) { + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnRefreshCurrentAccessTokenComplete error:error requestId:requestId]; + return; + } + + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnRefreshCurrentAccessTokenComplete + userData:[FBUnityUtility getUserDataFromAccessToken:[FBSDKAccessToken currentAccessToken]] + requestId:requestId]; + }]; + } +} diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm.meta new file mode 100644 index 00000000..99f13d3c --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 4c29c5d59509848c4bc24c13ac976932 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.h b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.h new file mode 100644 index 00000000..96cfcb33 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.h @@ -0,0 +1,49 @@ +// 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. + +#import + +extern NSString *const FBUnityMessageName_OnAppRequestsComplete; +extern NSString *const FBUnityMessageName_OnFriendFinderComplete; +extern NSString *const FBUnityMessageName_OnGetAppLinkComplete; +extern NSString *const FBUnityMessageName_OnGroupCreateComplete; +extern NSString *const FBUnityMessageName_OnGroupJoinComplete; +extern NSString *const FBUnityMessageName_OnInitComplete; +extern NSString *const FBUnityMessageName_OnLoginComplete; +extern NSString *const FBUnityMessageName_OnLogoutComplete; +extern NSString *const FBUnityMessageName_OnShareLinkComplete; +extern NSString *const FBUnityMessageName_OnFetchDeferredAppLinkComplete; +extern NSString *const FBUnityMessageName_OnRefreshCurrentAccessTokenComplete; +extern NSString *const FBUnityMessageName_OnUploadImageToMediaLibraryComplete; +extern NSString *const FBUnityMessageName_OnUploadVideoToMediaLibraryComplete; + +/*! + @abstract A helper class that implements various FBSDK delegates in order to send + messages back to Unity. + */ +@interface FBUnitySDKDelegate : NSObject< + FBSDKGameRequestDialogDelegate, + FBSDKSharingDelegate> + +/* + @abstract returns a self retaining instance that is released once it receives a + delegate message from FBSDK. + */ ++ (instancetype)instanceWithRequestID:(int)requestID; + +@end diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.h.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.h.meta new file mode 100644 index 00000000..e50d15bb --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.h.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 7461bcc2e2c714a03a3f60d68ec79369 +timeCreated: 1435007350 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m new file mode 100644 index 00000000..e56698d0 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m @@ -0,0 +1,110 @@ +// 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. + +#import "FBUnitySDKDelegate.h" + +#import "FBUnityUtility.h" + +NSString *const FBUnityMessageName_OnAppRequestsComplete = @"OnAppRequestsComplete"; +NSString *const FBUnityMessageName_OnGetAppLinkComplete = @"OnGetAppLinkComplete"; +NSString *const FBUnityMessageName_OnFriendFinderComplete = @"OnFriendFinderComplete"; +NSString *const FBUnityMessageName_OnGroupCreateComplete = @"OnGroupCreateComplete"; +NSString *const FBUnityMessageName_OnGroupJoinComplete = @"OnGroupJoinComplete"; +NSString *const FBUnityMessageName_OnInitComplete = @"OnInitComplete"; +NSString *const FBUnityMessageName_OnLoginComplete = @"OnLoginComplete"; +NSString *const FBUnityMessageName_OnLogoutComplete = @"OnLogoutComplete"; +NSString *const FBUnityMessageName_OnShareLinkComplete = @"OnShareLinkComplete"; +NSString *const FBUnityMessageName_OnFetchDeferredAppLinkComplete = @"OnFetchDeferredAppLinkComplete"; +NSString *const FBUnityMessageName_OnRefreshCurrentAccessTokenComplete = @"OnRefreshCurrentAccessTokenComplete"; +NSString *const FBUnityMessageName_OnUploadImageToMediaLibraryComplete = @"OnUploadImageToMediaLibraryComplete"; +NSString *const FBUnityMessageName_OnUploadVideoToMediaLibraryComplete = @"OnUploadVideoToMediaLibraryComplete"; + +static NSMutableArray *g_instances; + +@implementation FBUnitySDKDelegate { + int _requestID; +} + ++ (void)initialize +{ + if (self == [FBUnitySDKDelegate class]) { + g_instances = [NSMutableArray array]; + } +} + ++ (instancetype)instanceWithRequestID:(int)requestID +{ + FBUnitySDKDelegate *instance = [[FBUnitySDKDelegate alloc] init]; + instance->_requestID = requestID; + [g_instances addObject:instance]; + return instance; +} + +#pragma mark - Private helpers + +- (void)complete +{ + [g_instances removeObject:self]; +} + +#pragma mark - GameRequestDelegate + +- (void)gameRequestDialog:(FBSDKGameRequestDialog *)gameRequestDialog didCompleteWithResults:(NSDictionary *)results +{ + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnAppRequestsComplete userData:results requestId:_requestID]; + [self complete]; +} + +- (void)gameRequestDialog:(FBSDKGameRequestDialog *)gameRequestDialog didFailWithError:(NSError *)error +{ + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnAppRequestsComplete error:error requestId:_requestID]; + [self complete]; +} + +- (void)gameRequestDialogDidCancel:(FBSDKGameRequestDialog *)gameRequestDialog +{ + [FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnAppRequestsComplete requestId:_requestID]; + [self complete]; +} + +#pragma mark - FBSDKSharingDelegate + +- (void)sharer:(id)sharer didCompleteWithResults:(NSDictionary *)results +{ + if (results.count == 0) { + // We no longer always send back a postId. In cases where the response is empty, + // stuff in a didComplete so that Unity doesn't treat it as a malformed response. + results = @{ @"didComplete" : @"1" }; + } + [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnShareLinkComplete userData:results requestId:_requestID]; + [self complete]; +} + +- (void)sharer:(id)sharer didFailWithError:(NSError *)error +{ + [FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnShareLinkComplete error:error requestId:_requestID]; + [self complete]; +} + +- (void)sharerDidCancel:(id)sharer +{ + [FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnShareLinkComplete requestId:_requestID]; + [self complete]; +} + +@end diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m.meta new file mode 100644 index 00000000..f9e65b5a --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: fbc51482e3ca248329707d61959f9d9d +timeCreated: 1435010266 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.h b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.h new file mode 100644 index 00000000..0dbf9f41 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.h @@ -0,0 +1,35 @@ +// 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. + +#import +#import + +extern const char* const FB_OBJECT_NAME; + +@interface FBUnityUtility : NSObject ++ (NSDictionary *)dictionaryFromKeys:(const char **)keys values:(const char **)vals length:(int)length; ++ (FBSDKGameRequestFilter)gameRequestFilterFromString:(NSString *)filter; ++ (FBSDKGameRequestActionType)gameRequestActionTypeFromString:(NSString *)actionType; ++ (void)sendCancelToUnity:(NSString *)unityMessage requestId:(int)requestId; ++ (void)sendErrorToUnity:(NSString *)unityMessage error:(NSError *)error requestId:(int)requestId; ++ (void)sendErrorToUnity:(NSString *)unityMessage errorMessage:(NSString *)errorMessage requestId:(int)requestId; ++ (void)sendMessageToUnity:(NSString *)unityMessage userData:(NSDictionary *)userData requestId:(int)requestId; ++ (NSString *)stringFromCString:(const char *)string; ++ (NSDictionary *)appLinkDataFromUrl:(NSURL *)url; ++ (NSDictionary *)getUserDataFromAccessToken:(FBSDKAccessToken *)token; +@end diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.h.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.h.meta new file mode 100644 index 00000000..efbec89a --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.h.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: b4469d6625a664618b68231ee0dcc093 +timeCreated: 1435010266 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.mm b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.mm new file mode 100644 index 00000000..7dd8fa2e --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.mm @@ -0,0 +1,228 @@ +// 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. + +#import "FBUnityUtility.h" + +#include +#import + +#import +#import +#import + +const char* const FB_OBJECT_NAME = "UnityFacebookSDKPlugin"; + +// Helper method to create C string copy +static char* FBUnityMakeStringCopy (const char* string) +{ + if (string == NULL) + return NULL; + + char* res = (char*)malloc(strlen(string) + 1); + strcpy(res, string); + return res; +} + +@implementation FBUnityUtility + ++ (void) sendCancelToUnity:(NSString *)unityMessage + requestId:(int)requestId +{ + [self sendMessageToUnity:unityMessage + userData:@{ @"cancelled" : @"true" } + requestId:requestId]; +} + ++ (void) triggerUploadViewHierarchy +{ + [self sendMessageToUnity:@"CaptureViewHierarchy" + userData:nil + requestId:0]; +} + ++ (void) triggerUpdateBindings:(NSString *)json +{ + [self sendMessageToUnity:@"OnReceiveMapping" + message:json + requestId:0]; +} + ++ (void)sendErrorToUnity:(NSString *)unityMessage + error:(NSError *)error + requestId:(int)requestId +{ + NSString *errorMessage = + error.userInfo[FBSDKErrorLocalizedDescriptionKey] ?: + error.userInfo[FBSDKErrorDeveloperMessageKey] ?: + error.localizedDescription; + [self sendErrorToUnity:unityMessage + errorMessage:errorMessage + requestId:requestId]; +} + ++ (void)sendErrorToUnity:(NSString *)unityMessage + errorMessage:(NSString *)errorMessage + requestId:(int)requestId +{ + [self sendMessageToUnity:unityMessage + userData:@{ @"error" : errorMessage } + requestId:requestId]; +} + ++ (void)sendMessageToUnity:(NSString *)unityMessage + userData:(NSDictionary *)userData + requestId:(int)requestId +{ + NSMutableDictionary *resultDictionary = [ @{ @"callback_id": [@(requestId) stringValue] } mutableCopy]; + [resultDictionary addEntriesFromDictionary:userData]; + + if (![NSJSONSerialization isValidJSONObject:resultDictionary]) { + [self sendErrorToUnity:unityMessage errorMessage:@"Result cannot be converted to json" requestId:requestId]; + return; + } + + NSError *serializationError = nil; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:resultDictionary options:0 error:&serializationError]; + if (serializationError) { + [self sendErrorToUnity:unityMessage error:serializationError requestId:requestId]; + return; + } + + NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + if (!jsonString) { + [self sendErrorToUnity:unityMessage errorMessage:@"Failed to generate response string" requestId:requestId]; + return; + } + + const char *cString = [jsonString UTF8String]; + UnitySendMessage(FB_OBJECT_NAME, [unityMessage cStringUsingEncoding:NSASCIIStringEncoding], FBUnityMakeStringCopy(cString)); +} + ++ (void)sendMessageToUnity:(NSString *)unityMessage + message:(NSString *)message + requestId:(int)requestId +{ + const char *cString = [message UTF8String]; + UnitySendMessage(FB_OBJECT_NAME, [unityMessage cStringUsingEncoding:NSASCIIStringEncoding], FBUnityMakeStringCopy(cString)); +} + ++ (NSString *)stringFromCString:(const char *)string { + if (string && string[0] != 0) { + return [NSString stringWithUTF8String:string]; + } + + return nil; +} + ++ (NSDictionary *)dictionaryFromKeys:(const char **)keys + values:(const char **)vals + length:(int)length +{ + NSMutableDictionary *params = nil; + if(length > 0 && keys && vals) { + params = [NSMutableDictionary dictionaryWithCapacity:length]; + for(int i = 0; i < length; i++) { + if (vals[i] && vals[i] != 0 && keys[i] && keys[i] != 0) { + params[[NSString stringWithUTF8String:keys[i]]] = [NSString stringWithUTF8String:vals[i]]; + } + } + } + + return params; +} + ++ (FBSDKGameRequestFilter) gameRequestFilterFromString:(NSString *)filter { + if (filter.length == 0 || [filter isEqualToString:@"none"]) { + return FBSDKGameRequestFilterNone; + } else if ([filter isEqualToString:@"app_users"]) { + return FBSDKGameRequestFilterAppUsers; + } else if ([filter isEqualToString:@"app_non_users"]) { + return FBSDKGameRequestFilterAppNonUsers; + } + + NSLog(@"Unexpected filter type: %@", filter); + return FBSDKGameRequestFilterNone; +} + ++ (FBSDKGameRequestActionType) gameRequestActionTypeFromString:(NSString *)actionType { + NSString *actionUpper = [actionType uppercaseString]; + if (actionUpper.length == 0 || [actionUpper isEqualToString:@"NONE"]) { + return FBSDKGameRequestActionTypeNone; + } else if ([actionUpper isEqualToString:@"SEND"]) { + return FBSDKGameRequestActionTypeSend; + } else if ([actionUpper isEqualToString:@"ASKFOR"]) { + return FBSDKGameRequestActionTypeAskFor; + } else if ([actionUpper isEqualToString:@"TURN"]) { + return FBSDKGameRequestActionTypeTurn; + } + + NSLog(@"Unexpected action type: %@", actionType); + return FBSDKGameRequestActionTypeNone; +} + ++ (NSDictionary *)appLinkDataFromUrl:(NSURL *)url +{ + NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; + if (url) { + [dict setObject:url.absoluteString forKey:@"url"]; + FBSDKURL *parsedUrl = [FBSDKURL URLWithInboundURL:url sourceApplication:nil]; + if (parsedUrl) { + if (parsedUrl.appLinkExtras) { + [dict setObject:parsedUrl.appLinkExtras forKey:@"extras"]; + + // TODO - Try to parse ref param out and pass back + } + + if (parsedUrl.targetURL) { + [dict setObject:parsedUrl.targetURL.absoluteString forKey:@"target_url"]; + } + } + } else { + [dict setObject:@true forKey:@"did_complete"]; + } + return dict; +} + ++ (NSDictionary *)getUserDataFromAccessToken:(FBSDKAccessToken *)token +{ + if (token) { + if (token.tokenString && + token.expirationDate && + token.userID && + token.permissions && + token.declinedPermissions) { + NSInteger expiration = token.expirationDate.timeIntervalSince1970; + NSInteger lastRefreshDate = token.refreshDate ? token.refreshDate.timeIntervalSince1970 : 0; + return @{ + @"opened" : @"true", + @"access_token" : token.tokenString, + @"expiration_timestamp" : [@(expiration) stringValue], + @"user_id" : token.userID, + @"permissions" : [token.permissions allObjects], + @"granted_permissions" : [token.permissions allObjects], + @"declined_permissions" : [token.declinedPermissions allObjects], + @"last_refresh" : [@(lastRefreshDate) stringValue], + @"graph_domain" : token.graphDomain ? : @"facebook", + }; + } + } + + return nil; +} + +@end diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.mm.meta b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.mm.meta new file mode 100644 index 00000000..9f789ede --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityUtility.mm.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 5cafb2af7ca9641f58022a816236d1ad +timeCreated: 1435010266 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/fixup.projmods b/Assets/FacebookSDK/SDK/Editor/iOS/fixup.projmods new file mode 100644 index 00000000..1a223f28 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/fixup.projmods @@ -0,0 +1,24 @@ +{ + "group": "Facebook", + "patches": [], + "libs": [ + "libsqlite3.0.dylib:weak", + ], + "librarysearchpaths": [ + ], + "frameworks": [ + "Accounts.framework:weak", + "AdSupport.framework:weak", + "Social.framework:weak", + "Security.framework:weak", + ], + "headerpaths": [ + "Facebook/Editor/iOS", + "Facebook/Scripts" + ], + "files": [ + "Facebook/Scripts/NativeDialogModes.cs", + ], + "folders": [], + "excludes": ["^.*\\.meta$", "^.*\\.mdown^", "^.*\\.pdf$"] +} diff --git a/Assets/FacebookSDK/SDK/Editor/iOS/fixup.projmods.meta b/Assets/FacebookSDK/SDK/Editor/iOS/fixup.projmods.meta new file mode 100644 index 00000000..cef79fd6 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Editor/iOS/fixup.projmods.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: aead30834362b490ea67fdd7fd0351c5 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Resources.meta b/Assets/FacebookSDK/SDK/Resources.meta new file mode 100644 index 00000000..4cda13d7 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 43702c51e269ba844b251a6b0dc2c3ee +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/SDK/Resources/FacebookSettings.asset b/Assets/FacebookSDK/SDK/Resources/FacebookSettings.asset new file mode 100644 index 00000000..33d9c965 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Resources/FacebookSettings.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !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: -2115301841, guid: c49f2b3ca212b47fc9cd8ce655177c89, type: 3} + m_Name: FacebookSettings + m_EditorClassIdentifier: + selectedAppIndex: 0 + clientTokens: + - d779cb91480cab68572b998f318bd974 + appIds: + - 1291883451314488 + appLabels: + - PowerFun + cookie: 1 + logging: 1 + status: 1 + xfbml: 0 + frictionlessRequests: 1 + androidKeystorePath: D:\u3d\powerfun-unity\Assets\Plugins\Android\powerfun.keystore + iosURLSuffix: + appLinkSchemes: + - list: [] + uploadAccessToken: + autoLogAppEventsEnabled: 1 + advertiserIDCollectionEnabled: 1 diff --git a/Assets/FacebookSDK/SDK/Resources/FacebookSettings.asset.meta b/Assets/FacebookSDK/SDK/Resources/FacebookSettings.asset.meta new file mode 100644 index 00000000..b178cb99 --- /dev/null +++ b/Assets/FacebookSDK/SDK/Resources/FacebookSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3c448b55864da84689165553423c906 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FacebookSDK/link.xml b/Assets/FacebookSDK/link.xml new file mode 100644 index 00000000..e1b30dc1 --- /dev/null +++ b/Assets/FacebookSDK/link.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Assets/FacebookSDK/link.xml.meta b/Assets/FacebookSDK/link.xml.meta new file mode 100644 index 00000000..f330c729 --- /dev/null +++ b/Assets/FacebookSDK/link.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51f4619c385224a23a3edb9092c7d49b +timeCreated: 1478648849 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayServicesResolver.meta b/Assets/PlayServicesResolver.meta new file mode 100644 index 00000000..21b2e52b --- /dev/null +++ b/Assets/PlayServicesResolver.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 333d24e71d12446ba5c77815e64b0ca8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayServicesResolver/Editor.meta b/Assets/PlayServicesResolver/Editor.meta new file mode 100644 index 00000000..9cb85ff6 --- /dev/null +++ b/Assets/PlayServicesResolver/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e105e00cdce8456482d26b1fcd1ca47d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll new file mode 100644 index 00000000..a9b0b5ae Binary files /dev/null and b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll differ diff --git a/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll.meta b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll.meta new file mode 100644 index 00000000..f3b0b8bd --- /dev/null +++ b/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: a1e8415cfe85469f9aa0aea941166031 +labels: +- gvh +- gvh_targets-editor +- gvh_version-1.2.135.0 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll new file mode 100644 index 00000000..7dda9d9e Binary files /dev/null and b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll differ diff --git a/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll.meta b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll.meta new file mode 100644 index 00000000..22e9d7b5 --- /dev/null +++ b/Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: 97738b29c18143b0a469277b09d35889 +labels: +- gvh +- gvh_targets-editor +- gvh_version-1.2.135.0 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll new file mode 100644 index 00000000..19b6d275 Binary files /dev/null and b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll differ diff --git a/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll.meta b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll.meta new file mode 100644 index 00000000..83d8867f --- /dev/null +++ b/Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: 369cd88e7aa04bd98e0f6c229f7c1510 +labels: +- gvh +- gvh_targets-editor +- gvh_version-1.2.135.0 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.135.0.txt b/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.135.0.txt new file mode 100644 index 00000000..1c0fccdd --- /dev/null +++ b/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.135.0.txt @@ -0,0 +1,8 @@ +Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll +Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.135.0.dll.mdb +Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll +Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.135.0.dll.mdb +Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll +Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.mdb +Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll +Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.135.0.dll.mdb diff --git a/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.135.0.txt.meta b/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.135.0.txt.meta new file mode 100644 index 00000000..c58a3ec9 --- /dev/null +++ b/Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.135.0.txt.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54730702a56740858922d24dc3f26918 +labels: +- gvh +- gvh_manifest +- gvh_version-1.2.135.0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Android/AndroidManifest.xml b/Assets/Plugins/Android/AndroidManifest.xml index f4ec1f05..640e88b3 100644 --- a/Assets/Plugins/Android/AndroidManifest.xml +++ b/Assets/Plugins/Android/AndroidManifest.xml @@ -1,38 +1,44 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Plugins/Android/mainTemplate.gradle b/Assets/Plugins/Android/mainTemplate.gradle index 974558f2..3540ada7 100644 --- a/Assets/Plugins/Android/mainTemplate.gradle +++ b/Assets/Plugins/Android/mainTemplate.gradle @@ -9,7 +9,8 @@ dependencies { implementation files ("libs/unityandroidbluetoothlelib.jar") implementation files ('libs/PowerFunAndroidPlugin-release.aar') implementation files ('libs/UniWebView.aar') - + implementation files ('libs/facebook-android-wrapper-11.0.0.aar') + implementation 'com.facebook.android:facebook-android-sdk:[8,9)' implementation ('com.mapbox.maps:android:10.2.0-beta.1'){ exclude group: 'group_name', module: 'module_name' } diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index 8a389621..e9f89b7b 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -13,6 +13,7 @@ using System; using System.Threading.Tasks; using System.Timers; using Newtonsoft.Json; +using Facebook.Unity; public delegate void ChangeLanguageDelegate(); @@ -193,6 +194,7 @@ public static class App TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001); //Debug.unityLogger.logEnabled = false; #endif + FB.Init(); var isRower = PlayerPrefs.GetString("IsRowerMode"); if (!string.IsNullOrEmpty(isRower)) { diff --git a/Assets/Scripts/Mobile/LoginControllerMobile.cs b/Assets/Scripts/Mobile/LoginControllerMobile.cs index 61e65ecd..12bc925b 100644 --- a/Assets/Scripts/Mobile/LoginControllerMobile.cs +++ b/Assets/Scripts/Mobile/LoginControllerMobile.cs @@ -1,6 +1,7 @@ using Assets.Scripts; using Assets.Scripts.Mobile.Interface; using DG.Tweening; +using Facebook.Unity; using Newtonsoft.Json.Linq; using System; using System.Collections; @@ -54,13 +55,19 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp #else transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer-third/otherContainer/Apple").gameObject.SetActive(false); #endif - + UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer-third/otherContainer/Facebook").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => + { + FB.LogOut(); + FB.LogInWithReadPermissions(callback: onFaceBookResp); + }); //App.weChatController.Init(App.WxAppId); //var s = App.weChatController.isApplicationAvilible("com.gugoumainapp","powerfun").ToString(); //Utils.showToast(null, SystemInfo.batteryLevel.ToString()); CheckUpdate(); } + + private async void CheckUpdate() { #if UNITY_ANDROID @@ -141,6 +148,22 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp } #endif } + /// + /// FaceBook登录返回 + /// + /// + private void onFaceBookResp(ILoginResult res) + { + if (string.IsNullOrEmpty(res.Error)) + { + Debug.Log("用戶Id" + res.ResultDictionary["user_id"]); + } + else + { + Utils.showToast(null, res.Error); + } + } + /// /// 从ios或者安卓接收code,在c#里不建议调用 /// diff --git a/ProjectSettings/AndroidResolverDependencies.xml b/ProjectSettings/AndroidResolverDependencies.xml new file mode 100644 index 00000000..c2cee6dc --- /dev/null +++ b/ProjectSettings/AndroidResolverDependencies.xml @@ -0,0 +1,28 @@ + + + com.android.support:appcompat-v7:25.3.1 + com.android.support:cardview-v7:25.3.1 + com.android.support:customtabs:25.3.1 + com.android.support:support-v4:25.3.1 + com.facebook.android:facebook-applinks:[11.0, 12) + com.facebook.android:facebook-core:[11.0, 12) + com.facebook.android:facebook-gamingservices:[11.0, 12) + com.facebook.android:facebook-login:[11.0, 12) + com.facebook.android:facebook-share:[11.0, 12) + com.parse.bolts:bolts-android:1.4.0 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 4706883c..9b996cb4 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -38,6 +38,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/ProjectSettings/GvhProjectSettings.xml b/ProjectSettings/GvhProjectSettings.xml new file mode 100644 index 00000000..124e0ad8 --- /dev/null +++ b/ProjectSettings/GvhProjectSettings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 4937adc8..549fbc77 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -179,7 +179,7 @@ PlayerSettings: applicationIdentifier: Android: com.ZhiXingPai.PowerFunUnity buildNumber: - iPhone: 2.0.7.0 + iPhone: 2.1.0.2 AndroidBundleVersionCode: 12 AndroidMinSdkVersion: 24 AndroidTargetSdkVersion: 30