diff --git a/Assets/IronSource.meta b/Assets/IronSource.meta deleted file mode 100644 index 5c357751..00000000 --- a/Assets/IronSource.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 60f0641b193bf7b48a2d6c914bc7192d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/DemoScene.meta b/Assets/IronSource/DemoScene.meta deleted file mode 100644 index 4e71559f..00000000 --- a/Assets/IronSource/DemoScene.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c658504690596404888aed1e9c257c84 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/DemoScene/IronSourceDemo.unity b/Assets/IronSource/DemoScene/IronSourceDemo.unity deleted file mode 100644 index a75afcc7..00000000 --- a/Assets/IronSource/DemoScene/IronSourceDemo.unity +++ /dev/null @@ -1,546 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.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} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 10 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &144620207 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 144620210} - - component: {fileID: 144620209} - - component: {fileID: 144620208} - - component: {fileID: 144620211} - 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 &144620208 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 144620207} - m_Enabled: 1 ---- !u!20 &144620209 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 144620207} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 2 - m_BackGroundColor: {r: 0.9487362, g: 0.9613346, b: 0.9811321, a: 0} - m_projectionMatrixMode: 1 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_GateFitMode: 2 - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - 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: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &144620210 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 144620207} - 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: - - {fileID: 1974370200} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &144620211 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 144620207} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 191f5798a75bd42589f98898505e981f, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &484534187 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 484534191} - - component: {fileID: 484534190} - - component: {fileID: 484534189} - - component: {fileID: 484534188} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &484534188 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 484534187} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &484534189 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 484534187} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!223 &484534190 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 484534187} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &484534191 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 484534187} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &498045477 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 498045479} - - component: {fileID: 498045478} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &498045478 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 498045477} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &498045479 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 498045477} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &910476656 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 910476659} - - component: {fileID: 910476658} - - component: {fileID: 910476657} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &910476657 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 910476656} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &910476658 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 910476656} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &910476659 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 910476656} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1488306033 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1488306034} - - component: {fileID: 1488306036} - - component: {fileID: 1488306035} - m_Layer: 5 - m_Name: RawImage - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1488306034 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1488306033} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1974370200} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -117} - m_SizeDelta: {x: 500, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1488306035 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1488306033} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Texture: {fileID: 2800000, guid: 5e326581693fd4e0db4c590543c3edc4, type: 3} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &1488306036 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1488306033} - m_CullTransparentMesh: 0 ---- !u!1 &1974370199 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1974370200} - - component: {fileID: 1974370203} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1974370200 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1974370199} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 1488306034} - m_Father: {fileID: 144620210} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!223 &1974370203 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1974370199} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 diff --git a/Assets/IronSource/DemoScene/IronSourceDemo.unity.meta b/Assets/IronSource/DemoScene/IronSourceDemo.unity.meta deleted file mode 100644 index cc9401e3..00000000 --- a/Assets/IronSource/DemoScene/IronSourceDemo.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ccc0ac08126704384bdda74c26d99797 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/DemoScene/IronSourceDemoScript.cs b/Assets/IronSource/DemoScene/IronSourceDemoScript.cs deleted file mode 100644 index b1c09996..00000000 --- a/Assets/IronSource/DemoScene/IronSourceDemoScript.cs +++ /dev/null @@ -1,566 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System; - - -// Example for IronSource Unity. -public class IronSourceDemoScript : MonoBehaviour -{ - - - - public void Start() - { - -#if UNITY_ANDROID - string appKey = "85460dcd"; -#elif UNITY_IPHONE - string appKey = "8545d445"; -#else - string appKey = "unexpected_platform"; -#endif - - - - Debug.Log("unity-script: IronSource.Agent.validateIntegration"); - IronSource.Agent.validateIntegration(); - - Debug.Log("unity-script: unity version" + IronSource.unityVersion()); - - // SDK init - Debug.Log("unity-script: IronSource.Agent.init"); - IronSource.Agent.init(appKey); - - } - - void OnEnable() - { - - //Add Init Event - IronSourceEvents.onSdkInitializationCompletedEvent += SdkInitializationCompletedEvent; - - //Add Rewarded Video Events - IronSourceEvents.onRewardedVideoAdOpenedEvent += RewardedVideoAdOpenedEvent; - IronSourceEvents.onRewardedVideoAdClosedEvent += RewardedVideoAdClosedEvent; - IronSourceEvents.onRewardedVideoAvailabilityChangedEvent += RewardedVideoAvailabilityChangedEvent; - IronSourceEvents.onRewardedVideoAdStartedEvent += RewardedVideoAdStartedEvent; - IronSourceEvents.onRewardedVideoAdEndedEvent += RewardedVideoAdEndedEvent; - IronSourceEvents.onRewardedVideoAdRewardedEvent += RewardedVideoAdRewardedEvent; - IronSourceEvents.onRewardedVideoAdShowFailedEvent += RewardedVideoAdShowFailedEvent; - IronSourceEvents.onRewardedVideoAdClickedEvent += RewardedVideoAdClickedEvent; - - //Add Rewarded Video DemandOnly Events - IronSourceEvents.onRewardedVideoAdOpenedDemandOnlyEvent += RewardedVideoAdOpenedDemandOnlyEvent; - IronSourceEvents.onRewardedVideoAdClosedDemandOnlyEvent += RewardedVideoAdClosedDemandOnlyEvent; - IronSourceEvents.onRewardedVideoAdLoadedDemandOnlyEvent += RewardedVideoAdLoadedDemandOnlyEvent; - IronSourceEvents.onRewardedVideoAdRewardedDemandOnlyEvent += RewardedVideoAdRewardedDemandOnlyEvent; - IronSourceEvents.onRewardedVideoAdShowFailedDemandOnlyEvent += RewardedVideoAdShowFailedDemandOnlyEvent; - IronSourceEvents.onRewardedVideoAdClickedDemandOnlyEvent += RewardedVideoAdClickedDemandOnlyEvent; - IronSourceEvents.onRewardedVideoAdLoadFailedDemandOnlyEvent += RewardedVideoAdLoadFailedDemandOnlyEvent; - - - // Add Offerwall Events - IronSourceEvents.onOfferwallClosedEvent += OfferwallClosedEvent; - IronSourceEvents.onOfferwallOpenedEvent += OfferwallOpenedEvent; - IronSourceEvents.onOfferwallShowFailedEvent += OfferwallShowFailedEvent; - IronSourceEvents.onOfferwallAdCreditedEvent += OfferwallAdCreditedEvent; - IronSourceEvents.onGetOfferwallCreditsFailedEvent += GetOfferwallCreditsFailedEvent; - IronSourceEvents.onOfferwallAvailableEvent += OfferwallAvailableEvent; - - - // Add Interstitial Events - IronSourceEvents.onInterstitialAdReadyEvent += InterstitialAdReadyEvent; - IronSourceEvents.onInterstitialAdLoadFailedEvent += InterstitialAdLoadFailedEvent; - IronSourceEvents.onInterstitialAdShowSucceededEvent += InterstitialAdShowSucceededEvent; - IronSourceEvents.onInterstitialAdShowFailedEvent += InterstitialAdShowFailedEvent; - IronSourceEvents.onInterstitialAdClickedEvent += InterstitialAdClickedEvent; - IronSourceEvents.onInterstitialAdOpenedEvent += InterstitialAdOpenedEvent; - IronSourceEvents.onInterstitialAdClosedEvent += InterstitialAdClosedEvent; - - // Add Interstitial DemandOnly Events - IronSourceEvents.onInterstitialAdReadyDemandOnlyEvent += InterstitialAdReadyDemandOnlyEvent; - IronSourceEvents.onInterstitialAdLoadFailedDemandOnlyEvent += InterstitialAdLoadFailedDemandOnlyEvent; - IronSourceEvents.onInterstitialAdShowFailedDemandOnlyEvent += InterstitialAdShowFailedDemandOnlyEvent; - IronSourceEvents.onInterstitialAdClickedDemandOnlyEvent += InterstitialAdClickedDemandOnlyEvent; - IronSourceEvents.onInterstitialAdOpenedDemandOnlyEvent += InterstitialAdOpenedDemandOnlyEvent; - IronSourceEvents.onInterstitialAdClosedDemandOnlyEvent += InterstitialAdClosedDemandOnlyEvent; - - - // Add Banner Events - IronSourceEvents.onBannerAdLoadedEvent += BannerAdLoadedEvent; - IronSourceEvents.onBannerAdLoadFailedEvent += BannerAdLoadFailedEvent; - IronSourceEvents.onBannerAdClickedEvent += BannerAdClickedEvent; - IronSourceEvents.onBannerAdScreenPresentedEvent += BannerAdScreenPresentedEvent; - IronSourceEvents.onBannerAdScreenDismissedEvent += BannerAdScreenDismissedEvent; - IronSourceEvents.onBannerAdLeftApplicationEvent += BannerAdLeftApplicationEvent; - - //Add ImpressionSuccess Event - IronSourceEvents.onImpressionSuccessEvent += ImpressionSuccessEvent; - IronSourceEvents.onImpressionDataReadyEvent += ImpressionDataReadyEvent; - - - //Add AdInfo Rewarded Video Events - IronSourceRewardedVideoEvents.onAdOpenedEvent += ReardedVideoOnAdOpenedEvent; - IronSourceRewardedVideoEvents.onAdClosedEvent += ReardedVideoOnAdClosedEvent; - IronSourceRewardedVideoEvents.onAdAvailableEvent += ReardedVideoOnAdAvailable; - IronSourceRewardedVideoEvents.onAdUnavailableEvent += ReardedVideoOnAdUnavailable; - IronSourceRewardedVideoEvents.onAdShowFailedEvent += ReardedVideoOnAdShowFailedEvent; - IronSourceRewardedVideoEvents.onAdRewardedEvent += ReardedVideoOnAdRewardedEvent; - IronSourceRewardedVideoEvents.onAdClickedEvent += ReardedVideoOnAdClickedEvent; - - - //Add AdInfo Interstitial Events - IronSourceInterstitialEvents.onAdReadyEvent += InterstitialOnAdReadyEvent; - IronSourceInterstitialEvents.onAdLoadFailedEvent += InterstitialOnAdLoadFailed; - IronSourceInterstitialEvents.onAdOpenedEvent += InterstitialOnAdOpenedEvent; - IronSourceInterstitialEvents.onAdClickedEvent += InterstitialOnAdClickedEvent; - IronSourceInterstitialEvents.onAdShowSucceededEvent += InterstitialOnAdShowSucceededEvent; - IronSourceInterstitialEvents.onAdShowFailedEvent += InterstitialOnAdShowFailedEvent; - IronSourceInterstitialEvents.onAdClosedEvent += InterstitialOnAdClosedEvent; - - //Add AdInfo Banner Events - IronSourceBannerEvents.onAdLoadedEvent += BannerOnAdLoadedEvent; - IronSourceBannerEvents.onAdLoadFailedEvent += BannerOnAdLoadFailedEvent; - IronSourceBannerEvents.onAdClickedEvent += BannerOnAdClickedEvent; - IronSourceBannerEvents.onAdScreenPresentedEvent += BannerOnAdScreenPresentedEvent; - IronSourceBannerEvents.onAdScreenDismissedEvent += BannerOnAdScreenDismissedEvent; - IronSourceBannerEvents.onAdLeftApplicationEvent += BannerOnAdLeftApplicationEvent; - - } - - void OnApplicationPause(bool isPaused) - { - Debug.Log("unity-script: OnApplicationPause = " + isPaused); - IronSource.Agent.onApplicationPause(isPaused); - } - - public void OnGUI() - { - - GUI.backgroundColor = Color.blue; - GUI.skin.button.fontSize = (int)(0.035f * Screen.width); - - - - - - Rect showRewardedVideoButton = new Rect(0.10f * Screen.width, 0.15f * Screen.height, 0.80f * Screen.width, 0.08f * Screen.height); - if (GUI.Button(showRewardedVideoButton, "Show Rewarded Video")) - { - Debug.Log("unity-script: ShowRewardedVideoButtonClicked"); - if (IronSource.Agent.isRewardedVideoAvailable()) - { - IronSource.Agent.showRewardedVideo(); - } - else - { - Debug.Log("unity-script: IronSource.Agent.isRewardedVideoAvailable - False"); - } - } - - - - Rect showOfferwallButton = new Rect(0.10f * Screen.width, 0.25f * Screen.height, 0.80f * Screen.width, 0.08f * Screen.height); - if (GUI.Button(showOfferwallButton, "Show Offerwall")) - { - if (IronSource.Agent.isOfferwallAvailable()) - { - IronSource.Agent.showOfferwall(); - } - else - { - Debug.Log("IronSource.Agent.isOfferwallAvailable - False"); - } - } - - Rect loadInterstitialButton = new Rect(0.10f * Screen.width, 0.35f * Screen.height, 0.35f * Screen.width, 0.08f * Screen.height); - if (GUI.Button(loadInterstitialButton, "Load Interstitial")) - { - Debug.Log("unity-script: LoadInterstitialButtonClicked"); - IronSource.Agent.loadInterstitial(); - } - - Rect showInterstitialButton = new Rect(0.55f * Screen.width, 0.35f * Screen.height, 0.35f * Screen.width, 0.08f * Screen.height); - if (GUI.Button(showInterstitialButton, "Show Interstitial")) - { - Debug.Log("unity-script: ShowInterstitialButtonClicked"); - if (IronSource.Agent.isInterstitialReady()) - { - IronSource.Agent.showInterstitial(); - } - else - { - Debug.Log("unity-script: IronSource.Agent.isInterstitialReady - False"); - } - } - - Rect loadBannerButton = new Rect(0.10f * Screen.width, 0.45f * Screen.height, 0.35f * Screen.width, 0.08f * Screen.height); - if (GUI.Button(loadBannerButton, "Load Banner")) - { - Debug.Log("unity-script: loadBannerButtonClicked"); - IronSource.Agent.loadBanner(IronSourceBannerSize.BANNER, IronSourceBannerPosition.BOTTOM); - } - - Rect destroyBannerButton = new Rect(0.55f * Screen.width, 0.45f * Screen.height, 0.35f * Screen.width, 0.08f * Screen.height); - if (GUI.Button(destroyBannerButton, "Destroy Banner")) - { - Debug.Log("unity-script: loadBannerButtonClicked"); - IronSource.Agent.destroyBanner(); - } - - - - - } - - #region Init callback handlers - - void SdkInitializationCompletedEvent() - { - Debug.Log("unity-script: I got SdkInitializationCompletedEvent"); - } - - #endregion - - #region AdInfo Rewarded Video - void ReardedVideoOnAdOpenedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got ReardedVideoOnAdOpenedEvent With AdInfo " + adInfo.ToString()); - } - void ReardedVideoOnAdClosedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got ReardedVideoOnAdClosedEvent With AdInfo " + adInfo.ToString()); - } - void ReardedVideoOnAdAvailable(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got ReardedVideoOnAdAvailable With AdInfo " + adInfo.ToString()); - } - void ReardedVideoOnAdUnavailable() - { - Debug.Log("unity-script: I got ReardedVideoOnAdUnavailable"); - } - void ReardedVideoOnAdShowFailedEvent(IronSourceError ironSourceError,IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoAdOpenedEvent With Error"+ironSourceError.ToString() + "And AdInfo " + adInfo.ToString()); - } - void ReardedVideoOnAdRewardedEvent(IronSourcePlacement ironSourcePlacement,IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got ReardedVideoOnAdRewardedEvent With Placement" + ironSourcePlacement.ToString()+ "And AdInfo " + adInfo.ToString()); - } - void ReardedVideoOnAdClickedEvent(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got ReardedVideoOnAdClickedEvent With Placement" + ironSourcePlacement.ToString() + "And AdInfo " + adInfo.ToString()); - } - - #endregion - - - - #region RewardedAd callback handlers - - void RewardedVideoAvailabilityChangedEvent(bool canShowAd) - { - Debug.Log("unity-script: I got RewardedVideoAvailabilityChangedEvent, value = " + canShowAd); - } - - void RewardedVideoAdOpenedEvent() - { - Debug.Log("unity-script: I got RewardedVideoAdOpenedEvent"); - } - - void RewardedVideoAdRewardedEvent(IronSourcePlacement ssp) - { - Debug.Log("unity-script: I got RewardedVideoAdRewardedEvent, amount = " + ssp.getRewardAmount() + " name = " + ssp.getRewardName()); - - } - - void RewardedVideoAdClosedEvent() - { - Debug.Log("unity-script: I got RewardedVideoAdClosedEvent"); - } - - void RewardedVideoAdStartedEvent() - { - Debug.Log("unity-script: I got RewardedVideoAdStartedEvent"); - } - - void RewardedVideoAdEndedEvent() - { - Debug.Log("unity-script: I got RewardedVideoAdEndedEvent"); - } - - void RewardedVideoAdShowFailedEvent(IronSourceError error) - { - Debug.Log("unity-script: I got RewardedVideoAdShowFailedEvent, code : " + error.getCode() + ", description : " + error.getDescription()); - } - - void RewardedVideoAdClickedEvent(IronSourcePlacement ssp) - { - Debug.Log("unity-script: I got RewardedVideoAdClickedEvent, name = " + ssp.getRewardName()); - } - - /************* RewardedVideo DemandOnly Delegates *************/ - - void RewardedVideoAdLoadedDemandOnlyEvent(string instanceId) - { - - Debug.Log("unity-script: I got RewardedVideoAdLoadedDemandOnlyEvent for instance: " + instanceId); - } - - void RewardedVideoAdLoadFailedDemandOnlyEvent(string instanceId, IronSourceError error) - { - - Debug.Log("unity-script: I got RewardedVideoAdLoadFailedDemandOnlyEvent for instance: " + instanceId + ", code : " + error.getCode() + ", description : " + error.getDescription()); - } - - void RewardedVideoAdOpenedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got RewardedVideoAdOpenedDemandOnlyEvent for instance: " + instanceId); - } - - void RewardedVideoAdRewardedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got RewardedVideoAdRewardedDemandOnlyEvent for instance: " + instanceId); - } - - void RewardedVideoAdClosedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got RewardedVideoAdClosedDemandOnlyEvent for instance: " + instanceId); - } - - void RewardedVideoAdShowFailedDemandOnlyEvent(string instanceId, IronSourceError error) - { - Debug.Log("unity-script: I got RewardedVideoAdShowFailedDemandOnlyEvent for instance: " + instanceId + ", code : " + error.getCode() + ", description : " + error.getDescription()); - } - - void RewardedVideoAdClickedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got RewardedVideoAdClickedDemandOnlyEvent for instance: " + instanceId); - } - - - #endregion - - #region AdInfo Interstitial - - void InterstitialOnAdReadyEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got InterstitialOnAdReadyEvent With AdInfo " + adInfo.ToString()); - } - - void InterstitialOnAdLoadFailed(IronSourceError ironSourceError) { - Debug.Log("unity-script: I got InterstitialOnAdLoadFailed With Error " + ironSourceError.ToString()); - } - - void InterstitialOnAdOpenedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got InterstitialOnAdOpenedEvent With AdInfo " + adInfo.ToString()); - } - - void InterstitialOnAdClickedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got InterstitialOnAdClickedEvent With AdInfo " + adInfo.ToString()); - } - - void InterstitialOnAdShowSucceededEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got InterstitialOnAdShowSucceededEvent With AdInfo " + adInfo.ToString()); - } - - void InterstitialOnAdShowFailedEvent(IronSourceError ironSourceError, IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got InterstitialOnAdShowFailedEvent With Error " +ironSourceError.ToString()+ " And AdInfo " + adInfo.ToString()); - } - - void InterstitialOnAdClosedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got InterstitialOnAdClosedEvent With AdInfo " + adInfo.ToString()); - } - - - #endregion - - #region Interstitial callback handlers - - void InterstitialAdReadyEvent() - { - Debug.Log("unity-script: I got InterstitialAdReadyEvent"); - } - - void InterstitialAdLoadFailedEvent(IronSourceError error) - { - Debug.Log("unity-script: I got InterstitialAdLoadFailedEvent, code: " + error.getCode() + ", description : " + error.getDescription()); - } - - void InterstitialAdShowSucceededEvent() - { - Debug.Log("unity-script: I got InterstitialAdShowSucceededEvent"); - } - - void InterstitialAdShowFailedEvent(IronSourceError error) - { - Debug.Log("unity-script: I got InterstitialAdShowFailedEvent, code : " + error.getCode() + ", description : " + error.getDescription()); - } - - void InterstitialAdClickedEvent() - { - Debug.Log("unity-script: I got InterstitialAdClickedEvent"); - } - - void InterstitialAdOpenedEvent() - { - Debug.Log("unity-script: I got InterstitialAdOpenedEvent"); - } - - void InterstitialAdClosedEvent() - { - Debug.Log("unity-script: I got InterstitialAdClosedEvent"); - } - - /************* Interstitial DemandOnly Delegates *************/ - - void InterstitialAdReadyDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got InterstitialAdReadyDemandOnlyEvent for instance: " + instanceId); - } - - void InterstitialAdLoadFailedDemandOnlyEvent(string instanceId, IronSourceError error) - { - Debug.Log("unity-script: I got InterstitialAdLoadFailedDemandOnlyEvent for instance: " + instanceId + ", error code: " + error.getCode() + ",error description : " + error.getDescription()); - } - - void InterstitialAdShowFailedDemandOnlyEvent(string instanceId, IronSourceError error) - { - Debug.Log("unity-script: I got InterstitialAdShowFailedDemandOnlyEvent for instance: " + instanceId + ", error code : " + error.getCode() + ",error description : " + error.getDescription()); - } - - void InterstitialAdClickedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got InterstitialAdClickedDemandOnlyEvent for instance: " + instanceId); - } - - void InterstitialAdOpenedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got InterstitialAdOpenedDemandOnlyEvent for instance: " + instanceId); - } - - void InterstitialAdClosedDemandOnlyEvent(string instanceId) - { - Debug.Log("unity-script: I got InterstitialAdClosedDemandOnlyEvent for instance: " + instanceId); - } - - - - - #endregion - - #region Banner AdInfo - - void BannerOnAdLoadedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got BannerOnAdLoadedEvent With AdInfo " + adInfo.ToString()); - } - - void BannerOnAdLoadFailedEvent(IronSourceError ironSourceError) { - Debug.Log("unity-script: I got BannerOnAdLoadFailedEvent With Error " + ironSourceError.ToString()); - } - - void BannerOnAdClickedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got BannerOnAdClickedEvent With AdInfo " + adInfo.ToString()); - } - - void BannerOnAdScreenPresentedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got BannerOnAdScreenPresentedEvent With AdInfo " + adInfo.ToString()); - } - - void BannerOnAdScreenDismissedEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got BannerOnAdScreenDismissedEvent With AdInfo " + adInfo.ToString()); - } - - void BannerOnAdLeftApplicationEvent(IronSourceAdInfo adInfo) { - Debug.Log("unity-script: I got BannerOnAdLeftApplicationEvent With AdInfo " + adInfo.ToString()); - } - - #endregion - - #region Banner callback handlers - - void BannerAdLoadedEvent() - { - Debug.Log("unity-script: I got BannerAdLoadedEvent"); - } - - void BannerAdLoadFailedEvent(IronSourceError error) - { - Debug.Log("unity-script: I got BannerAdLoadFailedEvent, code: " + error.getCode() + ", description : " + error.getDescription()); - } - - void BannerAdClickedEvent() - { - Debug.Log("unity-script: I got BannerAdClickedEvent"); - } - - void BannerAdScreenPresentedEvent() - { - Debug.Log("unity-script: I got BannerAdScreenPresentedEvent"); - } - - void BannerAdScreenDismissedEvent() - { - Debug.Log("unity-script: I got BannerAdScreenDismissedEvent"); - } - - void BannerAdLeftApplicationEvent() - { - Debug.Log("unity-script: I got BannerAdLeftApplicationEvent"); - } - - #endregion - - - #region Offerwall callback handlers - - void OfferwallOpenedEvent() - { - Debug.Log("I got OfferwallOpenedEvent"); - } - - void OfferwallClosedEvent() - { - Debug.Log("I got OfferwallClosedEvent"); - } - - void OfferwallShowFailedEvent(IronSourceError error) - { - Debug.Log("I got OfferwallShowFailedEvent, code : " + error.getCode() + ", description : " + error.getDescription()); - } - - void OfferwallAdCreditedEvent(Dictionary dict) - { - Debug.Log("I got OfferwallAdCreditedEvent, current credits = " + dict["credits"] + " totalCredits = " + dict["totalCredits"]); - - } - - void GetOfferwallCreditsFailedEvent(IronSourceError error) - { - Debug.Log("I got GetOfferwallCreditsFailedEvent, code : " + error.getCode() + ", description : " + error.getDescription()); - } - - void OfferwallAvailableEvent(bool canShowOfferwal) - { - Debug.Log("I got OfferwallAvailableEvent, value = " + canShowOfferwal); - - } - - #endregion - - #region ImpressionSuccess callback handler - - void ImpressionSuccessEvent(IronSourceImpressionData impressionData) - { - Debug.Log("unity - script: I got ImpressionSuccessEvent ToString(): " + impressionData.ToString()); - Debug.Log("unity - script: I got ImpressionSuccessEvent allData: " + impressionData.allData); - } - - void ImpressionDataReadyEvent(IronSourceImpressionData impressionData) - { - Debug.Log("unity - script: I got ImpressionDataReadyEvent ToString(): " + impressionData.ToString()); - Debug.Log("unity - script: I got ImpressionDataReadyEvent allData: " + impressionData.allData); - } - - #endregion - -} diff --git a/Assets/IronSource/DemoScene/IronSourceDemoScript.cs.meta b/Assets/IronSource/DemoScene/IronSourceDemoScript.cs.meta deleted file mode 100644 index 39100480..00000000 --- a/Assets/IronSource/DemoScene/IronSourceDemoScript.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 191f5798a75bd42589f98898505e981f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/DemoScene/logo_small.png b/Assets/IronSource/DemoScene/logo_small.png deleted file mode 100644 index 6dcdd635..00000000 Binary files a/Assets/IronSource/DemoScene/logo_small.png and /dev/null differ diff --git a/Assets/IronSource/DemoScene/logo_small.png.meta b/Assets/IronSource/DemoScene/logo_small.png.meta deleted file mode 100644 index 22277c17..00000000 --- a/Assets/IronSource/DemoScene/logo_small.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 5e326581693fd4e0db4c590543c3edc4 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor.meta b/Assets/IronSource/Editor.meta deleted file mode 100644 index 477ac117..00000000 --- a/Assets/IronSource/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 34c3ff4f8153c4d1daa04ec97e7ec323 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IAdapterSettings.cs b/Assets/IronSource/Editor/IAdapterSettings.cs deleted file mode 100644 index efb7a93f..00000000 --- a/Assets/IronSource/Editor/IAdapterSettings.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEditor; - -namespace IronSource.Editor -{ - public interface IAdapterSettings - { - void updateProject(BuildTarget buildTarget, string projectPath); - void updateProjectPlist(BuildTarget buildTarget, string plistPath); - } -} \ No newline at end of file diff --git a/Assets/IronSource/Editor/IAdapterSettings.cs.meta b/Assets/IronSource/Editor/IAdapterSettings.cs.meta deleted file mode 100644 index 3430f83a..00000000 --- a/Assets/IronSource/Editor/IAdapterSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f54b8169c1644296a557ad386705e4c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceBuildPostprocessor.cs b/Assets/IronSource/Editor/IronSourceBuildPostprocessor.cs deleted file mode 100644 index 566eec4e..00000000 --- a/Assets/IronSource/Editor/IronSourceBuildPostprocessor.cs +++ /dev/null @@ -1,88 +0,0 @@ -#if UNITY_IOS - -using UnityEngine; -using UnityEditor; -using UnityEditor.Callbacks; -using UnityEditor.iOS.Xcode; -using System; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using System.Reflection; - -namespace IronSource.Editor -{ - public class IronSourceBuildPostprocessor - { - [PostProcessBuild] - public static void OnPostprocessBuild (BuildTarget buildTarget, string buildPath) - { - if (buildTarget == BuildTarget.iOS) { - string projectPath = buildPath + "/Unity-iPhone.xcodeproj/project.pbxproj"; - string dirpath = Application.dataPath + "/IronSource/Editor/"; - string currentNamespace = MethodBase.GetCurrentMethod().DeclaringType.Namespace; - - updateProject (buildTarget, projectPath); - - if (Directory.Exists (dirpath)) { - //Match the classes that has "Settings" in their name, and don't start with "I" - var files = Directory.GetFiles (dirpath, "*.cs", SearchOption.TopDirectoryOnly).Where (file => Regex.IsMatch (Path.GetFileName (file), "^(?!(IAdapter|IronSource)).+Settings.*$")); - - //Go over all the adapter settings classes, and call their updateProject method - foreach (string file in files) { - string classname = Path.GetFileNameWithoutExtension (file); - - if (!String.IsNullOrEmpty (classname)) { - IAdapterSettings adapter = (IAdapterSettings)Activator.CreateInstance (Type.GetType (currentNamespace + "." + classname)); - adapter.updateProject (buildTarget, projectPath); - } - } - } - } - - Debug.Log ("IronSource build postprocessor finished"); - } - - private static void updateProject (BuildTarget buildTarget, string projectPath) - { - Debug.Log ("IronSource - Update project for IronSource"); - - PBXProject project = new PBXProject (); - project.ReadFromString (File.ReadAllText (projectPath)); - - string targetId; -#if UNITY_2019_3_OR_NEWER - targetId = project.GetUnityMainTargetGuid(); -#else - targetId = project.TargetGuidByName(PBXProject.GetUnityTargetName()); -#endif - - // Required System Frameworks - project.AddFrameworkToProject (targetId, "AdSupport.framework", false); - project.AddFrameworkToProject (targetId, "AudioToolbox.framework", false); - project.AddFrameworkToProject (targetId, "AVFoundation.framework", false); - project.AddFrameworkToProject (targetId, "CoreGraphics.framework", false); - project.AddFrameworkToProject (targetId, "CoreMedia.framework", false); - project.AddFrameworkToProject (targetId, "CoreTelephony.framework", false); - project.AddFrameworkToProject (targetId, "CoreVideo.framework", false); - project.AddFrameworkToProject (targetId, "CFNetwork.framework", false); - project.AddFrameworkToProject (targetId, "Foundation.framework", false); - project.AddFrameworkToProject (targetId, "MobileCoreServices.framework", false); - project.AddFrameworkToProject (targetId, "QuartzCore.framework", false); - project.AddFrameworkToProject (targetId, "Security.framework", false); - project.AddFrameworkToProject (targetId, "StoreKit.framework", false); - project.AddFrameworkToProject (targetId, "SystemConfiguration.framework", false); - project.AddFrameworkToProject (targetId, "WebKit.framework", false); - - - project.AddFileToBuild (targetId, project.AddFile ("usr/lib/libz.tbd", "Frameworks/libz.tbd", PBXSourceTree.Sdk)); - - // Custom Link Flag - project.AddBuildProperty (targetId, "OTHER_LDFLAGS", "-ObjC"); - - File.WriteAllText (projectPath, project.WriteToString ()); - } - } -} -#endif - diff --git a/Assets/IronSource/Editor/IronSourceBuildPostprocessor.cs.meta b/Assets/IronSource/Editor/IronSourceBuildPostprocessor.cs.meta deleted file mode 100644 index 7d9010f0..00000000 --- a/Assets/IronSource/Editor/IronSourceBuildPostprocessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 86dba1de3972d4e12bf4394b00bc57c0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceDependenciesManager.cs b/Assets/IronSource/Editor/IronSourceDependenciesManager.cs deleted file mode 100644 index 544d96eb..00000000 --- a/Assets/IronSource/Editor/IronSourceDependenciesManager.cs +++ /dev/null @@ -1,607 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Text.RegularExpressions; -using System.Xml; -using IronSourceJSON; -using UnityEditor; -using UnityEngine; -using UnityEngine.Networking; - -public class IronSourceDependenciesManager : EditorWindow -{ - private readonly SortedSet providersSet = new SortedSet(new ProviderInfoComparor()); - private ProviderInfo ironSourceProviderInfo; - private ProviderInfo unityAdsProviderInfo; - private UnityWebRequest downloadWebClient; - private string messageData; - private IronSourceEditorCoroutines mEditorCoroutines; - private static string latestUnitySDKVersion; - - private GUIStyle headerStyle; - private GUIStyle textStyle; - private GUIStyle boldTextStyle; - private readonly GUILayoutOption buttonWidth = GUILayout.Width(90); - - public class ProviderInfo - { - public Status currentStatues; - public string providerName; - public string currentUnityVersion; - public string latestUnityVersion; - public string latestUnityAdsVersion; - public string downloadURL; - public string displayProviderName; - public bool isNewProvider; - public string fileName; - public Dictionary sdkVersionDic; - - public ProviderInfo() - { - isNewProvider = false; - fileName = string.Empty; - downloadURL = string.Empty; - currentUnityVersion = IronSourceDependenciesManagerConstants.NONE; - sdkVersionDic = new Dictionary(); - } - - public enum Status - { - INSTALLED = 1, - NONE = 2, - UPDATED = 3 - } - - public bool SetProviderDataProperties(string provider, Dictionary providerData, Dictionary providerXML) - { - providerName = provider; - object obj; - - if (providerData.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_KEY_NAME, out obj)) - { - displayProviderName = obj as string; - } - else { displayProviderName = providerName; } - - if (providerData.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_IS_NEW, out obj)) - { - isNewProvider = bool.Parse(obj as string); - } - - if (providerXML.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_DOWNLOAD_URL, out obj)) - { - downloadURL = obj as string; - } - - if (providerXML.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_FILE_NAME, out obj)) - { - fileName = obj as string; - } - - if (providerData.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_ANDROID_SDK_VER, out obj)) - { - sdkVersionDic.Add(IronSourceDependenciesManagerConstants.ANDROID, obj as string); - } - - if (providerData.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_IOS_SDK_VER, out obj)) - { - sdkVersionDic.Add(IronSourceDependenciesManagerConstants.IOS, obj as string); - } - - if (providerData.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_UNITY_ADAPTER_VERSION, out obj)) - { - if ((providerName.ToLower() != IronSourceDependenciesManagerConstants.IRONSOURCE)) - { - latestUnityVersion = obj as string; - - } - else - { - latestUnityVersion = latestUnitySDKVersion; - } - - downloadURL = downloadURL.Replace(IronSourceDependenciesManagerConstants.UNITY_ADAPTER_MACRO, latestUnityVersion); - } - - if (providerData.TryGetValue(IronSourceDependenciesManagerConstants.PROVIDER_UNITY_ADAPTER_VERSION, out obj)) - { - if ((providerName.ToLower() == IronSourceDependenciesManagerConstants.UNITYADS)) - { - latestUnityAdsVersion = obj as string; - } - - - downloadURL = downloadURL.Replace(IronSourceDependenciesManagerConstants.UNITY_ADAPTER_MACRO, latestUnityVersion); - } - - currentUnityVersion = GetVersionFromXML(fileName); - - if (currentUnityVersion.Equals(IronSourceDependenciesManagerConstants.NONE)) - { - currentStatues = Status.NONE; - } - - else - { - if (isNewerVersion(currentUnityVersion, latestUnityVersion)) - { - currentStatues = Status.INSTALLED; - } - else - { - currentStatues = Status.UPDATED; - } - } - - return true; - } - } - - private static string GetVersionFromXML(string fileName) - { - XmlDocument xmlDoc = new XmlDocument(); - string version = IronSourceDependenciesManagerConstants.NONE; - try - { - xmlDoc.LoadXml(File.ReadAllText(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR + fileName)); - } - catch (Exception) - { - return version; - } - var unityVersion = xmlDoc.SelectSingleNode(IronSourceDependenciesManagerConstants.IRONSOURCE_XML_PATH); - if (unityVersion != null) - { - return (unityVersion.InnerText); - } - File.Delete(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR + fileName); - return version; - } - - - private IEnumerator SetProviderData() - { - UnityWebRequest unityWebRequestLinkJson = UnityWebRequest.Get(IronSourceDependenciesManagerConstants.IRONSOURCE_SDK_XML_LINKS); - UnityWebRequest unityWebRequesInfoJson = UnityWebRequest.Get(IronSourceDependenciesManagerConstants.IRONSOURCE_SDK_INFO); - var webRequestLinks = unityWebRequestLinkJson.SendWebRequest(); - var webRequestSDKInfo = unityWebRequesInfoJson.SendWebRequest(); - - while (!webRequestLinks.isDone || !webRequestSDKInfo.isDone) - { - yield return new WaitForSeconds(0.1f); - } - -#if UNITY_2020_1_OR_NEWER - if (unityWebRequestLinkJson.result != UnityWebRequest.Result.ProtocolError && unityWebRequesInfoJson.result != UnityWebRequest.Result.ProtocolError) -#else - if (!unityWebRequestLinkJson.isHttpError && !unityWebRequestLinkJson.isNetworkError && !unityWebRequesInfoJson.isError && !unityWebRequesInfoJson.isHttpError) -#endif - { - string linksJson = unityWebRequestLinkJson.downloadHandler.text; - string SDKInfoJson = unityWebRequesInfoJson.downloadHandler.text; - providersSet.Clear(); - - Dictionary linksDictionary = new Dictionary(); - Dictionary SDKInfoDictionary = new Dictionary(); - try - { - linksDictionary = Json.Deserialize(linksJson) as Dictionary; - SDKInfoDictionary = Json.Deserialize(SDKInfoJson) as Dictionary; - } - - catch (Exception e) - { - Debug.Log("Error getting response " + e.ToString()); - } - - if (SDKInfoDictionary != null && SDKInfoDictionary.Count != 0 && linksDictionary != null && linksDictionary.Count != 0) - { - string requiredVersion; - object providersJson; - - ironSourceProviderInfo = new ProviderInfo(); - unityAdsProviderInfo = new ProviderInfo(); - ironSourceProviderInfo.currentUnityVersion = GetVersionFromXML(IronSourceDependenciesManagerConstants.IRONSOURCE_XML); - - SDKInfoDictionary.TryGetValue(IronSourceDependenciesManagerConstants.LATEST_SDK_VERSION, out providersJson); - latestUnitySDKVersion = providersJson.ToString(); - ironSourceProviderInfo.latestUnityVersion = providersJson.ToString(); - - - requiredVersion = (ironSourceProviderInfo.currentUnityVersion == IronSourceDependenciesManagerConstants.NONE) ? ironSourceProviderInfo.latestUnityVersion : ironSourceProviderInfo.currentUnityVersion; - - if (SDKInfoDictionary.TryGetValue(requiredVersion, out providersJson)) - { - if (providersJson != null) - { - foreach (var item in providersJson as Dictionary) - { - ProviderInfo info = new ProviderInfo(); - - object providerXML; - var lowerCaseItem = item.Key.ToLower(new System.Globalization.CultureInfo("en")); - - linksDictionary.TryGetValue(lowerCaseItem, out providerXML); - - if (info.SetProviderDataProperties(item.Key, item.Value as Dictionary, providerXML as Dictionary)) - { - if (item.Key.ToLower().Contains(IronSourceDependenciesManagerConstants.IRONSOURCE)) - { - ironSourceProviderInfo.displayProviderName = info.displayProviderName; - ironSourceProviderInfo.downloadURL = info.downloadURL; - ironSourceProviderInfo.providerName = info.providerName; - ironSourceProviderInfo.sdkVersionDic = info.sdkVersionDic; - ironSourceProviderInfo.fileName = info.fileName; - ironSourceProviderInfo.currentStatues = info.currentStatues; - - } - - else - { - if (item.Key.ToLower().Contains(IronSourceDependenciesManagerConstants.UNITYADS)) { - if (item.Key.ToLower().Contains(IronSourceDependenciesManagerConstants.UNITYADS)) - { - - if (File.Exists(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR + IronSourceDependenciesManagerConstants.UNITYADS_XML)) - { - unityAdsProviderInfo.currentUnityVersion = GetVersionFromXML(IronSourceDependenciesManagerConstants.UNITYADS_XML); - unityAdsProviderInfo.latestUnityVersion = info.latestUnityAdsVersion; - } - else { - unityAdsProviderInfo.currentUnityVersion = "none"; - } - - - unityAdsProviderInfo.latestUnityVersion = info.latestUnityAdsVersion; - unityAdsProviderInfo.displayProviderName = info.displayProviderName; - unityAdsProviderInfo.downloadURL = info.downloadURL; - unityAdsProviderInfo.providerName = info.providerName; - unityAdsProviderInfo.sdkVersionDic = info.sdkVersionDic; - unityAdsProviderInfo.fileName = info.fileName; - unityAdsProviderInfo.currentStatues = info.currentStatues; - - } - } else { - providersSet.Add(info); - } - - } - } - } - } - } - - if (ironSourceProviderInfo.currentStatues == ProviderInfo.Status.INSTALLED || ironSourceProviderInfo.currentStatues == ProviderInfo.Status.NONE) - { - if (SDKInfoDictionary.TryGetValue(IronSourceDependenciesManagerConstants.UPDATE_MSG, out providersJson)) - { - messageData = providersJson.ToString(); - } - } - else - { - if (SDKInfoDictionary.TryGetValue(IronSourceDependenciesManagerConstants.LATEST_MSG, out providersJson)) - { - messageData = providersJson.ToString(); - } - } - } - } - - Repaint(); - } - - private void CancelDownload() - { - // if downloader object is still active - if (downloadWebClient != null) - { - downloadWebClient.Abort(); - return; - } - - if (mEditorCoroutines != null) - { - mEditorCoroutines.StopEditorCoroutine(); - mEditorCoroutines = null; - } - - downloadWebClient = null; - } - - public static void ShowISDependenciesManager() - { - var win = GetWindowWithRect(new Rect(0, 0, IronSourceDependenciesManagerConstants.WIDTH, IronSourceDependenciesManagerConstants.HEIGHT), true); - win.titleContent = new GUIContent(IronSourceDependenciesManagerConstants.INTERGRATION_MANAGER_TITLE); - win.Focus(); - } - - void Awake() - { - headerStyle = new GUIStyle(EditorStyles.label) - { - fontStyle = FontStyle.Bold, - fontSize = 14, - fixedHeight = 20, - stretchWidth = true, - fixedWidth = IronSourceDependenciesManagerConstants.WIDTH / 4 + 5, - clipping = TextClipping.Overflow, - alignment = TextAnchor.MiddleLeft - }; - textStyle = new GUIStyle(EditorStyles.label) - { - fontStyle = FontStyle.Normal, - alignment = TextAnchor.MiddleLeft - - }; - boldTextStyle = new GUIStyle(EditorStyles.label) - { - fontStyle = FontStyle.Bold - }; - CancelDownload(); - } - - private void OnEnable() - { - mEditorCoroutines = IronSourceEditorCoroutines.StartEditorCoroutine(SetProviderData()); - } - - private void OnDestroy() - { - CancelDownload(); - AssetDatabase.Refresh(); - } - - void DrawProviderItem(ProviderInfo providerData) - { - if (!providerData.Equals(default(ProviderInfo))) - { - using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false))) - { - GUI.enabled = true; - bool isNew = providerData.isNewProvider; - string isNewAddition = isNew ? IronSourceDependenciesManagerConstants.NEW_NETWORK : string.Empty; - - string tooltipText = IronSourceDependenciesManagerConstants.TOOLTIP_LATEST_VERSION + " \n " + providerData.providerName + " " + IronSourceDependenciesManagerConstants.TOOLTIP_ADAPTER_VERSION + " " + providerData.latestUnityVersion; - if (providerData.sdkVersionDic.TryGetValue(IronSourceDependenciesManagerConstants.ANDROID, out string androidVersion)) - { - tooltipText = tooltipText + "\n " + IronSourceDependenciesManagerConstants.TOOLTIP_ANDROID_SDK + " " + androidVersion; - } - if (providerData.sdkVersionDic.TryGetValue(IronSourceDependenciesManagerConstants.IOS, out string iosVersion)) - { - tooltipText = tooltipText + "\n " + IronSourceDependenciesManagerConstants.TOOLTIP_IOS_SDK + " " + iosVersion; - } - - EditorGUILayout.LabelField(providerData.displayProviderName + isNewAddition, isNew ? boldTextStyle : textStyle); - EditorGUILayout.LabelField(providerData.currentUnityVersion, textStyle); - EditorGUILayout.LabelField(providerData.latestUnityVersion, textStyle); - - string downloadButtonText; - - switch (providerData.currentStatues) - { - case ProviderInfo.Status.NONE: - downloadButtonText = IronSourceDependenciesManagerConstants.LABEL_INSTALL; - break; - case ProviderInfo.Status.INSTALLED: - downloadButtonText = IronSourceDependenciesManagerConstants.LABEL_UPDATE; - break; - - default: - downloadButtonText = IronSourceDependenciesManagerConstants.LABEL_UPDATED; - GUI.enabled = false; - break; - } - - GUIContent gUIContent = new GUIContent - { - text = downloadButtonText, - tooltip = tooltipText - }; - - bool btn = GUILayout.Button(gUIContent, buttonWidth); - if (btn && downloadWebClient == null) - { - GUI.enabled = true; - IronSourceEditorCoroutines.StartEditorCoroutine(DownloadFile(providerData.downloadURL)); - } - - GUILayout.Space(5); - GUI.enabled = true; - } - } - } - - void OnGUI() - { - if (ironSourceProviderInfo == null) - { - GUILayout.Label(IronSourceDependenciesManagerConstants.ERROR_NOT_AVAILABLE); - return; - } - - GUILayout.Space(10); - using (new EditorGUILayout.VerticalScope("box")) - { - DrawSDKHeader(); - GUILayout.Space(5); - GUILayout.BeginHorizontal(); - DrawProviderItem(ironSourceProviderInfo); - GUILayout.Space(5); - GUILayout.EndHorizontal(); - GUILayout.Space(5); - GUILayout.BeginHorizontal(); - DrawProviderItem(unityAdsProviderInfo); - GUILayout.Space(5); - GUILayout.EndHorizontal(); - GUILayout.Space(5); - } - - GUILayout.Space(15); - DrawAdaptersHeader(); - GUILayout.Space(15); - - foreach (var provider in providersSet) - { - DrawProviderItem(provider); - GUILayout.Space(2); - } - GUILayout.Space(30); - if (!string.IsNullOrEmpty(messageData)) - { - using (new EditorGUILayout.VerticalScope("box", GUILayout.ExpandHeight(true))) - { - GUILayout.Space(5); - using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false))) - { - EditorGUILayout.SelectableLabel(messageData, EditorStyles.textField, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); - } - GUILayout.Space(5); - } - using (new EditorGUILayout.VerticalScope(GUILayout.ExpandHeight(false))) - { - GUILayout.Space(15); - } - } - - } - - private void DrawSDKHeader() - { - using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false))) - { - EditorGUILayout.LabelField(IronSourceDependenciesManagerConstants.LABEL_CURRENT_SDK, new GUIStyle(EditorStyles.label) - { - fontStyle = FontStyle.Bold, - fontSize = 13, - fixedHeight = 20, - stretchWidth = true, - fixedWidth = IronSourceDependenciesManagerConstants.WIDTH / 4, - clipping = TextClipping.Overflow, - padding = new RectOffset(IronSourceDependenciesManagerConstants.WIDTH / 4 + 15, 0, 0, 0) - }); - GUILayout.Space(85); - EditorGUILayout.LabelField(IronSourceDependenciesManagerConstants.LABEL_LATEST_SDK, new GUIStyle(EditorStyles.label) - { - fontStyle = FontStyle.Bold, - fontSize = 13, - fixedHeight = 20, - stretchWidth = true, - fixedWidth = Screen.width / 4, - clipping = TextClipping.Overflow, - }); - } - } - - private void DrawAdaptersHeader() - { - using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false))) - { - EditorGUILayout.LabelField(IronSourceDependenciesManagerConstants.LABEL_NETWORK, headerStyle); - EditorGUILayout.LabelField(IronSourceDependenciesManagerConstants.LABEL_CURRENT_SDK, headerStyle); - EditorGUILayout.LabelField(IronSourceDependenciesManagerConstants.LABEL_LATEST_SDK, headerStyle); - GUILayout.Space(30); - EditorGUILayout.LabelField(IronSourceDependenciesManagerConstants.LABEL_Action, headerStyle); - } - } - - private IEnumerator DownloadFile(string downloadFileUrl) - { - int fileNameIndex = downloadFileUrl.LastIndexOf("/") + 1; - string downloadFileName = downloadFileUrl.Substring(fileNameIndex); - string fileDownloading = string.Format("Downloading {0}", downloadFileName); - string genericFileName = Regex.Replace(downloadFileName, @"_v+(\d\.\d\.\d\.\d|\d\.\d\.\d)", ""); - string path = Path.Combine(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR, genericFileName); - bool isCancelled = false; - downloadWebClient = new UnityWebRequest(downloadFileUrl); - downloadWebClient.downloadHandler = new DownloadHandlerFile(path); - downloadWebClient.SendWebRequest(); - -#if UNITY_2020_1_OR_NEWER - if (downloadWebClient.result != UnityWebRequest.Result.ProtocolError) -#else - if (!downloadWebClient.isHttpError && !downloadWebClient.isNetworkError) -#endif - { - while (!downloadWebClient.isDone) - { - yield return new WaitForSeconds(0.1f); - if (EditorUtility.DisplayCancelableProgressBar("Download Manager", fileDownloading, downloadWebClient.downloadProgress)) - { - if (downloadWebClient.error != null) - { - Debug.LogError(downloadWebClient.error); - } - CancelDownload(); - isCancelled = true; - } - } - } - else - { - Debug.LogError("Error Downloading " + genericFileName + " : " + downloadWebClient.error); - } - - EditorUtility.ClearProgressBar(); - - if (genericFileName.EndsWith(".unitypackage") && !isCancelled) - { - AssetDatabase.ImportPackage(Path.Combine(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR, genericFileName), true); - } - else - { - // in case the download was cancelled, delete the file - if (isCancelled && File.Exists(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR + genericFileName)) - { - File.Delete(IronSourceDependenciesManagerConstants.IRONSOURCE_DOWNLOAD_DIR + genericFileName); - } - - IronSourceEditorCoroutines.StartEditorCoroutine(SetProviderData()); - } - - //clean the downloadWebClient object regardless of whether the request succeeded or failed - downloadWebClient.Dispose(); - downloadWebClient = null; - - IronSourceEditorCoroutines.StartEditorCoroutine(SetProviderData()); - } - - private static bool isNewerVersion(string current, string latest) - { - bool isNewer = false; - try - { - int[] currentVersion = Array.ConvertAll(current.Split('.'), int.Parse); - int[] remoteVersion = Array.ConvertAll(latest.Split('.'), int.Parse); - int remoteBuild = 0; - int curBuild = 0; - if (currentVersion.Length > 3) - { - curBuild = currentVersion[3]; - } - if (remoteVersion.Length > 3) - { - remoteBuild = remoteVersion[3]; - - } - System.Version cur = new System.Version(currentVersion[0], currentVersion[1], currentVersion[2], curBuild); - System.Version remote = new System.Version(remoteVersion[0], remoteVersion[1], remoteVersion[2], remoteBuild); - isNewer = cur < remote; - } - catch (Exception) - { - - } - return isNewer; - - } - - internal class ProviderInfoComparor : IComparer - { - public int Compare(ProviderInfo x, ProviderInfo y) - { - return x.providerName.CompareTo(y.providerName); - } - } -} diff --git a/Assets/IronSource/Editor/IronSourceDependenciesManager.cs.meta b/Assets/IronSource/Editor/IronSourceDependenciesManager.cs.meta deleted file mode 100644 index bd0fb6f3..00000000 --- a/Assets/IronSource/Editor/IronSourceDependenciesManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 178cc3b63946b4aeea47a9a62e7184e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceDependenciesManagerConstants.cs b/Assets/IronSource/Editor/IronSourceDependenciesManagerConstants.cs deleted file mode 100644 index 5947aecc..00000000 --- a/Assets/IronSource/Editor/IronSourceDependenciesManagerConstants.cs +++ /dev/null @@ -1,55 +0,0 @@ -public static class IronSourceDependenciesManagerConstants -{ - internal const string SDK = "sdk"; - internal const int WIDTH = 760; - internal const int HEIGHT = 760; - internal const string ANDROID = "Android"; - internal const string IOS = "iOS"; - internal const string IRONSOURCE = "ironsource"; - internal const string UNITYADS = "unityads"; - internal const string NONE = "none"; - - //path const - internal const string IRONSOURCE_SDK_INFO = "https://s3.amazonaws.com/ssa.public/Integration-Manager/IronSourceSDKInfo.json"; - internal const string IRONSOURCE_SDK_XML_LINKS = "https://s3.amazonaws.com/ssa.public/Integration-Manager/IronSourceSDKLinks.json"; - internal const string IRONSOURCE_DOWNLOAD_DIR = "Assets/IronSource/Editor/"; - internal const string IRONSOURCE_XML = "IronSourceSDKDependencies.xml"; - internal const string UNITYADS_XML = "ISUnityAdsAdapterDependencies.xml"; - internal const string IRONSOURCE_XML_PATH = "dependencies/unityversion"; - - - //xml macro - internal const string UNITY_ADAPTER_MACRO = "${UnityAdapterVersion}"; - - //jsonInfo keys - internal const string LATEST_SDK_VERSION = "latest"; - internal const string PROVIDER_KEY_NAME = "keyname"; - internal const string PROVIDER_IS_NEW = "isNewProvider"; - internal const string PROVIDER_ANDROID_SDK_VER = "AndroidSDKVersion"; - internal const string PROVIDER_IOS_SDK_VER = "iOSSDKVersion"; - internal const string PROVIDER_UNITY_ADAPTER_VERSION = "UnityAdapterVersion"; - - //jsonlinks keys - internal const string PROVIDER_DOWNLOAD_URL = "DownloadUrl"; - internal const string PROVIDER_FILE_NAME = "FileName"; - - //UI constants - internal const string UPDATE_MSG = "UpdateMessage"; - internal const string LATEST_MSG = "LatestMessage"; - internal const string LABEL_INSTALL = "Install"; - internal const string LABEL_UPDATE = "Update"; - internal const string LABEL_UPDATED = "Updated"; - internal const string LABEL_Action = "Action"; - internal const string LABEL_NETWORK = "Network"; - internal const string LABEL_CURRENT_SDK = "Current Adapter Version"; - internal const string LABEL_LATEST_SDK = "Latest Adapter Version"; - - internal const string TOOLTIP_ANDROID_SDK = "Android SDK version"; - internal const string TOOLTIP_IOS_SDK = "iOS SDK version"; - internal const string TOOLTIP_LATEST_VERSION = "Latest Version:"; - internal const string TOOLTIP_ADAPTER_VERSION = "Adapter Version"; - internal const string NEW_NETWORK = " - New Network"; - - internal const string INTERGRATION_MANAGER_TITLE = "LevelPlay Integration Manager"; - internal const string ERROR_NOT_AVAILABLE = "SDK and adapters data are not available right now. Try again soon."; -} diff --git a/Assets/IronSource/Editor/IronSourceDependenciesManagerConstants.cs.meta b/Assets/IronSource/Editor/IronSourceDependenciesManagerConstants.cs.meta deleted file mode 100644 index 6705b5d4..00000000 --- a/Assets/IronSource/Editor/IronSourceDependenciesManagerConstants.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5e0bdfd009e0d4e0ea8ddeeb30053163 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs b/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs deleted file mode 100644 index 60e26998..00000000 --- a/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs +++ /dev/null @@ -1,37 +0,0 @@ -using UnityEditor; -using System.Collections; - -public class IronSourceEditorCoroutines -{ - readonly IEnumerator mRoutine; - - public static IronSourceEditorCoroutines StartEditorCoroutine( IEnumerator routine) - { - IronSourceEditorCoroutines coroutine = new IronSourceEditorCoroutines(routine); - coroutine.start(); - return coroutine; - } - - IronSourceEditorCoroutines(IEnumerator routine) - { - mRoutine = routine; - } - - void start() - { - EditorApplication.update += update; - } - - void update() - { - if(!mRoutine.MoveNext()) - { - StopEditorCoroutine(); - } - } - - public void StopEditorCoroutine() - { - EditorApplication.update -= update; - } -} diff --git a/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs.meta b/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs.meta deleted file mode 100644 index 621e326a..00000000 --- a/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4e00793f5609c4455b5d65c951f67a8f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceManifestProcessor.cs b/Assets/IronSource/Editor/IronSourceManifestProcessor.cs deleted file mode 100644 index 98ba5252..00000000 --- a/Assets/IronSource/Editor/IronSourceManifestProcessor.cs +++ /dev/null @@ -1,199 +0,0 @@ -#if UNITY_ANDROID -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using System.Xml.Linq; -using UnityEditor; -using UnityEditor.Build; -#if UNITY_2018_1_OR_NEWER -using UnityEditor.Build.Reporting; -#endif -using UnityEngine; - - -#if UNITY_2018_1_OR_NEWER -public class IronSourceManifestProcessor : IPreprocessBuildWithReport -#else -public class IronSourceManifestProcessor : IPreprocessBuild -#endif -{ - private const string META_APPLICATION_ID = "com.google.android.gms.ads.APPLICATION_ID"; - private const string AD_ID_PERMISSION_ATTR = "com.google.android.gms.permission.AD_ID"; - private const string MANIFEST_PERMISSION = "uses-permission"; - private const string MANIFEST_META_DATA = "meta-data"; - private const string IRONSOURCE_MANIFEST_PATH = "IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml"; - private string manifestPath = ""; - private XNamespace ns = "http://schemas.android.com/apk/res/android"; - - public int callbackOrder { get { return 0; } } - -#if UNITY_2018_1_OR_NEWER - public void OnPreprocessBuild(BuildReport report) -#else - public void OnPreprocessBuild(BuildTarget target, string path) -#endif - { - if (File.Exists(IronSourceMediatedNetworkSettings.MEDIATION_SETTINGS_ASSET_PATH) || File.Exists(IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH)) - { - - - XElement elemManifest = ValidateAndroidManifest(); - - XElement elemApplication = elemManifest.Element("application"); - - if (File.Exists(IronSourceMediatedNetworkSettings.MEDIATION_SETTINGS_ASSET_PATH)) - { - string appId = IronSourceMediatedNetworkSettingsInspector.IronSourceMediatedNetworkSettings.AdmobAndroidAppId; - - IEnumerable metas = elemApplication.Descendants() - .Where(elem => elem.Name.LocalName.Equals(MANIFEST_META_DATA)); - - if (IronSourceMediatedNetworkSettingsInspector.IronSourceMediatedNetworkSettings.EnableAdmob) - { - - XElement elemAdMobEnabled = GetMetaElement(metas, META_APPLICATION_ID); - - if (appId.Length == 0) - { - StopBuildWithMessage( - "Android AdMob app ID is empty. Please enter your app ID to run ads properly"); - } - else if (!Regex.IsMatch(appId, "^[a-zA-Z0-9-~]*$")) - { - StopBuildWithMessage( - "Android AdMob app ID is not valid. Please enter a valid app ID to run ads properly"); - } - - else if (elemAdMobEnabled == null) - { - elemApplication.Add(CreateMetaElement(META_APPLICATION_ID, appId)); - } - else - { - elemAdMobEnabled.SetAttributeValue(ns + "value", appId); - } - - } - else if (GetPermissionElement(metas, META_APPLICATION_ID) != null) - { - //remove admob app id in case flag is off - GetPermissionElement(metas, META_APPLICATION_ID).Remove(); - } - } - - if (File.Exists(IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH)) - { - IEnumerable permissons = elemManifest.Descendants().Where(elem => elem.Name.LocalName.Equals(MANIFEST_PERMISSION)); - - if (IronSourceMediationSettingsInspector.IronSourceMediationSettings.DeclareAD_IDPermission && GetPermissionElement(permissons, AD_ID_PERMISSION_ATTR) == null) - { - - elemManifest.Add(CreatePermissionElement(AD_ID_PERMISSION_ATTR)); - } - - else if (GetPermissionElement(permissons, AD_ID_PERMISSION_ATTR) != null && !IronSourceMediationSettingsInspector.IronSourceMediationSettings.DeclareAD_IDPermission) - { - //remove the permission if flag is false - GetPermissionElement(permissons, AD_ID_PERMISSION_ATTR).Remove(); - } - } - manifestPath = Path.Combine(Application.dataPath, IRONSOURCE_MANIFEST_PATH); - elemManifest.Save(manifestPath); - - } - } - - private XElement CreateMetaElement(string name, object value) - { - return new XElement(MANIFEST_META_DATA, - new XAttribute(ns + "name", name), new XAttribute(ns + "value", value)); - } - - private XElement CreatePermissionElement(string name) - { - return new XElement(MANIFEST_PERMISSION, - new XAttribute(ns + "name", name)); - } - - private XElement GetMetaElement(IEnumerable metas, string metaName) - { - foreach (XElement elem in metas) - { - IEnumerable attrs = elem.Attributes(); - foreach (XAttribute attr in attrs) - { - if (attr.Name.Namespace.Equals(ns) - && attr.Name.LocalName.Equals("name") && attr.Value.Equals(metaName)) - { - return elem; - } - } - } - return null; - } - - private XElement GetPermissionElement(IEnumerable manifest, string permissionName) - { - - foreach (XElement elem in manifest) - { - IEnumerable attrs = elem.Attributes(); - foreach (XAttribute attr in attrs) - { - if (attr.Name.Namespace.Equals(ns) - && attr.Name.LocalName.Equals("name") && attr.Value.Equals(permissionName)) - { - return elem; - } - } - } - return null; - } - - private void StopBuildWithMessage(string message) - { - string prefix = "[IronSourceApplicationSettings] "; - - EditorUtility.DisplayDialog( - "IronSource Developer Settings", "Error: " + message, "", ""); -#if UNITY_2017_1_OR_NEWER - throw new System.OperationCanceledException(prefix + message); -#else - throw new OperationCanceledException(prefix + message); -#endif - } - - private XElement ValidateAndroidManifest() - { - - XDocument manifest = null; - try - { - manifestPath = Path.Combine(Application.dataPath, IRONSOURCE_MANIFEST_PATH); - manifest = XDocument.Load(manifestPath); - } -#pragma warning disable 0168 - catch (IOException e) -#pragma warning restore 0168 - { - StopBuildWithMessage("AndroidManifest.xml is missing. Try re-importing the plugin."); - } - - XElement elemManifest = manifest.Element("manifest"); - if (elemManifest == null) - { - StopBuildWithMessage("AndroidManifest.xml is not valid. Try re-importing the plugin."); - } - - XElement elemApplication = elemManifest.Element("application"); - if (elemApplication == null) - { - StopBuildWithMessage("AndroidManifest.xml is not valid. Try re-importing the plugin."); - } - - return elemManifest; - } -} - -#endif diff --git a/Assets/IronSource/Editor/IronSourceManifestProcessor.cs.meta b/Assets/IronSource/Editor/IronSourceManifestProcessor.cs.meta deleted file mode 100644 index f5dc4ab8..00000000 --- a/Assets/IronSource/Editor/IronSourceManifestProcessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ccb964ff1677c41b0a4268a3f6ecf79a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettings.cs b/Assets/IronSource/Editor/IronSourceMediatedNetworkSettings.cs deleted file mode 100644 index 6408d489..00000000 --- a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettings.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.IO; -using UnityEngine; - -public class IronSourceMediatedNetworkSettings : ScriptableObject{ - public static readonly string MEDIATION_SETTINGS_ASSET_PATH = Path.Combine(IronSourceConstants.IRONSOURCE_RESOURCES_PATH, IronSourceConstants.IRONSOURCE_MEDIATED_NETWORK_SETTING_NAME + ".asset"); - - [Header("")] - [Header("AdMob Integration")] - [SerializeField] - [Tooltip("This will add AdMob Application ID to AndroidManifest.xml/info.plist")] - public bool EnableAdmob = false; - - [SerializeField] - [Tooltip("This Will be added to your AndroidManifest.xml")] - public string AdmobAndroidAppId = string.Empty; - - [SerializeField] - [Tooltip("This will be added to your info.plist")] - public string AdmobIOSAppId = string.Empty; -} \ No newline at end of file diff --git a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettings.cs.meta b/Assets/IronSource/Editor/IronSourceMediatedNetworkSettings.cs.meta deleted file mode 100644 index 98201f61..00000000 --- a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6dcd730eacb2043e8a6f1c61c16243da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettingsInspector.cs b/Assets/IronSource/Editor/IronSourceMediatedNetworkSettingsInspector.cs deleted file mode 100644 index a86713f3..00000000 --- a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettingsInspector.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.IO; -using UnityEditor; - -[CustomEditor(typeof(IronSourceMediatedNetworkSettings))] -public class IronSourceMediatedNetworkSettingsInspector : UnityEditor.Editor -{ - private static IronSourceMediatedNetworkSettings ironSourceMediatedNetworkSettings; - - public static IronSourceMediatedNetworkSettings IronSourceMediatedNetworkSettings - { - get - { - if (ironSourceMediatedNetworkSettings == null) - { - ironSourceMediatedNetworkSettings = AssetDatabase.LoadAssetAtPath(IronSourceMediatedNetworkSettings.MEDIATION_SETTINGS_ASSET_PATH); - if (ironSourceMediatedNetworkSettings == null) - { - IronSourceMediatedNetworkSettings asset = CreateInstance(); - Directory.CreateDirectory(IronSourceConstants.IRONSOURCE_RESOURCES_PATH); - AssetDatabase.CreateAsset(asset, IronSourceMediatedNetworkSettings.MEDIATION_SETTINGS_ASSET_PATH); - ironSourceMediatedNetworkSettings = asset; - } - } - return ironSourceMediatedNetworkSettings; - } - } -} \ No newline at end of file diff --git a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettingsInspector.cs.meta b/Assets/IronSource/Editor/IronSourceMediatedNetworkSettingsInspector.cs.meta deleted file mode 100644 index f10008dd..00000000 --- a/Assets/IronSource/Editor/IronSourceMediatedNetworkSettingsInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6ddcb1096c420410ead13befae195114 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceMediationSettingsInspector.cs b/Assets/IronSource/Editor/IronSourceMediationSettingsInspector.cs deleted file mode 100644 index 8bc4ad2a..00000000 --- a/Assets/IronSource/Editor/IronSourceMediationSettingsInspector.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.IO; -using UnityEditor; - -[CustomEditor(typeof(IronSourceMediationSettings))] -public class IronSourceMediationSettingsInspector : UnityEditor.Editor -{ - private static IronSourceMediationSettings ironSourceMediationSettings; - public static IronSourceMediationSettings IronSourceMediationSettings - { - get - { - if (ironSourceMediationSettings == null) - { - ironSourceMediationSettings = AssetDatabase.LoadAssetAtPath(IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH); - if (ironSourceMediationSettings == null) - { - IronSourceMediationSettings asset = CreateInstance(); - Directory.CreateDirectory(IronSourceConstants.IRONSOURCE_RESOURCES_PATH); - AssetDatabase.CreateAsset(asset, IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH); - ironSourceMediationSettings = asset; - } - } - - return ironSourceMediationSettings; - } - } -} \ No newline at end of file diff --git a/Assets/IronSource/Editor/IronSourceMediationSettingsInspector.cs.meta b/Assets/IronSource/Editor/IronSourceMediationSettingsInspector.cs.meta deleted file mode 100644 index 1325fb42..00000000 --- a/Assets/IronSource/Editor/IronSourceMediationSettingsInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4a5cecbf374304044822daeaa54c686c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceMenu.cs b/Assets/IronSource/Editor/IronSourceMenu.cs deleted file mode 100644 index bd929746..00000000 --- a/Assets/IronSource/Editor/IronSourceMenu.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.IO; -using UnityEditor; -using UnityEngine; - -public class IronSourceMenu : UnityEditor.Editor -{ - - [MenuItem("Ads Mediation/Documentation", false, 0)] - public static void Documentation() - { - Application.OpenURL("https://developers.is.com/ironsource-mobile/unity/unity-plugin/"); - } - - - [MenuItem("Ads Mediation/SDK Change Log", false, 1)] - public static void ChangeLog() - { - Application.OpenURL("https://developers.is.com/ironsource-mobile/unity/sdk-change-log/"); - } - - - [MenuItem("Ads Mediation/Integration Manager", false , 2)] - public static void SdkManagerProd() - { - IronSourceDependenciesManager.ShowISDependenciesManager(); - } - - [MenuItem("Ads Mediation/Developer Settings/LevelPlay Mediation Settings", false, 3)] - public static void mediationSettings() - { - string path = "Assets/IronSource/Resources"; - - if (!Directory.Exists(path)) - { - Directory.CreateDirectory(path); - } - - - var ironSourceMediationSettings = Resources.Load(IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME); - if (ironSourceMediationSettings == null) - { - Debug.LogWarning(IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME + " can't be found, creating a new one..."); - ironSourceMediationSettings = CreateInstance(); - AssetDatabase.CreateAsset(ironSourceMediationSettings, IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH); - ironSourceMediationSettings = Resources.Load(IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME); - } - - Selection.activeObject = ironSourceMediationSettings; - } - - [MenuItem("Ads Mediation/Developer Settings/Mediated Network Settings", false, 4)] - public static void mediatedNetworkSettings() - { - string path = IronSourceConstants.IRONSOURCE_RESOURCES_PATH; - - if (!Directory.Exists(path)) - { - Directory.CreateDirectory(path); - } - - var ironSourceMediatedNetworkSettings = Resources.Load(IronSourceConstants.IRONSOURCE_MEDIATED_NETWORK_SETTING_NAME); - if (ironSourceMediatedNetworkSettings == null) - { - Debug.LogWarning(IronSourceConstants.IRONSOURCE_MEDIATED_NETWORK_SETTING_NAME + " can't be found, creating a new one..."); - ironSourceMediatedNetworkSettings = CreateInstance(); - AssetDatabase.CreateAsset(ironSourceMediatedNetworkSettings, IronSourceMediatedNetworkSettings.MEDIATION_SETTINGS_ASSET_PATH); - ironSourceMediatedNetworkSettings = Resources.Load(IronSourceConstants.IRONSOURCE_MEDIATED_NETWORK_SETTING_NAME); - } - - Selection.activeObject = ironSourceMediatedNetworkSettings; - } -} \ No newline at end of file diff --git a/Assets/IronSource/Editor/IronSourceMenu.cs.meta b/Assets/IronSource/Editor/IronSourceMenu.cs.meta deleted file mode 100644 index 80750f1f..00000000 --- a/Assets/IronSource/Editor/IronSourceMenu.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 66597aa84be5b4b818f2a497977ff225 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourcePlistProcessor.cs b/Assets/IronSource/Editor/IronSourcePlistProcessor.cs deleted file mode 100644 index 8a81f655..00000000 --- a/Assets/IronSource/Editor/IronSourcePlistProcessor.cs +++ /dev/null @@ -1,133 +0,0 @@ - -#if UNITY_IOS || UNITY_IPHONE - -using System.IO; -using UnityEditor.Callbacks; -using UnityEditor; -using System; -using UnityEngine; -using UnityEditor.iOS.Xcode; -using System.Text.RegularExpressions; - -/// -/// PostProcessor script to automatically fill all required dependencies -/// -public class IronSourcePlistProcessor -{ - [PostProcessBuild] - public static void OnPostprocessBuild(BuildTarget buildTarget, string buildPath) - { - if (File.Exists(IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH)) - { - if (buildTarget == BuildTarget.iOS) - { - /* - * PBXProject - */ - string plistPath = Path.Combine(buildPath, "Info.plist"); - PBXProject project = new PBXProject(); - string projectPath = PBXProject.GetPBXProjectPath(buildPath); - project.ReadFromFile(projectPath); - PlistDocument plist = new PlistDocument(); - plist.ReadFromString(File.ReadAllText(plistPath)); - if (plist != null) - { - // Get root - PlistElementDict rootDict = plist.root; - - // Check if SKAdNetworkItems already exists - PlistElementArray SKAdNetworkItems = null; - if (rootDict.values.ContainsKey("SKAdNetworkItems")) - { - try - { - SKAdNetworkItems = rootDict.values["SKAdNetworkItems"] as PlistElementArray; - } - catch (Exception e) - { - Debug.LogWarning(string.Format("Could not obtain SKAdNetworkItems PlistElementArray: {0}", e.Message)); - } - } - - //Add IronSource's SKAdNetwork ID - if (IronSourceMediationSettingsInspector.IronSourceMediationSettings.AddIronsourceSkadnetworkID) - { - // If not exists, create it - if (SKAdNetworkItems == null) - { - SKAdNetworkItems = rootDict.CreateArray("SKAdNetworkItems"); - } - - string plistContent = File.ReadAllText(plistPath); - if (!plistContent.Contains(IronSourceConstants.IRONSOURCE_SKAN_ID_KEY)) - { - PlistElementDict SKAdNetworkIdentifierDict = SKAdNetworkItems.AddDict(); - SKAdNetworkIdentifierDict.SetString("SKAdNetworkIdentifier", IronSourceConstants.IRONSOURCE_SKAN_ID_KEY); - } - } - - - - File.WriteAllText(plistPath, plist.WriteToString()); - } - } - } - if ( File.Exists(IronSourceMediatedNetworkSettings.MEDIATION_SETTINGS_ASSET_PATH)) - { - if (buildTarget == BuildTarget.iOS) - { - /* - * PBXProject - */ - string plistPath = Path.Combine(buildPath, "Info.plist"); - PBXProject project = new PBXProject(); - string projectPath = PBXProject.GetPBXProjectPath(buildPath); - project.ReadFromFile(projectPath); - PlistDocument plist = new PlistDocument(); - plist.ReadFromString(File.ReadAllText(plistPath)); - if (plist != null) - { - // Get root - PlistElementDict rootDict = plist.root; - - - //Adding AdMob App ID to Plist - if (IronSourceMediatedNetworkSettingsInspector.IronSourceMediatedNetworkSettings.EnableAdmob == true) - { - string appId = IronSourceMediatedNetworkSettingsInspector.IronSourceMediatedNetworkSettings.AdmobIOSAppId; - if (appId.Length == 0) - { - StopBuildWithMessage( - "iOS AdMob app ID is empty. Please enter your app ID to run ads properly"); - } - else if (!Regex.IsMatch(appId, "^[a-zA-Z0-9-~]*$")) - { - StopBuildWithMessage( - "iOS AdMob app ID is not valid. Please enter a valid app ID to run ads properly"); - } - else - { - plist.root.SetString("GADApplicationIdentifier", appId); - } - } - - File.WriteAllText(plistPath, plist.WriteToString()); - } - } - } - } - private static void StopBuildWithMessage(string message) - { - string prefix = "[IronSourceApplicationSettings] "; - - EditorUtility.DisplayDialog( - "IronSource Developer Settings", "Error: " + message, "", ""); - -#if UNITY_2017_1_OR_NEWER - throw new BuildPlayerWindow.BuildMethodException(prefix + message); -#else - throw new OperationCanceledException(prefix + message); -#endif - } -} -#endif \ No newline at end of file diff --git a/Assets/IronSource/Editor/IronSourcePlistProcessor.cs.meta b/Assets/IronSource/Editor/IronSourcePlistProcessor.cs.meta deleted file mode 100644 index 465982a0..00000000 --- a/Assets/IronSource/Editor/IronSourcePlistProcessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 06612f61fb60e49e99108f8c39651992 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/IronSourceSDKDependencies.xml b/Assets/IronSource/Editor/IronSourceSDKDependencies.xml deleted file mode 100644 index 635abf39..00000000 --- a/Assets/IronSource/Editor/IronSourceSDKDependencies.xml +++ /dev/null @@ -1,35 +0,0 @@ - - 7.3.1.1 - - - - - https://android-sdk.is.com/ - - - - - - - - https://maven.google.com/ - - - - - - - - https://maven.google.com/ - - - - - - - - https://github.com/CocoaPods/Specs - - - - diff --git a/Assets/IronSource/Editor/IronSourceSDKDependencies.xml.meta b/Assets/IronSource/Editor/IronSourceSDKDependencies.xml.meta deleted file mode 100644 index c07cfe29..00000000 --- a/Assets/IronSource/Editor/IronSourceSDKDependencies.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4ccded49888e543a8b6c50a8b0e8e60e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/MobileDependencyResolverInstallerLp.cs b/Assets/IronSource/Editor/MobileDependencyResolverInstallerLp.cs deleted file mode 100644 index aeca984a..00000000 --- a/Assets/IronSource/Editor/MobileDependencyResolverInstallerLp.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.IO; -using System.Net; -using UnityEditor; -using UnityEngine; - -using UnityEngine.Networking; - - -namespace MobileDependencyResolverLP.Installer.Editor -{ - static class MobileDependencyResolverInstallerLp - { - const string k_UnityMediationPackage = "com.unity.services.mediation"; - const string k_PackageUrl = @"https://s3.amazonaws.com/ssa.public/MDR/mobile-dependency-resolver.unitypackage"; - const string k_DownloadPath = @"Temp/MDR.unitypackage"; - - const string k_DoNotAskAgain = "Unity.Mediation.MobileDependencyResolver.DoNotAskAgain"; - const string k_DialogTitle = "Mobile Dependency Resolver required"; - const string k_DialogText = "Mediation requires Mobile Dependency Resolver to resolve native dependencies.\n" + - " Would you like to import the package?"; - const string k_DialogTitleError = "Error"; - const string k_DialogTextError = "Failed to download MDR; "; - const string k_ButtonOk = "OK"; - const string k_ButtonImport = "Import"; - const string k_ButtonCancel = "Cancel"; - const string k_ButtonDontAskAgain = "Ignore - Do not ask again during this session"; - - - [InitializeOnLoadMethod] - static void InstallPlayServicesResolverIfNeeded() - { - if (!IsPackageInstalled(k_UnityMediationPackage)) - { - EditorApplication.quitting += EditorApplicationOnQuitting; - - if (IsPlayServicesResolverInstalled()) - return; - - // The user will have a choice to ignore this dialog for the entire session. - if ((Application.isBatchMode && Environment.GetEnvironmentVariable("UNITY_THISISABUILDMACHINE") != null) || AskUserToInstallPackage()) - { - InstallPackage(); - } - } - } - - static bool IsPackageInstalled(string package) - { - if (File.Exists("Packages/manifest.json")) - { - var packageList = File.ReadAllText("Packages/manifest.json"); - return packageList.Contains(package); - } - - return false; - } - - static void EditorApplicationOnQuitting() - { - EditorPrefs.DeleteKey(k_DoNotAskAgain); - } - - static bool AskUserToInstallPackage() - { - if (EditorPrefs.GetBool(k_DoNotAskAgain)) return false; - - var response = EditorUtility.DisplayDialogComplex(k_DialogTitle, k_DialogText, - k_ButtonImport, k_ButtonCancel, k_ButtonDontAskAgain); - - switch (response) - { - case 0: - return true; - case 1: - return false; - case 2: - EditorPrefs.SetBool(k_DoNotAskAgain, true); - return false; - default: - return false; - } - } - - internal static bool IsPlayServicesResolverInstalled() - { - try - { - return Type.GetType("Google.VersionHandler, Google.VersionHandler") != null; - } - catch (Exception e) - { - Debug.LogException(e); - return false; - } - } - - static void InstallPackage() - { - bool downloaded = false; - using (var wc = new WebClient()) - { - try - { - wc.DownloadFile(k_PackageUrl, k_DownloadPath); - downloaded = true; - } - catch (WebException e) - { - EditorUtility.DisplayDialog( - k_DialogTitleError, - k_DialogTextError + e.Message, - k_ButtonOk); - } - } - - if (downloaded) - { - var absolutePath = Path.GetFullPath(k_DownloadPath); - AssetDatabase.ImportPackage(absolutePath, false); - File.Delete(absolutePath); - } - } - } -} diff --git a/Assets/IronSource/Editor/MobileDependencyResolverInstallerLp.cs.meta b/Assets/IronSource/Editor/MobileDependencyResolverInstallerLp.cs.meta deleted file mode 100644 index e29e051b..00000000 --- a/Assets/IronSource/Editor/MobileDependencyResolverInstallerLp.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: affaf9528734848b9ab9399ade88a1a0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Editor/MobileDependencyResolverLP.Installer.Editor.api b/Assets/IronSource/Editor/MobileDependencyResolverLP.Installer.Editor.api deleted file mode 100644 index fa05f4ab..00000000 --- a/Assets/IronSource/Editor/MobileDependencyResolverLP.Installer.Editor.api +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated. Do not modify by hand. -// XML documentation file not found. To check if public methods have XML comments, -// make sure the XML doc file is present and located next to the scraped dll diff --git a/Assets/IronSource/Editor/MobileDependencyResolverLP.Installer.Editor.api.meta b/Assets/IronSource/Editor/MobileDependencyResolverLP.Installer.Editor.api.meta deleted file mode 100644 index d2f9c00c..00000000 --- a/Assets/IronSource/Editor/MobileDependencyResolverLP.Installer.Editor.api.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5b8279495f69c4a8e9a6527f550b9734 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins.meta b/Assets/IronSource/Plugins.meta deleted file mode 100644 index a16151bf..00000000 --- a/Assets/IronSource/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ab2832c2b390d7c46adf52f6f171a4ac -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/Android.meta b/Assets/IronSource/Plugins/Android.meta deleted file mode 100644 index dab065c6..00000000 --- a/Assets/IronSource/Plugins/Android.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 514fc923d8df3da41a41925bfdbca334 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib.meta b/Assets/IronSource/Plugins/Android/IronSource.androidlib.meta deleted file mode 100644 index af1d1ee3..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib.meta +++ /dev/null @@ -1,28 +0,0 @@ -fileFormatVersion: 2 -guid: 718f851be2f4c4ee9b4c748b225a7ea2 -folderAsset: yes -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml b/Assets/IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml deleted file mode 100644 index 6ad08dd8..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml.meta b/Assets/IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml.meta deleted file mode 100644 index 6fefa34f..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib/AndroidManifest.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e46e3d39a8bec48d9ae81d0008842ad4 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs.meta b/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs.meta deleted file mode 100644 index 87878ec8..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a5936d92d17be4fde864e068dd13d202 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs/IronSource-bridge.jar b/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs/IronSource-bridge.jar deleted file mode 100644 index 44dcadb6..00000000 Binary files a/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs/IronSource-bridge.jar and /dev/null differ diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs/IronSource-bridge.jar.meta b/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs/IronSource-bridge.jar.meta deleted file mode 100644 index bd286930..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib/libs/IronSource-bridge.jar.meta +++ /dev/null @@ -1,32 +0,0 @@ -fileFormatVersion: 2 -guid: f10a601320ff74e1e96ecfd77be278c5 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/project.properties b/Assets/IronSource/Plugins/Android/IronSource.androidlib/project.properties deleted file mode 100644 index 37b95ede..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib/project.properties +++ /dev/null @@ -1,2 +0,0 @@ -target=android-9 -android.library=true \ No newline at end of file diff --git a/Assets/IronSource/Plugins/Android/IronSource.androidlib/project.properties.meta b/Assets/IronSource/Plugins/Android/IronSource.androidlib/project.properties.meta deleted file mode 100644 index 3659560b..00000000 --- a/Assets/IronSource/Plugins/Android/IronSource.androidlib/project.properties.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f6d91e910c9af49d7a1d0254340e9dca -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS.meta b/Assets/IronSource/Plugins/iOS.meta deleted file mode 100644 index 20da8b50..00000000 --- a/Assets/IronSource/Plugins/iOS.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: eec757880dab91445ae01d043749324b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.h b/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.h deleted file mode 100644 index c82dd986..00000000 --- a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// BannerLevelPlayCallbacksWrapper.h -// iOSBridge -// -// Created by Moshe Aviv Aslanov on 02/05/2022. -// Copyright © 2022 yossi mozgerashvily. All rights reserved. -// - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol BannerLevelPlayCallbacksWrapper - -- (void)bannerLevelPlayDidLoad:(ISBannerView *)bannerView withAdInfo:(ISAdInfo *)adInfo; -- (void)bannerLevelPlayDidFailToLoadWithError:(NSError *)error; -- (void)bannerLevelPlayDidClickWithAdInfo:(ISAdInfo *)adInfo; -- (void)bannerLevelPlayDidPresentScreenWithAdInfo:(ISAdInfo *)adInfo; -- (void)bannerLevelPlayDidDismissScreenWithAdInfo:(ISAdInfo *)adInfo; -- (void)bannerLevelPlayDidLeaveApplicationWithAdInfo:(ISAdInfo *)adInfo; - -@end - -@interface BannerLevelPlayCallbacksWrapper : NSObject - -@property (nonatomic, weak) id delegate; - -- (instancetype) initWithDelegate:(id)delegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.h.meta b/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.h.meta deleted file mode 100644 index 85e37a94..00000000 --- a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.h.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: e59e5ae0f40954de1bd7a08ffee62dfe -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.m b/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.m deleted file mode 100644 index dbf3b6ca..00000000 --- a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// BannerLevelPlayCallbacksWrapper.m -// iOSBridge -// -// Created by Moshe Aviv Aslanov on 02/05/2022. -// Copyright © 2022 yossi mozgerashvily. All rights reserved. -// - -#import "BannerLevelPlayCallbacksWrapper.h" - -@implementation BannerLevelPlayCallbacksWrapper - --(instancetype)initWithDelegate:(id)delegate { - self = [super init]; - - if (self) { - _delegate = delegate; - } - - return self; -} - - - -- (void)didClickWithAdInfo:(ISAdInfo *)adInfo { - [_delegate bannerLevelPlayDidClickWithAdInfo:adInfo]; -} - -- (void)didDismissScreenWithAdInfo:(ISAdInfo *)adInfo { - [_delegate bannerLevelPlayDidDismissScreenWithAdInfo:adInfo]; -} - -- (void)didFailToLoadWithError:(NSError *)error { - [_delegate bannerLevelPlayDidFailToLoadWithError:error]; -} - -- (void)didLeaveApplicationWithAdInfo:(ISAdInfo *)adInfo { - [_delegate bannerLevelPlayDidLeaveApplicationWithAdInfo:adInfo]; -} - -- (void)didLoad:(ISBannerView *)bannerView withAdInfo:(ISAdInfo *)adInfo { - [_delegate bannerLevelPlayDidLoad:bannerView withAdInfo:adInfo]; -} - -- (void)didPresentScreenWithAdInfo:(ISAdInfo *)adInfo { - [_delegate bannerLevelPlayDidPresentScreenWithAdInfo:adInfo]; -} - -@end diff --git a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.m.meta b/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.m.meta deleted file mode 100644 index 63046e27..00000000 --- a/Assets/IronSource/Plugins/iOS/BannerLevelPlayCallbacksWrapper.m.meta +++ /dev/null @@ -1,37 +0,0 @@ -fileFormatVersion: 2 -guid: b502d11a29d2b41dd8be5f85c4f8ba06 -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: 0 - settings: - DefaultValueInitialized: true - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.h b/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.h deleted file mode 100644 index 745e7d4c..00000000 --- a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// InterstitialLevelPlayCallbacksWrapper.h -// iOSBridge -// -// Created by Moshe Aviv Aslanov on 02/05/2022. -// Copyright © 2022 yossi mozgerashvily. All rights reserved. -// - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol InterstitialLevelPlayCallbacksWrapper - -- (void)interstitialLevelPlayDidLoadWithAdInfo:(ISAdInfo *)adInfo; -- (void)interstitialLevelPlayDidFailToLoadWithError:(NSError *)error; -- (void)interstitialLevelPlayDidOpenWithAdInfo:(ISAdInfo *)adInfo; -- (void)interstitialLevelPlayDidCloseWithAdInfo:(ISAdInfo *)adInfo; -- (void)interstitialLevelPlayDidShowWithAdInfo:(ISAdInfo *)adInfo; -- (void)interstitialLevelPlayDidFailToShowWithError:(NSError *)error andAdInfo:(ISAdInfo *)adInfo; -- (void)interstitialLevelPlayDidClickWithAdInfo:(ISAdInfo *)adInfo; - -@end - -@interface InterstitialLevelPlayCallbacksWrapper : NSObject - -@property (nonatomic, weak) id delegate; - -- (instancetype) initWithDelegate:(id)delegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.h.meta b/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.h.meta deleted file mode 100644 index 28011857..00000000 --- a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.h.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: 0df2f4fa7a5254ff786db2f71996fd06 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.m b/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.m deleted file mode 100644 index b44be8b9..00000000 --- a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// InterstitialLevelPlayCallbacksWrapper.m -// iOSBridge -// -// Created by Moshe Aviv Aslanov on 02/05/2022. -// Copyright © 2022 yossi mozgerashvily. All rights reserved. -// - -#import "InterstitialLevelPlayCallbacksWrapper.h" - -@implementation InterstitialLevelPlayCallbacksWrapper - --(instancetype)initWithDelegate:(id)delegate { - self = [super init]; - - if (self) { - _delegate = delegate; - } - - return self; -} - -- (void)didClickWithAdInfo:(ISAdInfo *)adInfo { - [_delegate interstitialLevelPlayDidClickWithAdInfo:adInfo]; -} - -- (void)didCloseWithAdInfo:(ISAdInfo *)adInfo { - [_delegate interstitialLevelPlayDidCloseWithAdInfo:adInfo]; -} - -- (void)didFailToLoadWithError:(NSError *)error { - [_delegate interstitialLevelPlayDidFailToLoadWithError:error]; -} - -- (void)didFailToShowWithError:(NSError *)error andAdInfo:(ISAdInfo *)adInfo { - [_delegate interstitialLevelPlayDidFailToShowWithError:error andAdInfo:adInfo]; -} - -- (void)didLoadWithAdInfo:(ISAdInfo *)adInfo { - [_delegate interstitialLevelPlayDidLoadWithAdInfo:adInfo]; -} - -- (void)didOpenWithAdInfo:(ISAdInfo *)adInfo { - [_delegate interstitialLevelPlayDidOpenWithAdInfo:adInfo]; -} - -- (void)didShowWithAdInfo:(ISAdInfo *)adInfo { - [_delegate interstitialLevelPlayDidShowWithAdInfo:adInfo]; -} - -@end diff --git a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.m.meta b/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.m.meta deleted file mode 100644 index 1be00594..00000000 --- a/Assets/IronSource/Plugins/iOS/InterstitialLevelPlayCallbacksWrapper.m.meta +++ /dev/null @@ -1,37 +0,0 @@ -fileFormatVersion: 2 -guid: b7b00399473264029877c5a3da509a4c -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: 0 - settings: - DefaultValueInitialized: true - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/IronSourceUnityConfig.m b/Assets/IronSource/Plugins/iOS/IronSourceUnityConfig.m deleted file mode 100644 index 4209bfc1..00000000 --- a/Assets/IronSource/Plugins/iOS/IronSourceUnityConfig.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// iOSBridge -// -// Created by Ori on 5/13/15. -// - -#import -#import -#import - -@interface IronSourceUnityConfig:NSObject -//IronSource -- (void) setClientSideCallbacks:(bool)useClientSideCallbacks; -- (void) setLanguage:(NSString *)language; -- (void) setRewardedVideoCustomParams:(NSString *)rvParams; -- (void) setOfferwallCustomParams:(NSString *)owParams; - -@end - -@implementation IronSourceUnityConfig - -//IronSource -- (void) setClientSideCallbacks:(bool)useClientSideCallbacks { - NSNumber *ucsc = @0; - if (useClientSideCallbacks) - ucsc = @1; - - [ISSupersonicAdsConfiguration configurations].useClientSideCallbacks = ucsc; -} - -- (void) setLanguage:(NSString *)language { - [ISSupersonicAdsConfiguration configurations].language = language; -} - -- (void) setRewardedVideoCustomParams:(NSString *)rvParams { - NSError *jsonError; - NSData *objectData = [rvParams dataUsingEncoding:NSUTF8StringEncoding]; - NSDictionary *json = [NSJSONSerialization JSONObjectWithData:objectData options:NSJSONReadingMutableContainers error:&jsonError]; - if (!jsonError) - [ISConfigurations configurations].rewardedVideoCustomParameters = json; -} - -- (void) setOfferwallCustomParams:(NSString *)owParams { - NSError *jsonError; - NSData *objectData = [owParams dataUsingEncoding:NSUTF8StringEncoding]; - NSDictionary *json = [NSJSONSerialization JSONObjectWithData:objectData options:NSJSONReadingMutableContainers error:&jsonError]; - if (!jsonError) - [ISConfigurations configurations].offerwallCustomParameters = json; -} - - - -#ifdef __cplusplus -extern "C" { -#endif - -#define ParseNSStringParam( _x_ ) ( _x_ != NULL ) ? [NSString stringWithUTF8String:_x_] : [NSString stringWithUTF8String:""] - - //IronSource - void CFSetClientSideCallbacks(bool useClientSideCallbacks){ - [[IronSourceUnityConfig new] setClientSideCallbacks:useClientSideCallbacks]; - } - void CFSetLanguage(const char *language){ - [[IronSourceUnityConfig new] setLanguage:ParseNSStringParam(language)]; - } - void CFSetRewardedVideoCustomParams(const char *rvParams){ - [[IronSourceUnityConfig new] setRewardedVideoCustomParams:ParseNSStringParam(rvParams)]; - } - void CFSetOfferwallCustomParams(const char *owParam){ - [[IronSourceUnityConfig new] setOfferwallCustomParams:ParseNSStringParam(owParam)]; - } - - -#ifdef __cplusplus -} -#endif - -@end diff --git a/Assets/IronSource/Plugins/iOS/IronSourceUnityConfig.m.meta b/Assets/IronSource/Plugins/iOS/IronSourceUnityConfig.m.meta deleted file mode 100644 index afac19ba..00000000 --- a/Assets/IronSource/Plugins/iOS/IronSourceUnityConfig.m.meta +++ /dev/null @@ -1,37 +0,0 @@ -fileFormatVersion: 2 -guid: 552162f62361f47aa8c899ff56f7d47e -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: 0 - settings: - DefaultValueInitialized: true - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.h b/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.h deleted file mode 100644 index 60ad52f1..00000000 --- a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// RewardedVideoLevelPlayCallbacksWrapper.h -// iOSBridge -// -// Created by Moshe Aviv Aslanov on 02/05/2022. -// Copyright © 2022 yossi mozgerashvily. All rights reserved. -// - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol RewardedVideoLevelPlayCallbacksWrapper - -- (void)rewardedVideoLevelPlayDidLoadWithAdInfo:(ISAdInfo *)adInfo; -- (void)rewardedVideoLevelPlayDidFailToLoadWithError:(NSError *)error; -- (void)hasAvailableAdWithAdInfo:(ISAdInfo *)adInfo; -- (void)hasNoAvailableAd; -- (void)rewardedVideoLevelPlayDidReceiveRewardForPlacement:(ISPlacementInfo *)placementInfo withAdInfo:(ISAdInfo *)adInfo; -- (void)rewardedVideoLevelPlayDidFailToShowWithError:(NSError *)error andAdInfo:(ISAdInfo *)adInfo; -- (void)rewardedVideoLevelPlayDidOpenWithAdInfo:(ISAdInfo *)adInfo; -- (void)rewardedVideoLevelPlayDidCloseWithAdInfo:(ISAdInfo *)adInfo; -- (void)rewardedVideoLevelPlayDidClick:(ISPlacementInfo *)placementInfo withAdInfo:(ISAdInfo *)adInfo; - -@end - -@interface RewardedVideoLevelPlayCallbacksWrapper : NSObject - -@property (nonatomic, weak) iddelegate; - -- (instancetype) initWithDelegate:(id)delegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.h.meta b/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.h.meta deleted file mode 100644 index 9bb5a4e6..00000000 --- a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.h.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: 53f085b74e6634bf8938e8dcc6deff48 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.m b/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.m deleted file mode 100644 index c77c54a2..00000000 --- a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// RewardedVideoLevelPlayCallbacksWrapper.m -// iOSBridge -// -// Created by Moshe Aviv Aslanov on 02/05/2022. -// Copyright © 2022 yossi mozgerashvily. All rights reserved. -// - -#import "RewardedVideoLevelPlayCallbacksWrapper.h" - -@implementation RewardedVideoLevelPlayCallbacksWrapper --(instancetype)initWithDelegate:(id)delegate { - self = [super init]; - - if (self) { - _delegate = delegate; - } - - return self; -} - - -- (void)didClick:(ISPlacementInfo *)placementInfo withAdInfo:(ISAdInfo *)adInfo { - [_delegate rewardedVideoLevelPlayDidClick:placementInfo withAdInfo:adInfo]; -} - -- (void)didCloseWithAdInfo:(ISAdInfo *)adInfo { - [_delegate rewardedVideoLevelPlayDidCloseWithAdInfo:adInfo]; -} - -- (void)didFailToShowWithError:(NSError *)error andAdInfo:(ISAdInfo *)adInfo { - [_delegate rewardedVideoLevelPlayDidFailToShowWithError:error andAdInfo:adInfo]; -} - -- (void)didOpenWithAdInfo:(ISAdInfo *)adInfo { - [_delegate rewardedVideoLevelPlayDidOpenWithAdInfo:adInfo]; -} - -- (void)didReceiveRewardForPlacement:(ISPlacementInfo *)placementInfo withAdInfo:(ISAdInfo *)adInfo { - [_delegate rewardedVideoLevelPlayDidReceiveRewardForPlacement:placementInfo withAdInfo:adInfo]; -} - -- (void)hasAvailableAdWithAdInfo:(ISAdInfo *)adInfo { - [_delegate hasAvailableAdWithAdInfo:adInfo]; -} - -- (void)hasNoAvailableAd { - [_delegate hasNoAvailableAd]; -} - -- (void)didFailToLoadWithError:(NSError *)error { - [_delegate rewardedVideoLevelPlayDidFailToLoadWithError:error]; -} - -- (void)didLoadWithAdInfo:(ISAdInfo *)adInfo { - [_delegate rewardedVideoLevelPlayDidLoadWithAdInfo:adInfo]; -} - -@end diff --git a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.m.meta b/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.m.meta deleted file mode 100644 index a93ee88c..00000000 --- a/Assets/IronSource/Plugins/iOS/RewardedVideoLevelPlayCallbacksWrapper.m.meta +++ /dev/null @@ -1,37 +0,0 @@ -fileFormatVersion: 2 -guid: 1f495ad4980544963beec23d889c73da -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: 0 - settings: - DefaultValueInitialized: true - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/iOSBridge.h b/Assets/IronSource/Plugins/iOS/iOSBridge.h deleted file mode 100644 index 0c9b07c2..00000000 --- a/Assets/IronSource/Plugins/iOS/iOSBridge.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// iOSBridge.h -// iOSBridge -// -// Created by Supersonic. -// Copyright (c) 2015 Supersonic. All rights reserved. -// - -#import -#import -#import "RewardedVideoLevelPlayCallbacksWrapper.h" -#import "InterstitialLevelPlayCallbacksWrapper.h" -#import "BannerLevelPlayCallbacksWrapper.h" - -static NSString * UnityGitHash = @"a841514"; -typedef void (*ISUnityBackgroundCallback)(const char* args); -typedef void (*ISUnityPauseGame)(const bool gamePause); - -@interface iOSBridge : NSObject - -@end - - diff --git a/Assets/IronSource/Plugins/iOS/iOSBridge.h.meta b/Assets/IronSource/Plugins/iOS/iOSBridge.h.meta deleted file mode 100644 index 4d95697d..00000000 --- a/Assets/IronSource/Plugins/iOS/iOSBridge.h.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: c20735ca3e9394fb5b7a284d5bee100e -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Plugins/iOS/iOSBridge.m b/Assets/IronSource/Plugins/iOS/iOSBridge.m deleted file mode 100644 index 9e4f50fa..00000000 --- a/Assets/IronSource/Plugins/iOS/iOSBridge.m +++ /dev/null @@ -1,1339 +0,0 @@ -// -// iOSBridge.m -// iOSBridge -// -// Created by Supersonic. -// Copyright (c) 2015 Supersonic. All rights reserved. -// - -#import "iOSBridge.h" -#import - - -// Converts NSString to C style string by way of copy (Mono will free it) -#define MakeStringCopy( _x_ ) ( _x_ != NULL && [_x_ isKindOfClass:[NSString class]] ) ? strdup( [_x_ UTF8String] ) : NULL - -// Converts C style string to NSString -#define GetStringParam( _x_ ) ( _x_ != NULL ) ? [NSString stringWithUTF8String:_x_] : [NSString stringWithUTF8String:""] - -#define BANNER_POSITION_TOP 1 -#define BANNER_POSITION_BOTTOM 2 - -#ifdef __cplusplus -extern "C" { -#endif - void UnityPause(int pause); - extern void UnitySendMessage( const char *className, const char *methodName, const char *param ); - -#ifdef __cplusplus -} -#endif - -@interface iOSBridge () -{ - ISBannerView* _bannerView; - NSInteger _position; - UIViewController* _bannerViewController; - BOOL _shouldHideBanner; -} - -@property (nonatomic, strong) RewardedVideoLevelPlayCallbacksWrapper *rewardedVideoLevelPlayDelegate; -@property (nonatomic, strong) InterstitialLevelPlayCallbacksWrapper *interstitialLevelPlayDelegate; -@property (nonatomic, strong) BannerLevelPlayCallbacksWrapper *bannerLevelPlayDelegate; - -@end - -static NSString * const EMPTY_STRING = @""; - -@implementation iOSBridge -static ISUnityBackgroundCallback backgroundCallback; -static bool pauseGame; - - -char *const IRONSOURCE_EVENTS = "IronSourceEvents"; -char *const IRONSOURCE_REWARDED_VIDEO_EVENTS = "IronSourceRewardedVideoEvents"; -char *const IRONSOURCE_INTERSTITIAL_EVENTS = "IronSourceInterstitialEvents"; -char *const IRONSOURCE_BANNER_EVENTS = "IronSourceBannerEvents"; - -+ (iOSBridge *)start { - static iOSBridge *instance; - static dispatch_once_t onceToken; - dispatch_once( &onceToken, - ^{ - instance = [iOSBridge new]; - }); - - return instance; -} - -- (instancetype)init { - if(self = [super init]){ - self.rewardedVideoLevelPlayDelegate = [[RewardedVideoLevelPlayCallbacksWrapper alloc]initWithDelegate:(id)self]; - self.interstitialLevelPlayDelegate = [[InterstitialLevelPlayCallbacksWrapper alloc]initWithDelegate:(id)self]; - self.bannerLevelPlayDelegate = [[BannerLevelPlayCallbacksWrapper alloc]initWithDelegate:(id)self]; - - [IronSource setRewardedVideoDelegate:self]; - [IronSource setInterstitialDelegate:self]; - [IronSource setISDemandOnlyInterstitialDelegate:self]; - [IronSource setISDemandOnlyRewardedVideoDelegate:self]; - [IronSource setOfferwallDelegate:self]; - [IronSource setBannerDelegate:self]; - [IronSource addImpressionDataDelegate:self]; - [IronSource setConsentViewWithDelegate:self]; - - //set level play listeneres - [IronSource setLevelPlayBannerDelegate:self.bannerLevelPlayDelegate]; - [IronSource setLevelPlayInterstitialDelegate:self.interstitialLevelPlayDelegate]; - [IronSource setLevelPlayRewardedVideoDelegate:self.rewardedVideoLevelPlayDelegate]; - - - _bannerView = nil; - _bannerViewController = nil; - _position = BANNER_POSITION_BOTTOM; - _shouldHideBanner = NO; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) - name:UIDeviceOrientationDidChangeNotification object:nil]; - } - - return self; -} - -- (void)setPluginDataWithType:(NSString *)pluginType pluginVersion:(NSString *)version pluginFrameworkVersion:(NSString *)frameworkVersion { - [ISConfigurations getConfigurations].plugin = pluginType; - [ISConfigurations getConfigurations].pluginVersion = version; - [ISConfigurations getConfigurations].pluginFrameworkVersion = frameworkVersion; -} - -#pragma mark Base API - -- (const char *)getAdvertiserId { - NSString *advertiserId = [IronSource advertiserId]; - - return MakeStringCopy(advertiserId); -} - -- (void)validateIntegration { - [ISIntegrationHelper validateIntegration]; -} - -- (void)shouldTrackNetworkState:(BOOL)flag { - [IronSource shouldTrackReachability:flag]; -} - -- (BOOL)setDynamicUserId:(NSString *)dynamicUserId { - return [IronSource setDynamicUserId:dynamicUserId]; -} - -- (void)setAdaptersDebug:(BOOL)enabled { - [IronSource setAdaptersDebug:enabled]; -} - -- (void)setConsent:(BOOL)consent { - [IronSource setConsent:consent]; -} - -- (void)setMetaDataWithKey:(NSString *)key value:(NSString *)value { - [IronSource setMetaDataWithKey:key value:value]; -} - -- (void)setMetaDataWithKey:(NSString *)key values:(NSMutableArray *)valuesArray { - [IronSource setMetaDataWithKey:key values:valuesArray]; -} - -- (void)setManualLoadRewardedVideo:(BOOL) isOn { - if (isOn) { - [IronSource setRewardedVideoManualDelegate:self]; - [IronSource setLevelPlayRewardedVideoManualDelegate:self.rewardedVideoLevelPlayDelegate]; - } - else { - NSLog(@"Manual load false is the defualt value"); - - } -} - -- (void)setNetworkData:(NSString *)networkKey data:(NSString *)networkData { - NSError* error; - if (!networkData) { - return; - } - - NSData *data = [networkData dataUsingEncoding:NSUTF8StringEncoding]; - if (!data) { - return; - } - - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; - if (!dict) { - return; - } - - [IronSource setNetworkDataWithNetworkKey:networkKey andNetworkData:dict]; -} - -#pragma mark Init SDK - -- (void)setUserId:(NSString *)userId { - [IronSource setUserId:userId]; -} - -- (void)initWithAppKey:(NSString *)appKey { - [IronSource initWithAppKey:appKey delegate:self]; -} - -- (void)initWithAppKey:(NSString *)appKey adUnits:(NSArray *)adUnits { - [IronSource initWithAppKey:appKey adUnits:adUnits delegate:self]; -} - -- (void)initISDemandOnly:(NSString *)appKey adUnits:(NSArray *)adUnits { - [IronSource initISDemandOnly:appKey adUnits:adUnits]; -} - -#pragma mark Rewarded Video API - -- (void)showRewardedVideo { - [IronSource showRewardedVideoWithViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; -} - -- (void)showRewardedVideoWithPlacement:(NSString *)placementName { - [IronSource showRewardedVideoWithViewController:[UIApplication sharedApplication].keyWindow.rootViewController placement:placementName]; -} - -- (const char *) getPlacementInfo:(NSString *)placementName { - char *res = nil; - - if (placementName){ - ISPlacementInfo *placementInfo = [IronSource rewardedVideoPlacementInfo:placementName]; - if(placementInfo){ - NSDictionary *dict = @{@"placement_name": [placementInfo placementName], - @"reward_amount": [placementInfo rewardAmount], - @"reward_name": [placementInfo rewardName]}; - - res = MakeStringCopy([self getJsonFromObj:dict]); - } - } - - return res; -} - -- (BOOL)isRewardedVideoAvailable { - return [IronSource hasRewardedVideo]; -} - -- (BOOL)isRewardedVideoPlacementCapped:(NSString *)placementName { - return [IronSource isRewardedVideoCappedForPlacement:placementName]; -} - -- (void)setRewardedVideoServerParameters:(NSDictionary *)params { - [IronSource setRewardedVideoServerParameters:params]; -} - -- (void)clearRewardedVideoServerParameters { - [IronSource clearRewardedVideoServerParameters]; -} - -#pragma mark Rewarded Video Manual Load API - -- (void)loadRewardedVideo { - [IronSource loadRewardedVideo]; -} - -#pragma mark Rewarded Video DemanOnly API - -- (void)showISDemandOnlyRewardedVideo:(NSString *)instanceId { - [IronSource showISDemandOnlyRewardedVideo:[UIApplication sharedApplication].keyWindow.rootViewController instanceId:instanceId]; -} - -- (void)loadISDemandOnlyRewardedVideo:(NSString *)instanceId { - [IronSource loadISDemandOnlyRewardedVideo:instanceId]; -} - -- (BOOL)isDemandOnlyRewardedVideoAvailable:(NSString *)instanceId { - return [IronSource hasISDemandOnlyRewardedVideo:instanceId]; -} - -#pragma mark Init Delegate - -- (void)initializationDidComplete { - UnitySendMessage(IRONSOURCE_EVENTS, "onSdkInitializationCompleted", ""); -} - -#pragma mark Rewarded Video Delegate - -- (void)rewardedVideoHasChangedAvailability:(BOOL)available { - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAvailabilityChanged", (available) ? "true" : "false"); -} - -- (void)didReceiveRewardForPlacement:(ISPlacementInfo *)placementInfo { - NSDictionary *dict = @{@"placement_reward_amount": placementInfo.rewardAmount, - @"placement_reward_name": placementInfo.rewardName, - @"placement_name": placementInfo.placementName}; - - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdRewarded", MakeStringCopy([self getJsonFromObj:dict])); -} - -- (void)rewardedVideoDidFailToShowWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdShowFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdShowFailed",""); -} - -- (void)rewardedVideoDidOpen { - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdOpened", ""); - if (pauseGame) { - UnityPause(1); - } -} - -- (void)rewardedVideoDidClose { - if (pauseGame) { - UnityPause(0); - } - [self centerBanner]; - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdClosed", ""); -} - -- (void)rewardedVideoDidStart { - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdStarted", ""); -} - -- (void)rewardedVideoDidEnd { - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdEnded", ""); -} - -- (void)didClickRewardedVideo:(ISPlacementInfo *)placementInfo { - NSDictionary *dict = @{@"placement_reward_amount": placementInfo.rewardAmount, - @"placement_reward_name": placementInfo.rewardName, - @"placement_name": placementInfo.placementName}; - - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdClicked", MakeStringCopy([self getJsonFromObj:dict])); -} - -#pragma mark Rewarded Video Level Play Delegate - -- (void)rewardedVideoLevelPlayDidClick:(nonnull ISPlacementInfo *)placementInfo withAdInfo:(nonnull ISAdInfo *)adInfo { - NSDictionary *dict = @{@"placement_reward_amount": placementInfo.rewardAmount, - @"placement_reward_name": placementInfo.rewardName, - @"placement_name": placementInfo.placementName}; - NSArray *params = @[dict, [self getAdInfoData:adInfo]]; - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdClicked", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)rewardedVideoLevelPlayDidCloseWithAdInfo:(nonnull ISAdInfo *)adInfo { - if (pauseGame) { - UnityPause(0); - } - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdClosed",[self getAdInfoData:adInfo].UTF8String); -} - -- (void)rewardedVideoLevelPlayDidFailToLoadWithError:(nonnull NSError *)error { - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdLoadFailed", MakeStringCopy([self parseErrorToEvent:error])); -} - -- (void)rewardedVideoLevelPlayDidFailToShowWithError:(nonnull NSError *)error andAdInfo:(nonnull ISAdInfo *)adInfo { - NSArray *params = @[(error) ? [self parseErrorToEvent:error] : @"" , [self getAdInfoData:adInfo]]; - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdShowFailed", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)rewardedVideoLevelPlayDidLoadWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdReady", [self getAdInfoData:adInfo].UTF8String); -} - -- (void)rewardedVideoLevelPlayDidOpenWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdOpened", [self getAdInfoData:adInfo].UTF8String); - if (pauseGame) { - UnityPause(1); - } -} - -- (void)rewardedVideoLevelPlayDidReceiveRewardForPlacement:(nonnull ISPlacementInfo *)placementInfo withAdInfo:(nonnull ISAdInfo *)adInfo { - NSDictionary *dict = @{@"placement_reward_amount": placementInfo.rewardAmount, - @"placement_reward_name": placementInfo.rewardName, - @"placement_name": placementInfo.placementName}; - NSArray *params = @[dict, [self getAdInfoData:adInfo]]; - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdRewarded", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)hasAvailableAdWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdAvailable", [self getAdInfoData:adInfo].UTF8String); -} - -- (void)hasNoAvailableAd { - UnitySendMessage(IRONSOURCE_REWARDED_VIDEO_EVENTS, "onAdUnavailable",""); - -} - -#pragma mark Rewarded Video DemandOnly Delegate - -- (void)rewardedVideoDidLoad:(NSString *)instanceId{ - NSArray *params = @[instanceId]; - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdLoadedDemandOnly", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)rewardedVideoDidFailToLoadWithError:(NSError *)error instanceId:(NSString *)instanceId{ - NSArray *params; - if (error) - params = @[instanceId, [self parseErrorToEvent:error]]; - else - params = @[instanceId,@""]; - - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdLoadFailedDemandOnly", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)rewardedVideoAdRewarded:(NSString *)instanceId { - NSArray *params = @[instanceId]; - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdRewardedDemandOnly", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)rewardedVideoDidFailToShowWithError:(NSError *)error instanceId:(NSString *)instanceId { - - NSArray *params; - if (error) - params = @[instanceId, [self parseErrorToEvent:error]]; - else - params = @[instanceId,@""]; - - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdShowFailedDemandOnly", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)rewardedVideoDidOpen:(NSString *)instanceId { - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdOpenedDemandOnly", MakeStringCopy(instanceId)); - if (pauseGame) { - UnityPause(1); - } -} - -- (void)rewardedVideoDidClose:(NSString *)instanceId { - if (pauseGame) { - UnityPause(0); - } - [self centerBanner]; - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdClosedDemandOnly", MakeStringCopy(instanceId)); -} - -- (void)rewardedVideoDidClick:(NSString *)instanceId { - NSArray *params = @[instanceId]; - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdClickedDemandOnly", MakeStringCopy([self getJsonFromObj:params])); -} - -#pragma mark Interstitial API - -- (void)loadInterstitial { - [IronSource loadInterstitial]; -} - -- (void)showInterstitial { - [IronSource showInterstitialWithViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; -} - -- (void)showInterstitialWithPlacement:(NSString *)placementName { - [IronSource showInterstitialWithViewController:[UIApplication sharedApplication].keyWindow.rootViewController placement:placementName]; -} - -- (BOOL)isInterstitialReady { - return [IronSource hasInterstitial]; -} - -- (BOOL)isInterstitialPlacementCapped:(NSString *)placementName { - return [IronSource isInterstitialCappedForPlacement:placementName]; -} - -#pragma mark Interstitial DemandOnly API - -- (void)loadISDemandOnlyInterstitial:(NSString *)instanceId { - [IronSource loadISDemandOnlyInterstitial:instanceId]; -} - -- (void)showISDemandOnlyInterstitial:(NSString *)instanceId { - [IronSource showISDemandOnlyInterstitial:[UIApplication sharedApplication].keyWindow.rootViewController instanceId:instanceId]; -} - -- (BOOL)isISDemandOnlyInterstitialReady:(NSString *)instanceId { - return [IronSource hasISDemandOnlyInterstitial:instanceId]; -} - -#pragma mark Interstitial Delegate - -- (void)interstitialDidLoad { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdReady", ""); -} - -- (void)interstitialDidFailToLoadWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdLoadFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdLoadFailed",""); -} - -- (void)interstitialDidOpen { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdOpened", ""); - if (pauseGame) { - UnityPause(1); - } -} - -- (void)interstitialDidClose { - if (pauseGame) { - UnityPause(0); - } - [self centerBanner]; - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdClosed", ""); -} - -- (void)interstitialDidShow { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdShowSucceeded", ""); -} - -- (void)interstitialDidFailToShowWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdShowFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdShowFailed",""); -} - -- (void)didClickInterstitial { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdClicked", ""); -} - -#pragma mark Interstitial Level Play Delegate - -- (void)interstitialLevelPlayDidClickWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdClicked", [self getAdInfoData:adInfo].UTF8String); -} - -- (void)interstitialLevelPlayDidCloseWithAdInfo:(nonnull ISAdInfo *)adInfo { - if (pauseGame) { - UnityPause(0); - } - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdClosed", [self getAdInfoData:adInfo].UTF8String); -} - -- (void)interstitialLevelPlayDidFailToLoadWithError:(nonnull NSError *)error { - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdLoadFailed", MakeStringCopy([self parseErrorToEvent:error])); -} - -- (void)interstitialLevelPlayDidFailToShowWithError:(nonnull NSError *)error andAdInfo:(nonnull ISAdInfo *)adInfo { - NSArray *params = @[(error) ? [self parseErrorToEvent:error] : @"" , [self getAdInfoData:adInfo]]; - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdShowFailed", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)interstitialLevelPlayDidLoadWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdReady", [self getAdInfoData:adInfo].UTF8String); -} - -- (void)interstitialLevelPlayDidOpenWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdOpened", [self getAdInfoData:adInfo].UTF8String); - if (pauseGame) { - UnityPause(1); - } -} - -- (void)interstitialLevelPlayDidShowWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_INTERSTITIAL_EVENTS, "onAdShowSucceeded", [self getAdInfoData:adInfo].UTF8String); -} - -#pragma mark Interstitial DemandOnly Delegate - -- (void)interstitialDidLoad:(NSString *)instanceId { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdReadyDemandOnly", MakeStringCopy(instanceId)); -} - -- (void)interstitialDidFailToLoadWithError:(NSError *)error instanceId:(NSString *)instanceId { - NSArray *parameters; - if (error) - parameters = @[instanceId, [self parseErrorToEvent:error]]; - else - parameters = @[instanceId, @""]; - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdLoadFailedDemandOnly",MakeStringCopy([self getJsonFromObj:parameters])); -} - -- (void)interstitialDidOpen:(NSString *)instanceId { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdOpenedDemandOnly", MakeStringCopy(instanceId)); - if (pauseGame) { - UnityPause(1); - } -} - -- (void)interstitialDidClose:(NSString *)instanceId { - if (pauseGame) { - UnityPause(0); - } - [self centerBanner]; - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdClosedDemandOnly", MakeStringCopy(instanceId)); -} - -- (void)interstitialDidShow:(NSString *)instanceId { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdShowSucceededDemandOnly", MakeStringCopy(instanceId)); -} - -- (void)interstitialDidFailToShowWithError:(NSError *)error instanceId:(NSString *)instanceId { - NSArray *parameters; - if (error) - parameters = @[instanceId, [self parseErrorToEvent:error]]; - else - parameters = @[instanceId, @""]; - - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdShowFailedDemandOnly", MakeStringCopy([self getJsonFromObj:parameters])); -} - -- (void)didClickInterstitial:(NSString *)instanceId { - UnitySendMessage(IRONSOURCE_EVENTS, "onInterstitialAdClickedDemandOnly", MakeStringCopy(instanceId)); -} - -#pragma mark Offerwall API - -- (void)showOfferwall { - [IronSource showOfferwallWithViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; -} - -- (void)showOfferwallWithPlacement:(NSString *)placementName { - [IronSource showOfferwallWithViewController:[UIApplication sharedApplication].keyWindow.rootViewController placement:placementName]; -} - -- (void)getOfferwallCredits { - [IronSource offerwallCredits]; -} - -- (BOOL)isOfferwallAvailable { - return [IronSource hasOfferwall]; -} - -#pragma mark Offerwall Delegate - -- (void)offerwallHasChangedAvailability:(BOOL)available { - UnitySendMessage(IRONSOURCE_EVENTS, "onOfferwallAvailable", (available) ? "true" : "false"); -} - -- (void)offerwallDidShow { - UnitySendMessage(IRONSOURCE_EVENTS, "onOfferwallOpened", ""); -} - -- (void)offerwallDidFailToShowWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onOfferwallShowFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onOfferwallShowFailed", ""); -} - -- (void)offerwallDidClose { - [self centerBanner]; - UnitySendMessage(IRONSOURCE_EVENTS, "onOfferwallClosed", ""); -} - -- (BOOL)didReceiveOfferwallCredits:(NSDictionary *)creditInfo { - if(creditInfo) - UnitySendMessage(IRONSOURCE_EVENTS, "onOfferwallAdCredited", [self getJsonFromObj:creditInfo].UTF8String); - - return YES; -} - -- (void)didFailToReceiveOfferwallCreditsWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onGetOfferwallCreditsFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onGetOfferwallCreditsFailed", ""); -} - -#pragma mark ConsentView API - --(void)loadConsentViewWithType:(NSString *)consentViewType { - [IronSource loadConsentViewWithType: consentViewType]; -} - --(void)showConsentViewWithType:(NSString *)consentViewType { - @synchronized(self) { - UIViewController* viewController = [UIApplication sharedApplication].keyWindow.rootViewController; - [IronSource showConsentViewWithViewController:viewController andType:consentViewType]; - } -} - -#pragma mark Banner API - -- (void)loadBanner:(NSString *)description width:(NSInteger)width height:(NSInteger)height position:(NSInteger)position placement:(NSString *)placement adaptive:(bool) isAdaptive { - @synchronized(self) { - _position = position; - ISBannerSize* size = [self getBannerSize:description width:width height:height]; - size.adaptive = isAdaptive; - - _bannerViewController = [UIApplication sharedApplication].keyWindow.rootViewController; - [IronSource loadBannerWithViewController:_bannerViewController size:size placement:placement]; - } -} - -- (void)destroyBanner { - dispatch_async(dispatch_get_main_queue(), ^{ - @synchronized(self) { - if (_bannerView != nil) { - [IronSource destroyBanner:_bannerView]; - _bannerView = nil; - _bannerViewController = nil; - _shouldHideBanner = NO; - } - } - }); -} - -- (void)displayBanner { - _shouldHideBanner = NO; - dispatch_async(dispatch_get_main_queue(), ^{ - @synchronized(self) { - if (_bannerView != nil) { - [_bannerView setHidden:_shouldHideBanner]; - } - } - }); -} - -- (void)hideBanner { - _shouldHideBanner = YES; - dispatch_async(dispatch_get_main_queue(), ^{ - @synchronized(self) { - if (_bannerView != nil) { - [_bannerView setHidden:_shouldHideBanner]; - } - } - }); -} - -- (BOOL)isBannerPlacementCapped:(NSString *)placementName { - return [IronSource isBannerCappedForPlacement:placementName]; -} - -- (ISBannerSize *) getBannerSize:(NSString *)description width:(NSInteger)width height:(NSInteger)height { - if ([description isEqualToString:@"CUSTOM"]) { - return [[ISBannerSize alloc] initWithWidth:width andHeight:height]; - } - if ([description isEqualToString:@"SMART"]) { - return ISBannerSize_SMART; - } - if ([description isEqualToString:@"RECTANGLE"]) { - return ISBannerSize_RECTANGLE; - } - if ([description isEqualToString:@"LARGE"]) { - return ISBannerSize_LARGE; - } - else { - return ISBannerSize_BANNER; - } -} - -#pragma mark Banner Delegate - -- (CGPoint)getBannerCenter:(NSInteger)position rootView:(UIView *)rootView { - CGFloat y; - if (position == BANNER_POSITION_TOP) { - y = (_bannerView.frame.size.height / 2); - if (@available(ios 11.0, *)) { - y += rootView.safeAreaInsets.top; - } - } - else { - y = rootView.frame.size.height - (_bannerView.frame.size.height / 2); - if (@available(ios 11.0, *)) { - y -= rootView.safeAreaInsets.bottom; - } - } - - return CGPointMake(rootView.frame.size.width / 2, y); -} - -- (void)bannerDidLoad:(ISBannerView *)bannerView { - dispatch_async(dispatch_get_main_queue(), ^{ - @synchronized(self) { - _bannerView = bannerView; - [_bannerView setAccessibilityLabel:@"bannerContainer"]; - [_bannerView setHidden:_shouldHideBanner]; - - _bannerView.center = [self getBannerCenter:_position rootView:_bannerViewController.view]; - [_bannerViewController.view addSubview:_bannerView]; - - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdLoaded", ""); - } - }); -} - -- (void)bannerDidFailToLoadWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdLoadFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdLoadFailed", ""); -} - -- (void)didClickBanner { - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdClicked", ""); -} - -- (void)bannerWillPresentScreen { - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdScreenPresented", ""); -} - -- (void)bannerDidDismissScreen { - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdScreenDismissed", ""); -} - -- (void)bannerWillLeaveApplication { - UnitySendMessage(IRONSOURCE_EVENTS, "onBannerAdLeftApplication", ""); -} - - -- (void)centerBanner { - dispatch_async(dispatch_get_main_queue(), ^{ - @synchronized(self) { - if (_bannerView != nil && _bannerViewController != nil) { - _bannerView.center = [self getBannerCenter:_position rootView:_bannerViewController.view]; - } - } - }); -} - -- (void)orientationChanged:(NSNotification *)notification { - [self centerBanner]; -} - -#pragma mark Banner Level Play Delegate - - -- (void)bannerLevelPlayDidClickWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_BANNER_EVENTS, "onAdClicked", [self getAdInfoData:adInfo].UTF8String); - -} - -- (void)bannerLevelPlayDidDismissScreenWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_BANNER_EVENTS, "onAdScreenDismissed", [self getAdInfoData:adInfo].UTF8String); - -} - -- (void)bannerLevelPlayDidFailToLoadWithError:(nonnull NSError *)error { - UnitySendMessage(IRONSOURCE_BANNER_EVENTS, "onAdLoadFailed", (error) ? MakeStringCopy([self parseErrorToEvent:error]):""); -} - -- (void)bannerLevelPlayDidLeaveApplicationWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_BANNER_EVENTS, "onAdLeftApplication", [self getAdInfoData:adInfo].UTF8String); -} - -- (void)bannerLevelPlayDidLoad:(nonnull ISBannerView *)bannerView withAdInfo:(nonnull ISAdInfo *)adInfo { - dispatch_async(dispatch_get_main_queue(), ^{ - @synchronized(self) { - _bannerView = bannerView; - [_bannerView setAccessibilityLabel:@"bannerContainer"]; - [_bannerView setHidden:_shouldHideBanner]; - - _bannerView.center = [self getBannerCenter:_position rootView:_bannerViewController.view]; - [_bannerViewController.view addSubview:_bannerView]; - - UnitySendMessage(IRONSOURCE_BANNER_EVENTS, "onAdLoaded", [self getAdInfoData:adInfo].UTF8String); - } - }); -} - -- (void)bannerLevelPlayDidPresentScreenWithAdInfo:(nonnull ISAdInfo *)adInfo { - UnitySendMessage(IRONSOURCE_BANNER_EVENTS, "onAdScreenPresented", [self getAdInfoData:adInfo].UTF8String); -} - -#pragma mark Helper methods - -- (void) setSegment:(NSString*) segmentJSON { - [IronSource setSegmentDelegate:self]; - ISSegment *segment = [[ISSegment alloc] init]; - NSError* error; - if (!segmentJSON) - return; - - NSData *data = [segmentJSON dataUsingEncoding:NSUTF8StringEncoding]; - if (!data) - return; - - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; - - if (!dict) - return; - - NSMutableArray *allKeys = [[dict allKeys] mutableCopy]; - for (id key in allKeys) - { - NSString* keyString = (NSString*)key; - NSString *object = [dict objectForKey: keyString]; - if ([keyString isEqualToString:@"age"]){ - segment.age = [object intValue] ; - } - else if([keyString isEqualToString:@"gender"]){ - if([object caseInsensitiveCompare:@"male"] == NSOrderedSame) - segment.gender = IRONSOURCE_USER_MALE ; - else if([object caseInsensitiveCompare:@"female"] == NSOrderedSame) - segment.gender = IRONSOURCE_USER_FEMALE; - - } - else if ([keyString isEqualToString:@"level"]){ - segment.level = [object intValue]; - } - else if ([keyString isEqualToString:@"isPaying"]){ - segment.paying = [object boolValue]; - } - else if ([keyString isEqualToString:@"userCreationDate"]){ - NSDate *date = [NSDate dateWithTimeIntervalSince1970: [object longLongValue]/1000]; - segment.userCreationDate = date; - - } - else if ([keyString isEqualToString:@"segmentName"]){ - segment.segmentName = object; - - } else if ([keyString isEqualToString:@"iapt"]){ - segment.iapTotal = [object doubleValue]; - } - else{ - [segment setCustomValue:object forKey:keyString]; - } - - } - - [IronSource setSegment:segment]; -} - -- (void)didReceiveSegement:(NSString *)segment{ - UnitySendMessage(IRONSOURCE_EVENTS, "onSegmentReceived", MakeStringCopy(segment)); -} - -- (NSString *)parseErrorToEvent:(NSError *)error{ - if (error){ - NSString* codeStr = [NSString stringWithFormat:@"%ld", (long)[error code]]; - - NSDictionary *dict = @{@"error_description": [error localizedDescription], - @"error_code": codeStr}; - - return [self getJsonFromObj:dict]; - } - return nil; -} - -- (NSString *)getJsonFromObj:(id)obj { - NSError *error; - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:obj options:0 error:&error]; - if (!jsonData) { - NSLog(@"Got an error: %@", error); - return @""; - } else { - NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - return jsonString; - } -} - -- (NSString *) getAdInfoData:(ISAdInfo *) adinfo{ - if (adinfo!=nil) { - NSString *adInfoString = [NSString stringWithFormat:@"%@", adinfo]; - return adInfoString; - } - return EMPTY_STRING; -} - -#pragma mark ImpressionData Delegate - -- (void)impressionDataDidSucceed:(ISImpressionData *)impressionData { - if (backgroundCallback!=nil) { - const char * serializedParameters = [self getJsonFromObj:[impressionData all_data]].UTF8String; - backgroundCallback(serializedParameters); - } - UnitySendMessage(IRONSOURCE_EVENTS, "onImpressionSuccess", [self getJsonFromObj:[impressionData all_data]].UTF8String); - -} - -#pragma mark ConsentView Delegate - -- (void)consentViewDidAccept:(NSString *)consentViewType { - UnitySendMessage(IRONSOURCE_EVENTS, "onConsentViewDidAccept", MakeStringCopy(consentViewType)); -} - -- (void)consentViewDidDismiss:(NSString *)consentViewType { - UnitySendMessage(IRONSOURCE_EVENTS, "onConsentViewDidDismiss", MakeStringCopy(consentViewType)); -} - -- (void)consentViewDidFailToLoadWithError:(NSError *)error consentViewType:(NSString *)consentViewType { - NSArray *params; - if (error) - params = @[consentViewType, [self parseErrorToEvent:error]]; - else - params = @[consentViewType, @""]; - - UnitySendMessage(IRONSOURCE_EVENTS, "onConsentViewDidFailToLoadWithError", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)consentViewDidLoadSuccess:(NSString *)consentViewType { - UnitySendMessage(IRONSOURCE_EVENTS, "onConsentViewDidLoadSuccess", MakeStringCopy(consentViewType)); -} - -- (void)consentViewDidFailToShowWithError:(NSError *)error consentViewType:(NSString *)consentViewType { - NSArray *params; - if (error) - params = @[consentViewType, [self parseErrorToEvent:error]]; - else - params = @[consentViewType, @""]; - - UnitySendMessage(IRONSOURCE_EVENTS, "onConsentViewDidFailToShowWithError", MakeStringCopy([self getJsonFromObj:params])); -} - -- (void)consentViewDidShowSuccess:(NSString *)consentViewType { - UnitySendMessage(IRONSOURCE_EVENTS, "onConsentViewDidShowSuccess", MakeStringCopy(consentViewType)); -} - -#pragma mark ConversionValue API - --(const char *) getConversionValue { - NSNumber *conversionValue = [IronSource getConversionValue]; - char *res = MakeStringCopy([conversionValue stringValue]); - return res; -} - -#pragma mark ILRD API -- (void)setAdRevenueData:(NSString *)dataSource impressionData:(NSData *)impressionData { - [IronSource setAdRevenueDataWithDataSource:dataSource impressionData:impressionData]; -} - -#pragma mark TestSuite API -- (void)launchTestSuite { - [IronSource launchTestSuite:[UIApplication sharedApplication].keyWindow.rootViewController]; -} - -#pragma mark - C Section - -#ifdef __cplusplus -extern "C" { -#endif - - typedef struct { - double floor; - double ceiling; - } LPPWaterfallConfigurationData; - - enum LPPAdFormat - { - LPPAdFormatRewardedVideo, - LPPAdFormatInterstitial, - LPPAdFormatBanner - }; - - void RegisterCallback(ISUnityBackgroundCallback func){ - backgroundCallback=func; - } - void RegisterPauseGameFunction(bool func){ - pauseGame=func; - } - - void CFSetPluginData(const char *pluginType, const char *pluginVersion, const char *pluginFrameworkVersion){ - [[iOSBridge start] setPluginDataWithType:GetStringParam(pluginType) pluginVersion:GetStringParam(pluginVersion) pluginFrameworkVersion:GetStringParam(pluginFrameworkVersion)]; - } - - const char *CFGetAdvertiserId(){ - return [[iOSBridge start] getAdvertiserId]; - } - - void CFValidateIntegration(){ - [[iOSBridge start] validateIntegration]; - } - - void CFShouldTrackNetworkState(bool flag){ - [[iOSBridge start] shouldTrackNetworkState:flag]; - } - - bool CFSetDynamicUserId(char *dynamicUserId){ - return [[iOSBridge start] setDynamicUserId:GetStringParam(dynamicUserId)]; - } - - void CFSetAdaptersDebug(bool enabled){ - [[iOSBridge start] setAdaptersDebug:enabled]; - } - - void CFSetUserId(char *userId){ - return [[iOSBridge start] setUserId:GetStringParam(userId)]; - } - - void CFSetConsent (bool consent) { - [[iOSBridge start] setConsent:consent]; - } - - void CFSetMetaData (char *key, char *value) { - [[iOSBridge start] setMetaDataWithKey:GetStringParam(key) value:GetStringParam(value)]; - } - - void CFSetMetaDataWithValues (char *key,const char *values[]) { - NSMutableArray *valuesArray = [NSMutableArray new]; - if(values != nil ) { - int i = 0; - - while (values[i] != nil) { - [valuesArray addObject: [NSString stringWithCString: values[i] encoding:NSASCIIStringEncoding]]; - i++; - } - - [[iOSBridge start] setMetaDataWithKey:GetStringParam(key) values:valuesArray]; - } - } - - void CFSetManualLoadRewardedVideo(bool isOn) { - [[iOSBridge start] setManualLoadRewardedVideo:isOn]; - } - - void CFSetNetworkData (char *networkKey, char *networkData) { - [[iOSBridge start] setNetworkData:GetStringParam(networkKey) data:GetStringParam(networkData)]; - } - -#pragma mark Init SDK - - void CFInit(const char *appKey){ - [[iOSBridge start] initWithAppKey:GetStringParam(appKey)]; - } - - void CFInitWithAdUnits(const char *appKey, const char *adUnits[]){ - NSMutableArray *adUnitsArray = [NSMutableArray new]; - - if(adUnits != nil ) { - int i = 0; - - while (adUnits[i] != nil) { - [adUnitsArray addObject: [NSString stringWithCString: adUnits[i] encoding:NSASCIIStringEncoding]]; - i++; - } - - [[iOSBridge start] initWithAppKey:GetStringParam(appKey) adUnits:adUnitsArray]; - } - } - - void CFInitISDemandOnly(const char *appKey, const char *adUnits[]){ - NSMutableArray *adUnitsArray = [NSMutableArray new]; - - if(adUnits != nil ) { - int i = 0; - - while (adUnits[i] != nil) { - [adUnitsArray addObject: [NSString stringWithCString: adUnits[i] encoding:NSASCIIStringEncoding]]; - i++; - } - [[iOSBridge start] initISDemandOnly:GetStringParam(appKey) adUnits:adUnitsArray]; - } - } - -#pragma mark RewardedVideo API - - void CFLoadRewardedVideo() { - [[iOSBridge start] loadRewardedVideo]; - } - - void CFShowRewardedVideo(){ - [[iOSBridge start] showRewardedVideo]; - } - - void CFShowRewardedVideoWithPlacementName(char *placementName){ - [[iOSBridge start] showRewardedVideoWithPlacement:GetStringParam(placementName)]; - } - - const char *CFGetPlacementInfo(char *placementName){ - return [[iOSBridge start] getPlacementInfo:GetStringParam(placementName)]; - } - - bool CFIsRewardedVideoAvailable(){ - return [[iOSBridge start] isRewardedVideoAvailable]; - } - - bool CFIsRewardedVideoPlacementCapped(char *placementName){ - return [[iOSBridge start] isRewardedVideoPlacementCapped:GetStringParam(placementName)]; - } - - void CFSetRewardedVideoServerParameters(char *jsonString) { - NSData *data = [GetStringParam(jsonString) dataUsingEncoding:NSUTF8StringEncoding]; - if (!data) { - return; - } - - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; - if (dict) { - [[iOSBridge start] setRewardedVideoServerParameters:dict]; - } - } - - void CFClearRewardedVideoServerParameters() { - [[iOSBridge start] clearRewardedVideoServerParameters]; - } - -#pragma mark RewardedVideo DemandOnly API - - void CFShowISDemandOnlyRewardedVideo(char * instanceId){ - [[iOSBridge start] showISDemandOnlyRewardedVideo:GetStringParam(instanceId)]; - } - - void CFLoadISDemandOnlyRewardedVideo(char * instanceId) { - [[iOSBridge start] loadISDemandOnlyRewardedVideo:GetStringParam(instanceId)]; - } - - bool CFIsDemandOnlyRewardedVideoAvailable(char * instanceId) { - return [[iOSBridge start] isDemandOnlyRewardedVideoAvailable:GetStringParam(instanceId)]; - } - -#pragma mark Interstitial API - - void CFLoadInterstitial(){ - [[iOSBridge start] loadInterstitial]; - } - - void CFShowInterstitial(){ - [[iOSBridge start] showInterstitial]; - } - - void CFShowInterstitialWithPlacementName(char *placementName){ - [[iOSBridge start] showInterstitialWithPlacement:GetStringParam(placementName)]; - } - - bool CFIsInterstitialReady(){ - return [[iOSBridge start] isInterstitialReady]; - } - - bool CFIsInterstitialPlacementCapped(char *placementName){ - return [[iOSBridge start] isInterstitialPlacementCapped:GetStringParam(placementName)]; - } - -#pragma mark Interstitial DemandOnly API - - void CFLoadISDemandOnlyInterstitial(char * instanceId) { - [[iOSBridge start] loadISDemandOnlyInterstitial:GetStringParam(instanceId)]; - } - - void CFShowISDemandOnlyInterstitial(char * instanceId) { - [[iOSBridge start] showISDemandOnlyInterstitial:GetStringParam(instanceId)]; - - } - - bool CFIsDemandOnlyInterstitialReady(char * instanceId) { - return [[iOSBridge start] isISDemandOnlyInterstitialReady:GetStringParam(instanceId)]; - } - -#pragma mark Offerwall API - - void CFShowOfferwall(){ - [[iOSBridge start] showOfferwall]; - } - - void CFShowOfferwallWithPlacementName(char *placementName){ - [[iOSBridge start] showOfferwallWithPlacement:GetStringParam(placementName)]; - } - - void CFGetOfferwallCredits(){ - [[iOSBridge start] getOfferwallCredits]; - } - - bool CFIsOfferwallAvailable(){ - return [[iOSBridge start] isOfferwallAvailable]; - } - -#pragma mark Banner API - - void CFLoadBanner(char* description, int width, int height, int position, char* placementName, bool isAdaptive){ - [[iOSBridge start] loadBanner:GetStringParam(description) width:width height:height position:position placement:GetStringParam(placementName) adaptive:isAdaptive]; - } - - void CFDestroyBanner (){ - [[iOSBridge start] destroyBanner]; - } - - void CFDisplayBanner (){ - [[iOSBridge start] displayBanner]; - } - - void CFHideBanner (){ - [[iOSBridge start] hideBanner]; - } - - bool CFIsBannerPlacementCapped (char *placementName){ - return [[iOSBridge start] isBannerPlacementCapped:GetStringParam(placementName)]; - } - -#pragma mark Segment API - - void CFSetSegment (char* jsonString) { - [[iOSBridge start] setSegment:GetStringParam(jsonString)]; - } - -#pragma mark Set Waterfall Configuration API - - void LPPSetWaterfallConfiguration(LPPWaterfallConfigurationData configurationParams, enum LPPAdFormat adFormat) { - ISWaterfallConfigurationBuilder *builder = [ISWaterfallConfiguration builder]; - const double defaultValue = 0.00; - - if (configurationParams.floor != defaultValue) { - NSNumber *floorValue = [NSNumber numberWithDouble:configurationParams.floor]; - [builder setFloor:floorValue]; - } - - if (configurationParams.ceiling != defaultValue) { - NSNumber *ceilingValue = [NSNumber numberWithDouble:configurationParams.ceiling]; - [builder setCeiling:ceilingValue]; - } - - ISWaterfallConfiguration *waterfallConfig = [builder build]; - ISAdUnit *adUnit; - switch (adFormat) { - case LPPAdFormatInterstitial: - adUnit = [ISAdUnit IS_AD_UNIT_INTERSTITIAL]; - break; - case LPPAdFormatRewardedVideo: - adUnit = [ISAdUnit IS_AD_UNIT_REWARDED_VIDEO]; - break; - case LPPAdFormatBanner: - adUnit = [ISAdUnit IS_AD_UNIT_BANNER]; - break; - default: - return; - } - - [IronSource setWaterfallConfiguration:waterfallConfig forAdUnit:adUnit]; - } - -#pragma mark ConsentView API - - void CFLoadConsentViewWithType (char* consentViewType){ - [[iOSBridge start] loadConsentViewWithType:GetStringParam(consentViewType)]; - } - - void CFShowConsentViewWithType (char* consentViewType){ - [[iOSBridge start] showConsentViewWithType:GetStringParam(consentViewType)]; - } - -#pragma mark ConversionValue API - - const char *CFGetConversionValue(){ - return [[iOSBridge start] getConversionValue]; - } - -#pragma mark ILRD API - void CFSetAdRevenueData(char* datasource,char* impressiondata){ - NSData *data=[GetStringParam(impressiondata)dataUsingEncoding:NSUTF8StringEncoding]; - if (!data) { - return; - } - return [[iOSBridge start] setAdRevenueData:GetStringParam(datasource)impressionData:data]; - } - -#pragma mark TestSuite API - void CFLaunchTestSuite(){ - [[iOSBridge start] launchTestSuite]; - } - -#pragma mark - ISRewardedVideoManualDelegate methods - - - - (void)rewardedVideoDidLoad { - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdReady", ""); - } - - - (void)rewardedVideoDidFailToLoadWithError:(NSError *)error { - if (error) - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdLoadFailed", MakeStringCopy([self parseErrorToEvent:error])); - else - UnitySendMessage(IRONSOURCE_EVENTS, "onRewardedVideoAdLoadFailed",""); - - } - - -#ifdef __cplusplus -} -#endif - -@end - diff --git a/Assets/IronSource/Plugins/iOS/iOSBridge.m.meta b/Assets/IronSource/Plugins/iOS/iOSBridge.m.meta deleted file mode 100644 index e25c32b5..00000000 --- a/Assets/IronSource/Plugins/iOS/iOSBridge.m.meta +++ /dev/null @@ -1,37 +0,0 @@ -fileFormatVersion: 2 -guid: d274c5df3069c447d8bb342872e0ae39 -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: 0 - settings: - DefaultValueInitialized: true - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Resources.meta b/Assets/IronSource/Resources.meta deleted file mode 100644 index f1897afb..00000000 --- a/Assets/IronSource/Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1b356eb03b687454a873eed3f62927c9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Resources/IronSourceMediatedNetworkSettings.asset b/Assets/IronSource/Resources/IronSourceMediatedNetworkSettings.asset deleted file mode 100644 index 08232991..00000000 --- a/Assets/IronSource/Resources/IronSourceMediatedNetworkSettings.asset +++ /dev/null @@ -1,17 +0,0 @@ -%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: 11500000, guid: 6dcd730eacb2043e8a6f1c61c16243da, type: 3} - m_Name: IronSourceMediatedNetworkSettings - m_EditorClassIdentifier: - EnableAdmob: 0 - AdmobAndroidAppId: - AdmobIOSAppId: diff --git a/Assets/IronSource/Resources/IronSourceMediatedNetworkSettings.asset.meta b/Assets/IronSource/Resources/IronSourceMediatedNetworkSettings.asset.meta deleted file mode 100644 index 9c072375..00000000 --- a/Assets/IronSource/Resources/IronSourceMediatedNetworkSettings.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ce7253a2d729c6a47a739c2db9e0b72c -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Resources/IronSourceMediationSettings.asset b/Assets/IronSource/Resources/IronSourceMediationSettings.asset deleted file mode 100644 index d5f41c93..00000000 --- a/Assets/IronSource/Resources/IronSourceMediationSettings.asset +++ /dev/null @@ -1,21 +0,0 @@ -%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: 11500000, guid: d5a679b8640d04834b4f09b8c6adec7a, type: 3} - m_Name: IronSourceMediationSettings - m_EditorClassIdentifier: - AndroidAppKey: - IOSAppKey: - EnableIronsourceSDKInitAPI: 0 - AddIronsourceSkadnetworkID: 0 - DeclareAD_IDPermission: 0 - EnableAdapterDebug: 0 - EnableIntegrationHelper: 0 diff --git a/Assets/IronSource/Resources/IronSourceMediationSettings.asset.meta b/Assets/IronSource/Resources/IronSourceMediationSettings.asset.meta deleted file mode 100644 index ff94a98e..00000000 --- a/Assets/IronSource/Resources/IronSourceMediationSettings.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 95c9a43041b09824cbcdb33cb9d5e075 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts.meta b/Assets/IronSource/Scripts.meta deleted file mode 100644 index 5428f14a..00000000 --- a/Assets/IronSource/Scripts.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1bbaa67142d994184844ed2864338043 -folderAsset: yes -timeCreated: 1486985218 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/AdFormat.cs b/Assets/IronSource/Scripts/AdFormat.cs deleted file mode 100644 index 87b7e2e3..00000000 --- a/Assets/IronSource/Scripts/AdFormat.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -/// -/// Represents the available formats for displaying advertisements. -/// -public enum AdFormat -{ - /// - /// Represents a rewarded video ad format. - /// - RewardedVideo, - - /// - /// Represents an interstitial ad format. - /// - Interstitial, - - /// - /// Represents a banner ad format. - /// - Banner -} diff --git a/Assets/IronSource/Scripts/AdFormat.cs.meta b/Assets/IronSource/Scripts/AdFormat.cs.meta deleted file mode 100644 index f7c929c4..00000000 --- a/Assets/IronSource/Scripts/AdFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8124546645b9349f7858c4510ea7de78 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/AndroidAgent.cs b/Assets/IronSource/Scripts/AndroidAgent.cs deleted file mode 100644 index 02822cbe..00000000 --- a/Assets/IronSource/Scripts/AndroidAgent.cs +++ /dev/null @@ -1,386 +0,0 @@ -#if UNITY_ANDROID -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System; - -public class AndroidAgent : IronSourceIAgent -{ - static AndroidJavaObject _androidBridge; - readonly static string AndroidBridge = "com.ironsource.unity.androidbridge.AndroidBridge"; - const string REWARD_AMOUNT = "reward_amount"; - const string REWARD_NAME = "reward_name"; - const string PLACEMENT_NAME = "placement_name"; - - const string WATERFALL_CONFIG_FLOOR = "floor"; - const string WATERFALL_CONFIG_CEILING = "ceiling"; - const string WATERFALL_CONFIG_API = "setWaterfallConfiguration"; - - public AndroidAgent () - { - initEventsDispatcher(); - } - -#region IronSourceIAgent implementation - public AndroidJavaObject getBridge () - { - if (_androidBridge == null) - using (var pluginClass = new AndroidJavaClass( AndroidBridge )) - _androidBridge = pluginClass.CallStatic ("getInstance"); - - return _androidBridge; - } - - private void initEventsDispatcher() - { - IronSourceEventsDispatcher.initialize(); - } - - //******************* Base API *******************// - - /// - /// Allows publishers to set configurations for a waterfall of a given ad type. - /// - /// The configuration for the given ad types waterfall. - /// The AdFormat for which to configure the waterfall. - public void SetWaterfallConfiguration(WaterfallConfiguration waterfallConfiguration, AdFormat adFormat) - { - var ceiling = waterfallConfiguration.Ceiling; - var floor = waterfallConfiguration.Floor; - var dict = new Dictionary(); - - if (ceiling.HasValue) - { - dict.Add(WATERFALL_CONFIG_CEILING, ceiling.Value.ToString(CultureInfo.InvariantCulture)); - } - - if (floor.HasValue) - { - dict.Add(WATERFALL_CONFIG_FLOOR, floor.Value.ToString(CultureInfo.InvariantCulture)); - } - - var json = IronSourceJSON.Json.Serialize(dict); - string stringAdFormat; - - switch (adFormat) - { - case AdFormat.RewardedVideo: - stringAdFormat = "REWARDED_VIDEO"; - break; - case AdFormat.Interstitial: - stringAdFormat = "INTERSTITIAL"; - break; - case AdFormat.Banner: - stringAdFormat = "BANNER"; - break; - default: - return; - } - - getBridge().Call(WATERFALL_CONFIG_API, json, stringAdFormat); - } - - public void onApplicationPause (bool pause) - { - if (pause) - { - getBridge ().Call ("onPause"); - } - else - { - getBridge ().Call ("onResume"); - } - } - - public string getAdvertiserId () - { - return getBridge ().Call ("getAdvertiserId"); - } - - public void validateIntegration () - { - getBridge ().Call ("validateIntegration"); - } - - public void shouldTrackNetworkState (bool track) - { - getBridge ().Call ("shouldTrackNetworkState", track); - } - - public bool setDynamicUserId (string dynamicUserId) - { - return getBridge ().Call ("setDynamicUserId", dynamicUserId); - } - - public void setAdaptersDebug(bool enabled) - { - getBridge ().Call ("setAdaptersDebug", enabled); - } - - public void setMetaData(string key, string value) - { - getBridge().Call("setMetaData", key, value); - } - - public void setMetaData(string key, params string[] values) - { - getBridge().Call("setMetaData", key, values); - } - - public int? getConversionValue() - { - return null; - } - - public void setManualLoadRewardedVideo(bool isOn) - { - getBridge().Call("setManualLoadRewardedVideo", isOn); - } - - public void setNetworkData(string networkKey, string networkData) - { - getBridge().Call("setNetworkData", networkKey, networkData); - } - - public void SetPauseGame (bool pause) - { - - } - - //******************* SDK Init *******************// - - public void setUserId(string userId) { - getBridge ().Call ("setUserId", userId); - } - - public void init(string appKey) - { - getBridge ().Call ("setPluginData", "Unity", IronSource.pluginVersion (), IronSource.unityVersion ()); - Debug.Log ("IntegrationHelper pluginVersion: " + IronSource.pluginVersion ()); - getBridge ().Call ("init", appKey); - } - - public void init (string appKey, params string[] adUnits) - { - getBridge ().Call ("setPluginData", "Unity", IronSource.pluginVersion (), IronSource.unityVersion ()); - Debug.Log ("IntegrationHelper pluginVersion: " + IronSource.pluginVersion ()); - getBridge ().Call ("init", appKey, adUnits); - } - - public void initISDemandOnly (string appKey, params string[] adUnits) - { - getBridge ().Call ("setPluginData", "Unity", IronSource.pluginVersion (), IronSource.unityVersion ()); - Debug.Log ("IntegrationHelper pluginVersion: " + IronSource.pluginVersion ()); - getBridge ().Call ("initISDemandOnly", appKey, adUnits); - } - - //******************* RewardedVideo API *******************// - - public void loadRewardedVideo() - { - getBridge().Call("loadRewardedVideo"); - } - - public void showRewardedVideo () - { - getBridge ().Call ("showRewardedVideo"); - } - - public void showRewardedVideo (string placementName) - { - getBridge ().Call ("showRewardedVideo", placementName); - } - - public bool isRewardedVideoAvailable () - { - return getBridge ().Call ("isRewardedVideoAvailable"); - } - - public bool isRewardedVideoPlacementCapped (string placementName) - { - return getBridge ().Call ("isRewardedVideoPlacementCapped", placementName); - } - - public IronSourcePlacement getPlacementInfo (string placementName) - { - string placementInfo = getBridge ().Call ("getPlacementInfo", placementName); - IronSourcePlacement pInfo = null; - if (placementInfo != null) { - Dictionary pInfoDic = IronSourceJSON.Json.Deserialize (placementInfo) as Dictionary; - string pName = pInfoDic [PLACEMENT_NAME].ToString (); - string rName = pInfoDic [REWARD_NAME].ToString (); - int rAmount = Convert.ToInt32 (pInfoDic [REWARD_AMOUNT].ToString ()); - - pInfo = new IronSourcePlacement (pName, rName, rAmount); - } - return pInfo; - } - - public void setRewardedVideoServerParams(Dictionary parameters) { - string json = IronSourceJSON.Json.Serialize (parameters); - getBridge ().Call ("setRewardedVideoServerParams", json); - } - - public void clearRewardedVideoServerParams() { - getBridge ().Call ("clearRewardedVideoServerParams"); - } - - //******************* RewardedVideo DemandOnly API *******************// - - public void showISDemandOnlyRewardedVideo (string instanceId) - { - getBridge ().Call ("showISDemandOnlyRewardedVideo",instanceId); - } - - public void loadISDemandOnlyRewardedVideo (string instanceId) - { - getBridge ().Call ("loadISDemandOnlyRewardedVideo", instanceId); - } - - public bool isISDemandOnlyRewardedVideoAvailable (string instanceId) - { - return getBridge ().Call ("isISDemandOnlyRewardedVideoAvailable", instanceId); - } - - //******************* Interstitial API *******************// - - public void loadInterstitial () - { - getBridge ().Call ("loadInterstitial"); - } - - public void showInterstitial () - { - getBridge ().Call ("showInterstitial"); - } - - public void showInterstitial (string placementName) - { - getBridge ().Call ("showInterstitial", placementName); - } - - public bool isInterstitialReady () - { - return getBridge ().Call ("isInterstitialReady"); - } - - public bool isInterstitialPlacementCapped (string placementName) - { - return getBridge ().Call ("isInterstitialPlacementCapped", placementName); - } - - //******************* Interstitial DemandOnly API *******************// - - public void loadISDemandOnlyInterstitial (string instanceId) - { - getBridge ().Call ("loadISDemandOnlyInterstitial",instanceId); - } - - public void showISDemandOnlyInterstitial (string instanceId) - { - getBridge ().Call ("showISDemandOnlyInterstitial",instanceId); - } - - public bool isISDemandOnlyInterstitialReady (string instanceId) - { - return getBridge ().Call ("isISDemandOnlyInterstitialReady",instanceId); - } - - //******************* Offerwall API *******************// - - public void showOfferwall () - { - getBridge ().Call ("showOfferwall"); - } - - public void showOfferwall (string placementName) - { - getBridge ().Call ("showOfferwall", placementName); - } - - public void getOfferwallCredits () - { - getBridge ().Call ("getOfferwallCredits"); - } - - public bool isOfferwallAvailable () - { - return getBridge ().Call ("isOfferwallAvailable"); - } - - //******************* Banner API *******************// - - public void loadBanner (IronSourceBannerSize size, IronSourceBannerPosition position) - { - loadBanner(size, position, ""); - } - - public void loadBanner (IronSourceBannerSize size, IronSourceBannerPosition position, string placementName) - { - getBridge().Call("loadBanner", size.Description, (int)size.Width, (int)size.Height, (int)position, placementName, (bool)size.IsAdaptiveEnabled()); - } - - public void destroyBanner() - { - getBridge ().Call ("destroyBanner"); - } - - public void displayBanner() - { - getBridge ().Call ("displayBanner"); - } - - public void hideBanner() - { - getBridge ().Call ("hideBanner"); - } - - public bool isBannerPlacementCapped(string placementName) - { - return getBridge ().Call ("isBannerPlacementCapped", placementName); - } - - public void setSegment(IronSourceSegment segment) - { - Dictionary dict = segment.getSegmentAsDict (); - string json = IronSourceJSON.Json.Serialize (dict); - getBridge ().Call ("setSegment", json); - } - - public void setConsent(bool consent) - { - getBridge().Call("setConsent",consent); - } - - //******************* ConsentView API *******************// - - public void loadConsentViewWithType(string consentViewType) - { - } - - public void showConsentViewWithType(string consentViewType) - { - } - - //******************* ILRD API *******************// - - public void setAdRevenueData(string dataSource, Dictionary impressionData) - { - string json = IronSourceJSON.Json.Serialize(impressionData); - getBridge().Call("setAdRevenueData", dataSource, json); - } - - //******************* TestSuite API *******************// - - public void launchTestSuite() - { - Debug.Log("AndroidAgent: launching TestSuite"); - getBridge().Call("launchTestSuite"); - } - -#endregion -} - -#endif - diff --git a/Assets/IronSource/Scripts/AndroidAgent.cs.meta b/Assets/IronSource/Scripts/AndroidAgent.cs.meta deleted file mode 100644 index 06e04e6b..00000000 --- a/Assets/IronSource/Scripts/AndroidAgent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ffd532cc04826485496fa8f2f3297a29 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityBanner.cs b/Assets/IronSource/Scripts/IUnityBanner.cs deleted file mode 100644 index 092f4d79..00000000 --- a/Assets/IronSource/Scripts/IUnityBanner.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - public interface IUnityBanner - { - - event Action OnBannerAdLoaded; - - event Action OnBannerAdLeftApplication; - - event Action OnBannerAdScreenDismissed; - - event Action OnBannerAdScreenPresented; - - event Action OnBannerAdClicked; - - event Action OnBannerAdLoadFailed; - -} diff --git a/Assets/IronSource/Scripts/IUnityBanner.cs.meta b/Assets/IronSource/Scripts/IUnityBanner.cs.meta deleted file mode 100644 index 162df4d0..00000000 --- a/Assets/IronSource/Scripts/IUnityBanner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f665578d6e194d8ca540e4354f59aaf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityImpressionData.cs b/Assets/IronSource/Scripts/IUnityImpressionData.cs deleted file mode 100644 index 764f2cf4..00000000 --- a/Assets/IronSource/Scripts/IUnityImpressionData.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -public interface IUnityImpressionData -{ - event Action OnImpressionDataReady; - - event Action OnImpressionSuccess; -} diff --git a/Assets/IronSource/Scripts/IUnityImpressionData.cs.meta b/Assets/IronSource/Scripts/IUnityImpressionData.cs.meta deleted file mode 100644 index 334ceb10..00000000 --- a/Assets/IronSource/Scripts/IUnityImpressionData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 637cb01eec78d4bbf9fc544b516e3c91 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityInitialization.cs b/Assets/IronSource/Scripts/IUnityInitialization.cs deleted file mode 100644 index 727b0a22..00000000 --- a/Assets/IronSource/Scripts/IUnityInitialization.cs +++ /dev/null @@ -1,5 +0,0 @@ -using System; -public interface IUnityInitialization -{ - event Action OnSdkInitializationCompletedEvent; -} diff --git a/Assets/IronSource/Scripts/IUnityInitialization.cs.meta b/Assets/IronSource/Scripts/IUnityInitialization.cs.meta deleted file mode 100644 index 98bf40c7..00000000 --- a/Assets/IronSource/Scripts/IUnityInitialization.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eac9abe7c14eb496da2bf267ae5298df -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityInterstitial.cs b/Assets/IronSource/Scripts/IUnityInterstitial.cs deleted file mode 100644 index b39de071..00000000 --- a/Assets/IronSource/Scripts/IUnityInterstitial.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -public interface IUnityInterstitial -{ - //Mediation Interstitial callbacks - event Action OnInterstitialAdShowFailed; - - event Action OnInterstitialAdLoadFailed; - - event Action OnInterstitialAdReady; - - event Action OnInterstitialAdOpened; - - event Action OnInterstitialAdClosed; - - event Action OnInterstitialAdShowSucceeded; - - event Action OnInterstitialAdClicked; - - //Rewarded Interstitial callback - event Action OnInterstitialAdRewarded; - - //Demand Only Interstitial callbacks - event Action OnInterstitialAdReadyDemandOnly; - - event Action OnInterstitialAdOpenedDemandOnly; - - event Action OnInterstitialAdClosedDemandOnly; - - event Action OnInterstitialAdLoadFailedDemandOnly; - - event Action OnInterstitialAdClickedDemandOnly; - - event Action OnInterstitialAdShowFailedDemandOnly; - -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IUnityInterstitial.cs.meta b/Assets/IronSource/Scripts/IUnityInterstitial.cs.meta deleted file mode 100644 index a70f670b..00000000 --- a/Assets/IronSource/Scripts/IUnityInterstitial.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 45bab60683d314f0fb0bc29687323406 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayBanner.cs b/Assets/IronSource/Scripts/IUnityLevelPlayBanner.cs deleted file mode 100644 index 712a6dd6..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayBanner.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -public interface IUnityLevelPlayBanner -{ - event Action OnAdLoaded; - - event Action OnAdLeftApplication; - - event Action OnAdScreenDismissed; - - event Action OnAdScreenPresented; - - event Action OnAdClicked; - - event Action OnAdLoadFailed; -} diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayBanner.cs.meta b/Assets/IronSource/Scripts/IUnityLevelPlayBanner.cs.meta deleted file mode 100644 index 7155c1c7..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayBanner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5013c371a692d4a8f919e0fb65008557 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayInterstitial.cs b/Assets/IronSource/Scripts/IUnityLevelPlayInterstitial.cs deleted file mode 100644 index 7116468a..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayInterstitial.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -public interface IUnityLevelPlayInterstitial -{ - //Mediation Interstitial callbacks - event Action OnAdShowFailed; - - event Action OnAdLoadFailed; - - event Action OnAdReady; - - event Action OnAdOpened; - - event Action OnAdClosed; - - event Action OnAdShowSucceeded; - - event Action OnAdClicked; -} diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayInterstitial.cs.meta b/Assets/IronSource/Scripts/IUnityLevelPlayInterstitial.cs.meta deleted file mode 100644 index 2ae0b251..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayInterstitial.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9951bdafc5056462bbc136e9adc4f7f1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideo.cs b/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideo.cs deleted file mode 100644 index 9cc6f1dc..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideo.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -public interface IUnityLevelPlayRewardedVideo -{ - event Action OnAdShowFailed; - - event Action OnAdOpened; - - event Action OnAdClosed; - - event Action OnAdRewarded; - - event Action OnAdClicked; - - event Action OnAdAvailable; - - event Action OnAdUnavailable; -} diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideo.cs.meta b/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideo.cs.meta deleted file mode 100644 index ee93508f..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7ad572294dc0047d7b3c83416751b2cc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideoManual.cs b/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideoManual.cs deleted file mode 100644 index 7e724c4a..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideoManual.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -public interface IUnityLevelPlayRewardedVideoManual -{ - event Action OnAdReady; - - event Action OnAdLoadFailed; -} diff --git a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideoManual.cs.meta b/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideoManual.cs.meta deleted file mode 100644 index 923fb808..00000000 --- a/Assets/IronSource/Scripts/IUnityLevelPlayRewardedVideoManual.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 388ad82402b634912bc5aac2a9a3bfb5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityOfferwall.cs b/Assets/IronSource/Scripts/IUnityOfferwall.cs deleted file mode 100644 index 3577c18b..00000000 --- a/Assets/IronSource/Scripts/IUnityOfferwall.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -public interface IUnityOfferwall - { - - event Action OnOfferwallShowFailed; - - event Action OnOfferwallOpened; - - event Action OnOfferwallClosed; - - event Action OnGetOfferwallCreditsFailed; - - event Action> OnOfferwallAdCredited; - - event Action OnOfferwallAvailable; - -} diff --git a/Assets/IronSource/Scripts/IUnityOfferwall.cs.meta b/Assets/IronSource/Scripts/IUnityOfferwall.cs.meta deleted file mode 100644 index 92835dc3..00000000 --- a/Assets/IronSource/Scripts/IUnityOfferwall.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b24d4066642d54d33a8100dd8c4860cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityRewardedVideo.cs b/Assets/IronSource/Scripts/IUnityRewardedVideo.cs deleted file mode 100644 index bf37c729..00000000 --- a/Assets/IronSource/Scripts/IUnityRewardedVideo.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; - -public interface IUnityRewardedVideo -{ - //Rewarded Video mediation callbacks - event Action OnRewardedVideoAdShowFailed; - - event Action OnRewardedVideoAdOpened; - - event Action OnRewardedVideoAdClosed; - - event Action OnRewardedVideoAdStarted; - - event Action OnRewardedVideoAdEnded; - - event Action OnRewardedVideoAdRewarded; - - event Action OnRewardedVideoAdClicked; - - event Action OnRewardedVideoAvailabilityChanged; - - //Rewarded Video Demand Only callbacks - - event Action OnRewardedVideoAdOpenedDemandOnlyEvent; - - event Action OnRewardedVideoAdClosedDemandOnlyEvent; - - event Action OnRewardedVideoAdLoadedDemandOnlyEvent; - - event Action OnRewardedVideoAdRewardedDemandOnlyEvent; - - event Action OnRewardedVideoAdShowFailedDemandOnlyEvent; - - event Action OnRewardedVideoAdClickedDemandOnlyEvent; - - event Action OnRewardedVideoAdLoadFailedDemandOnlyEvent; - -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IUnityRewardedVideo.cs.meta b/Assets/IronSource/Scripts/IUnityRewardedVideo.cs.meta deleted file mode 100644 index ef38f1c3..00000000 --- a/Assets/IronSource/Scripts/IUnityRewardedVideo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3ac2f395682c74628a5045c3d0971680 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnityRewardedVideoManual.cs b/Assets/IronSource/Scripts/IUnityRewardedVideoManual.cs deleted file mode 100644 index 723085f1..00000000 --- a/Assets/IronSource/Scripts/IUnityRewardedVideoManual.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -public interface IUnityRewardedVideoManual -{ - event Action OnRewardedVideoAdReady; - - event Action OnRewardedVideoAdLoadFailed; - -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IUnityRewardedVideoManual.cs.meta b/Assets/IronSource/Scripts/IUnityRewardedVideoManual.cs.meta deleted file mode 100644 index b5b3ab0e..00000000 --- a/Assets/IronSource/Scripts/IUnityRewardedVideoManual.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e7eb3a115d054adfa30c15d19855c87 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IUnitySegment.cs b/Assets/IronSource/Scripts/IUnitySegment.cs deleted file mode 100644 index 799cb067..00000000 --- a/Assets/IronSource/Scripts/IUnitySegment.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System; - -public interface IUnitySegment -{ - event Action OnSegmentRecieved; -} diff --git a/Assets/IronSource/Scripts/IUnitySegment.cs.meta b/Assets/IronSource/Scripts/IUnitySegment.cs.meta deleted file mode 100644 index e375bd19..00000000 --- a/Assets/IronSource/Scripts/IUnitySegment.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8a074083ed47f464c9e337cce695a621 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSource.cs b/Assets/IronSource/Scripts/IronSource.cs deleted file mode 100644 index 25c40e3c..00000000 --- a/Assets/IronSource/Scripts/IronSource.cs +++ /dev/null @@ -1,364 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System; - -public class IronSource : IronSourceIAgent -{ - private IronSourceIAgent _platformAgent; - private static IronSource _instance; - public static string UNITY_PLUGIN_VERSION = "7.3.1.1-r"; - private static bool isUnsupportedPlatform; - - private IronSource() - { - if (!isUnsupportedPlatform) - { -#if UNITY_EDITOR || UNITY_STANDALONE - _platformAgent = new UnsupportedPlatformAgent(); -#elif (UNITY_IPHONE || UNITY_IOS) - _platformAgent = new iOSAgent(); -#elif UNITY_ANDROID - _platformAgent = new AndroidAgent (); -#endif - } - - else - { - _platformAgent = new UnsupportedPlatformAgent(); - } - var ironSourceType = typeof(IronSourceEvents); - var ironSourceRewardedType = typeof(IronSourceRewardedVideoEvents); - var ironSourceInterstitialType = typeof(IronSourceInterstitialEvents); - var ironSourceBannerType = typeof(IronSourceBannerEvents); - var ironSourceEvents = new GameObject("IronSourceEvents", ironSourceType).GetComponent(); // Creates IronSourceEvents gameObject - var ironSourceRewardedVideoEvents = new GameObject("IronSourceRewardedVideoEvents", ironSourceRewardedType).GetComponent(); // Creates IronSourceRewardedVideoEvents gameObject - var ironSourceInterstitialEvents = new GameObject("IronSourceInterstitialEvents", ironSourceInterstitialType).GetComponent(); // Creates IronSourceInterstitialEvents gameObject - var ironSourceBannerEvents = new GameObject("IronSourceBannerEvents", ironSourceBannerType).GetComponent(); // Creates IronSourceBannerEvents gameObject - } - - #region IronSourceIAgent implementation - public static IronSource Agent - { - get - { - if (_instance == null) - { - _instance = new IronSource(); - } - return _instance; - } - } - - public static string pluginVersion() - { - return UNITY_PLUGIN_VERSION; - } - - public static string unityVersion() - { - return Application.unityVersion; - } - - public static void setUnsupportedPlatform() - { - isUnsupportedPlatform = true; - } - - //******************* Base API *******************// - - /// - /// Allows publishers to set configurations for a waterfall of a given ad type. - /// - /// The configuration for the given ad types waterfall. - /// The AdFormat for which to configure the waterfall. - public void SetWaterfallConfiguration(WaterfallConfiguration waterfallConfiguration, AdFormat adFormat) - { - _platformAgent.SetWaterfallConfiguration(waterfallConfiguration, adFormat); - } - - public void onApplicationPause(bool pause) - { - _platformAgent.onApplicationPause(pause); - } - - public string getAdvertiserId() - { - return _platformAgent.getAdvertiserId(); - } - - public void validateIntegration() - { - _platformAgent.validateIntegration(); - } - - public void shouldTrackNetworkState(bool track) - { - _platformAgent.shouldTrackNetworkState(track); - } - - public bool setDynamicUserId(string dynamicUserId) - { - return _platformAgent.setDynamicUserId(dynamicUserId); - } - - public void setAdaptersDebug(bool enabled) - { - _platformAgent.setAdaptersDebug(enabled); - } - - public void setMetaData(string key, string value) - { - _platformAgent.setMetaData(key, value); - } - - public void setMetaData(string key, params string[] values) - { - _platformAgent.setMetaData(key, values); - } - - public int? getConversionValue() - { - return _platformAgent.getConversionValue(); - } - - public void setManualLoadRewardedVideo(bool isOn) - { - _platformAgent.setManualLoadRewardedVideo(isOn); - } - - public void setNetworkData(string networkKey, string networkData) - { - _platformAgent.setNetworkData(networkKey, networkData); - } - - public void SetPauseGame(bool pause) - { - _platformAgent.SetPauseGame(pause); - } - - //******************* SDK Init *******************// - - public void setUserId(string userId) - { - _platformAgent.setUserId(userId); - } - - public void init(string appKey) - { - _platformAgent.init(appKey); - } - - public void init(string appKey, params string[] adUnits) - { - _platformAgent.init(appKey, adUnits); - } - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public void initISDemandOnly(string appKey, params string[] adUnits) - { - _platformAgent.initISDemandOnly(appKey, adUnits); - } - - //******************* RewardedVideo API *******************// - - public void loadRewardedVideo() - { - _platformAgent.loadRewardedVideo(); - } - - - public void showRewardedVideo() - { - _platformAgent.showRewardedVideo(); - } - - public void showRewardedVideo(string placementName) - { - _platformAgent.showRewardedVideo(placementName); - } - - public IronSourcePlacement getPlacementInfo(string placementName) - { - return _platformAgent.getPlacementInfo(placementName); - } - - public bool isRewardedVideoAvailable() - { - return _platformAgent.isRewardedVideoAvailable(); - } - - public bool isRewardedVideoPlacementCapped(string placementName) - { - return _platformAgent.isRewardedVideoPlacementCapped(placementName); - } - - public void setRewardedVideoServerParams(Dictionary parameters) - { - _platformAgent.setRewardedVideoServerParams(parameters); - } - - public void clearRewardedVideoServerParams() - { - _platformAgent.clearRewardedVideoServerParams(); - } - - //******************* RewardedVideo DemandOnly API *******************// - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public void showISDemandOnlyRewardedVideo(string instanceId) - { - _platformAgent.showISDemandOnlyRewardedVideo(instanceId); - } - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public void loadISDemandOnlyRewardedVideo(string instanceId) - { - _platformAgent.loadISDemandOnlyRewardedVideo(instanceId); - } - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public bool isISDemandOnlyRewardedVideoAvailable(string instanceId) - { - return _platformAgent.isISDemandOnlyRewardedVideoAvailable(instanceId); - } - - //******************* Interstitial API *******************// - - public void loadInterstitial() - { - _platformAgent.loadInterstitial(); - } - - public void showInterstitial() - { - _platformAgent.showInterstitial(); - } - - public void showInterstitial(string placementName) - { - _platformAgent.showInterstitial(placementName); - } - - public bool isInterstitialReady() - { - return _platformAgent.isInterstitialReady(); - } - - public bool isInterstitialPlacementCapped(string placementName) - { - return _platformAgent.isInterstitialPlacementCapped(placementName); - } - - //******************* Interstitial DemandOnly API *******************// - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public void loadISDemandOnlyInterstitial(string instanceId) - { - _platformAgent.loadISDemandOnlyInterstitial(instanceId); - } - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public void showISDemandOnlyInterstitial(string instanceId) - { - _platformAgent.showISDemandOnlyInterstitial(instanceId); - } - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public bool isISDemandOnlyInterstitialReady(string instanceId) - { - return _platformAgent.isISDemandOnlyInterstitialReady(instanceId); - } - - //******************* Offerwall API *******************// - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public void showOfferwall() - { - _platformAgent.showOfferwall(); - } - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public void showOfferwall(string placementName) - { - _platformAgent.showOfferwall(placementName); - } - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public void getOfferwallCredits() - { - _platformAgent.getOfferwallCredits(); - } - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public bool isOfferwallAvailable() - { - return _platformAgent.isOfferwallAvailable(); - } - - //******************* Banner API *******************// - - public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position) - { - _platformAgent.loadBanner(size, position); - } - - public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position, string placementName) - { - _platformAgent.loadBanner(size, position, placementName); - } - - public void destroyBanner() - { - _platformAgent.destroyBanner(); - } - - public void displayBanner() - { - _platformAgent.displayBanner(); - } - - public void hideBanner() - { - _platformAgent.hideBanner(); - } - - - public bool isBannerPlacementCapped(string placementName) - { - return _platformAgent.isBannerPlacementCapped(placementName); - - } - - public void setSegment(IronSourceSegment segment) - { - _platformAgent.setSegment(segment); - } - - public void setConsent(bool consent) - { - _platformAgent.setConsent(consent); - } - - //******************* ConsentView API *******************// - - public void loadConsentViewWithType(string consentViewType) - { - _platformAgent.loadConsentViewWithType(consentViewType); - } - - public void showConsentViewWithType(string consentViewType) - { - _platformAgent.showConsentViewWithType(consentViewType); - } - - //******************* ILRD API *******************// - - public void setAdRevenueData(string dataSource, Dictionary impressionData) - { - _platformAgent.setAdRevenueData(dataSource, impressionData); - } - - //******************* TestSuite API *******************// - - public void launchTestSuite() - { - _platformAgent.launchTestSuite(); - } - - #endregion -} diff --git a/Assets/IronSource/Scripts/IronSource.cs.meta b/Assets/IronSource/Scripts/IronSource.cs.meta deleted file mode 100644 index 3fa9fddf..00000000 --- a/Assets/IronSource/Scripts/IronSource.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4bdc65e6705ae4869a0d5df13f868924 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceAdInfo.cs b/Assets/IronSource/Scripts/IronSourceAdInfo.cs deleted file mode 100644 index f1afc532..00000000 --- a/Assets/IronSource/Scripts/IronSourceAdInfo.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using UnityEngine; - -public class IronSourceAdInfo -{ - - public readonly string auctionId; - public readonly string adUnit; - public readonly string country; - public readonly string ab; - public readonly string segmentName; - public readonly string adNetwork; - public readonly string instanceName; - public readonly string instanceId; - public readonly double? revenue; - public readonly string precision; - public readonly double? lifetimeRevenue; - public readonly string encryptedCPM; - - - - - public IronSourceAdInfo(string json) - { - if (json != null && json != IronSourceConstants.EMPTY_STRING) - { - try - { - object obj; - double parsedDouble; - - - // Retrieve a CultureInfo object. - CultureInfo invCulture = CultureInfo.InvariantCulture; - Dictionary jsonDic = IronSourceJSON.Json.Deserialize(json) as Dictionary; - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_AUCTION_ID, out obj) && obj != null) - { - auctionId = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_AD_UNIT, out obj) && obj != null) - { - adUnit = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_COUNTRY, out obj) && obj != null) - { - country = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_ABTEST, out obj) && obj != null) - { - ab = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_SEGMENT_NAME, out obj) && obj != null) - { - segmentName = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_AD_NETWORK, out obj) && obj != null) - { - adNetwork = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_INSTANCE_NAME, out obj) && obj != null) - { - instanceName = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.INSTANCE_ID_KEY, out obj) && obj != null) - { - instanceId = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_PRECISION, out obj) && obj != null) - { - precision = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_ENCRYPTED_CPM, out obj) && obj != null) - { - encryptedCPM = obj.ToString(); - } - - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_REVENUE, out obj) && obj != null && double.TryParse(string.Format(invCulture, "{0}", obj), NumberStyles.Any, invCulture, out parsedDouble)) - { - revenue = parsedDouble; - } - - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_LIFETIME_REVENUE, out obj) && obj != null && double.TryParse(string.Format(invCulture, "{0}", obj), NumberStyles.Any, invCulture, out parsedDouble)) - { - lifetimeRevenue = parsedDouble; - } - - - - } - catch (Exception ex) - { - Debug.Log("error parsing ad info " + ex.ToString()); - } - - } - } - - public override string ToString() - { - return "IronSourceAdInfo {" + - "auctionId='" + auctionId + '\'' + - ", adUnit='" + adUnit + '\'' + - ", country='" + country + '\'' + - ", ab='" + ab + '\'' + - ", segmentName='" + segmentName + '\'' + - ", adNetwork='" + adNetwork + '\'' + - ", instanceName='" + instanceName + '\'' + - ", instanceId='" + instanceId + '\'' + - ", revenue=" + revenue + - ", precision='" + precision + '\'' + - ", lifetimeRevenue=" + lifetimeRevenue + - ", encryptedCPM='" + encryptedCPM + '\'' + - '}'; - } -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceAdInfo.cs.meta b/Assets/IronSource/Scripts/IronSourceAdInfo.cs.meta deleted file mode 100644 index be8aa1c3..00000000 --- a/Assets/IronSource/Scripts/IronSourceAdInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b609b2b349f1848f9acde9b07176e2da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceBannerAndroid.cs b/Assets/IronSource/Scripts/IronSourceBannerAndroid.cs deleted file mode 100644 index 191f64f5..00000000 --- a/Assets/IronSource/Scripts/IronSourceBannerAndroid.cs +++ /dev/null @@ -1,79 +0,0 @@ -#if UNITY_ANDROID -using System; -using UnityEngine; - -public class IronSourceBannerAndroid : AndroidJavaProxy, IUnityBanner -{ - - public event Action OnBannerAdLoaded = delegate { }; - public event Action OnBannerAdLeftApplication = delegate { }; - public event Action OnBannerAdScreenDismissed = delegate { }; - public event Action OnBannerAdScreenPresented = delegate { }; - public event Action OnBannerAdClicked = delegate { }; - public event Action OnBannerAdLoadFailed = delegate { }; - - //implements UnityInterstitialListener java interface and implement banner callbacks - public IronSourceBannerAndroid() : base(IronSourceConstants.bannerBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityBannerListener", this); - } - - } - catch(Exception e) - { - Debug.LogError("setUnityBannerListener method doesn't exist, error: " + e.Message); - } - - } - - void onBannerAdLoaded() - { - if (OnBannerAdLoaded != null) - { - OnBannerAdLoaded(); - } - - } - void onBannerAdLoadFailed(String args) - { - if (OnBannerAdLoadFailed != null) - { - IronSourceError error = IronSourceUtils.getErrorFromErrorObject(args); - OnBannerAdLoadFailed(error); - } - } - void onBannerAdClicked() - { - if (OnBannerAdClicked != null) - { - OnBannerAdClicked(); - } - } - void onBannerAdScreenPresented() - { - if (OnBannerAdScreenPresented != null) - { - OnBannerAdScreenPresented(); - } - } - void onBannerAdScreenDismissed() - { - if (OnBannerAdScreenDismissed != null) - { - OnBannerAdScreenDismissed(); - } - } - void onBannerAdLeftApplication() - { - if (OnBannerAdLeftApplication != null) - { - OnBannerAdLeftApplication(); - } - } -} -#endif diff --git a/Assets/IronSource/Scripts/IronSourceBannerAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceBannerAndroid.cs.meta deleted file mode 100644 index e886d06d..00000000 --- a/Assets/IronSource/Scripts/IronSourceBannerAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cd64705e85b444ba2a76fa6dfeb3986b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceBannerEvents.cs b/Assets/IronSource/Scripts/IronSourceBannerEvents.cs deleted file mode 100644 index 379fd9a2..00000000 --- a/Assets/IronSource/Scripts/IronSourceBannerEvents.cs +++ /dev/null @@ -1,353 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - - -public class IronSourceBannerEvents : MonoBehaviour -{ - -#if UNITY_ANDROID - #pragma warning disable CS0067 - public static event Action onAdLoadedEvent; - public static event Action onAdLeftApplicationEvent; - public static event Action onAdScreenDismissedEvent; - public static event Action onAdScreenPresentedEvent; - public static event Action onAdClickedEvent; - public static event Action onAdLoadFailedEvent; -#endif - -#if UNITY_ANDROID - private IUnityLevelPlayBanner LevelPlaybannerAndroid; -#endif - - void Awake() - { -#if UNITY_ANDROID && !UNITY_EDITOR - LevelPlaybannerAndroid = new IronSourceBannerLevelPlayAndroid();//sets this.bannerAndroid as listener for Banner(Mediation Only) events in the bridge - registerBannerEvents();//subscribe to Banner events from this.bannerAndroid - -#endif - - gameObject.name = "IronSourceBannerEvents"; //Change the GameObject name to IronSourceEvents. - DontDestroyOnLoad(gameObject); //Makes the object not be destroyed automatically when loading a new scene. - } - -#if UNITY_ANDROID && !UNITY_EDITOR - - private void registerBannerEvents() - { - LevelPlaybannerAndroid.OnAdLoaded += (IronSourceAdInfo) => - { - if (onAdLoadedEvent!= null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdLoadedEvent?.Invoke(IronSourceAdInfo); - }); - } - - }; - - LevelPlaybannerAndroid.OnAdClicked += (IronSourceAdInfo) => - { - if (onAdClickedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdClickedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlaybannerAndroid.OnAdLoadFailed += (ironSourceError) => - { - if (onAdLoadFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdLoadFailedEvent?.Invoke(ironSourceError); - }); - } - }; - - LevelPlaybannerAndroid.OnAdLeftApplication += (IronSourceAdInfo) => - { - if (onAdLeftApplicationEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdLeftApplicationEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlaybannerAndroid.OnAdScreenDismissed += (IronSourceAdInfo) => - { - if (onAdScreenDismissedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdScreenDismissedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlaybannerAndroid.OnAdScreenPresented += (IronSourceAdInfo) => - { - if (onAdScreenPresentedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdScreenPresentedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - } - -#endif - -#if !UNITY_ANDROID - - // ******************************* Banner Events ******************************* - private static event Action _onAdLoadedEvent; - - public static event Action onAdLoadedEvent - { - add - { - if (_onAdLoadedEvent - == null || !_onAdLoadedEvent - .GetInvocationList().Contains(value)) - { - _onAdLoadedEvent - += value; - } - } - - remove - { - if (_onAdLoadedEvent - != null || _onAdLoadedEvent - .GetInvocationList().Contains(value)) - { - _onAdLoadedEvent - -= value; - } - } - } - - public void onAdLoaded(string args) - { - if (_onAdLoadedEvent != null) { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdLoadedEvent(adInfo); - } - - } - - private static event Action _onAdLoadFailedEvent; - - public static event Action onAdLoadFailedEvent - { - add - { - if (_onAdLoadFailedEvent == null || !_onAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onAdLoadFailedEvent += value; - } - } - - remove - { - if (_onAdLoadFailedEvent != null && _onAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onAdLoadFailedEvent -= value; - } - } - } - - public void onAdLoadFailed(string description) - { - if (_onAdLoadFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onAdLoadFailedEvent(sse); - } - - } - - private static event Action _onAdClickedEvent; - - public static event Action onAdClickedEvent - { - add - { - if (_onAdClickedEvent == null || !_onAdClickedEvent.GetInvocationList().Contains(value)) - { - _onAdClickedEvent += value; - } - } - - remove - { - if (_onAdClickedEvent != null && _onAdClickedEvent.GetInvocationList().Contains(value)) - { - _onAdClickedEvent -= value; - } - } - } - - public void onAdClicked(string args) - { - if (_onAdClickedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdClickedEvent(adInfo); - } - - } - - private static event Action _onAdScreenPresentedEvent; - - public static event Action onAdScreenPresentedEvent - { - add - { - if (_onAdScreenPresentedEvent == null || !_onAdScreenPresentedEvent.GetInvocationList().Contains(value)) - { - _onAdScreenPresentedEvent += value; - } - } - - remove - { - if (_onAdScreenPresentedEvent != null && _onAdScreenPresentedEvent.GetInvocationList().Contains(value)) - { - _onAdScreenPresentedEvent -= value; - } - } - } - - public void onAdScreenPresented(string args) - { - if (_onAdScreenPresentedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdScreenPresentedEvent(adInfo); - } - - } - - private static event Action _onAdScreenDismissedEvent; - - public static event Action onAdScreenDismissedEvent - { - add - { - if (_onAdScreenDismissedEvent == null || !_onAdScreenDismissedEvent.GetInvocationList().Contains(value)) - { - _onAdScreenDismissedEvent += value; - } - } - - remove - { - if (_onAdScreenDismissedEvent != null && _onAdScreenDismissedEvent.GetInvocationList().Contains(value)) - { - _onAdScreenDismissedEvent -= value; - } - } - } - - public void onAdScreenDismissed(string args) - { - if (_onAdScreenDismissedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdScreenDismissedEvent(adInfo); - } - } - - private static event Action _onAdLeftApplicationEvent; - - public static event Action onAdLeftApplicationEvent - { - add - { - if (_onAdLeftApplicationEvent == null || !_onAdLeftApplicationEvent.GetInvocationList().Contains(value)) - { - _onAdLeftApplicationEvent += value; - } - } - - remove - { - if (_onAdLeftApplicationEvent != null && _onAdLeftApplicationEvent.GetInvocationList().Contains(value)) - { - _onAdLeftApplicationEvent -= value; - } - } - } - - public void onAdLeftApplication(string args) - { - if (_onAdLeftApplicationEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdLeftApplicationEvent(adInfo); - } - } -#endif - - // ******************************* Helper methods ******************************* - - private IronSourceError getErrorFromErrorObject(object descriptionObject) - { - Dictionary error = null; - if (descriptionObject is IDictionary) - { - error = descriptionObject as Dictionary; - } - else if (descriptionObject is String && !String.IsNullOrEmpty(descriptionObject.ToString())) - { - error = IronSourceJSON.Json.Deserialize(descriptionObject.ToString()) as Dictionary; - } - - IronSourceError sse = new IronSourceError(-1, ""); - if (error != null && error.Count > 0) - { - int eCode = Convert.ToInt32(error[IronSourceConstants.ERROR_CODE].ToString()); - string eDescription = error[IronSourceConstants.ERROR_DESCRIPTION].ToString(); - sse = new IronSourceError(eCode, eDescription); - } - - return sse; - } - - private IronSourcePlacement getPlacementFromObject(object placementObject) - { - Dictionary placementJSON = null; - if (placementObject is IDictionary) - { - placementJSON = placementObject as Dictionary; - } - else if (placementObject is String) - { - placementJSON = IronSourceJSON.Json.Deserialize(placementObject.ToString()) as Dictionary; - } - - IronSourcePlacement ssp = null; - if (placementJSON != null && placementJSON.Count > 0) - { - int rewardAmount = Convert.ToInt32(placementJSON["placement_reward_amount"].ToString()); - string rewardName = placementJSON["placement_reward_name"].ToString(); - string placementName = placementJSON["placement_name"].ToString(); - - ssp = new IronSourcePlacement(placementName, rewardName, rewardAmount); - } - - return ssp; - } -} diff --git a/Assets/IronSource/Scripts/IronSourceBannerEvents.cs.meta b/Assets/IronSource/Scripts/IronSourceBannerEvents.cs.meta deleted file mode 100644 index fd9c9be7..00000000 --- a/Assets/IronSource/Scripts/IronSourceBannerEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e70ce8d580fb7482582c14e882b872e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceBannerLevelPlayAndroid.cs b/Assets/IronSource/Scripts/IronSourceBannerLevelPlayAndroid.cs deleted file mode 100644 index f819e325..00000000 --- a/Assets/IronSource/Scripts/IronSourceBannerLevelPlayAndroid.cs +++ /dev/null @@ -1,84 +0,0 @@ -#if UNITY_ANDROID -using System; -using UnityEngine; - -public class IronSourceBannerLevelPlayAndroid : AndroidJavaProxy, IUnityLevelPlayBanner -{ - - public event Action OnAdLoaded = delegate { }; - public event Action OnAdLeftApplication = delegate { }; - public event Action OnAdScreenDismissed = delegate { }; - public event Action OnAdScreenPresented = delegate { }; - public event Action OnAdClicked = delegate { }; - public event Action OnAdLoadFailed = delegate { }; - - //implements UnityLevelPlayBannerListener java interface and implement banner callbacks - public IronSourceBannerLevelPlayAndroid() : base(IronSourceConstants.LevelPlaybannerBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityBannerLevelPlayListener", this); - } - - } - catch(Exception e) - { - Debug.LogError("setUnityBannerLevelPlayListener method doesn't exist, error: " + e.Message); - } - - } - - void onAdLoaded(String data) - { - if (OnAdLoaded != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - OnAdLoaded(adInfo); - } - - } - void onAdLoadFailed(String args) - { - if (OnAdLoadFailed != null) - { - IronSourceError error = IronSourceUtils.getErrorFromErrorObject(args); - OnAdLoadFailed(error); - } - } - void onAdClicked(String data) - { - if (OnAdClicked != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - OnAdClicked(adInfo); - } - } - void onAdScreenPresented(String data) - { - if (OnAdScreenPresented != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - OnAdScreenPresented(adInfo); - } - } - void onAdScreenDismissed(String data) - { - if (OnAdScreenDismissed != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - OnAdScreenDismissed(adInfo); - } - } - void onAdLeftApplication(String data) - { - if (OnAdLeftApplication != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - OnAdLeftApplication(adInfo); - } - } -} -#endif diff --git a/Assets/IronSource/Scripts/IronSourceBannerLevelPlayAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceBannerLevelPlayAndroid.cs.meta deleted file mode 100644 index 6a535d8c..00000000 --- a/Assets/IronSource/Scripts/IronSourceBannerLevelPlayAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fe89708d9afbd4a3abea04b51f5facd4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceConfig.cs b/Assets/IronSource/Scripts/IronSourceConfig.cs deleted file mode 100644 index a43dc35e..00000000 --- a/Assets/IronSource/Scripts/IronSourceConfig.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System.Runtime.InteropServices; -using UnityEngine; -using System.Collections; - -using System.Collections.Generic; - -public class IronSourceConfig -{ - private const string unsupportedPlatformStr = "Unsupported Platform"; - private static IronSourceConfig _instance; - - public static IronSourceConfig Instance { - get { - if (_instance == null) { - _instance = new IronSourceConfig (); - } - return _instance; - } - } - - - #if UNITY_ANDROID && !UNITY_EDITOR - private static AndroidJavaObject _androidBridge; - private readonly static string AndroidBridge = "com.ironsource.unity.androidbridge.AndroidBridge"; - - public IronSourceConfig () - { - using (var pluginClass = new AndroidJavaClass( AndroidBridge )) - _androidBridge = pluginClass.CallStatic ("getInstance"); - } - - //Setters - public void setLanguage (string language) - { - _androidBridge.Call ("setLanguage", language); - } - - public void setClientSideCallbacks (bool status) - { - _androidBridge.Call ("setClientSideCallbacks", status); - } - - public void setRewardedVideoCustomParams (Dictionary rewardedVideoCustomParams) - { - string json = IronSourceJSON.Json.Serialize (rewardedVideoCustomParams); - _androidBridge.Call ("setRewardedVideoCustomParams", json); - } - - public void setOfferwallCustomParams (Dictionary offerwallCustomParams) - { - string json = IronSourceJSON.Json.Serialize (offerwallCustomParams); - _androidBridge.Call ("setOfferwallCustomParams", json); - } - - - #elif (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR - [DllImport("__Internal")] - private static extern void CFSetLanguage (string language); - - [DllImport("__Internal")] - private static extern void CFSetClientSideCallbacks (bool useClientSideCallbacks); - - [DllImport("__Internal")] - private static extern void CFSetRewardedVideoCustomParams (string rewardedVideoCustomParams); - - [DllImport("__Internal")] - private static extern void CFSetOfferwallCustomParams (string offerwallCustomParams); - - - public void setLanguage (string language) - { - CFSetLanguage (language); - } - - public void setClientSideCallbacks (bool status) - { - CFSetClientSideCallbacks (status); - } - - public void setRewardedVideoCustomParams (Dictionary rewardedVideoCustomParams) - { - string json = IronSourceJSON.Json.Serialize (rewardedVideoCustomParams); - CFSetRewardedVideoCustomParams (json); - } - - public void setOfferwallCustomParams (Dictionary offerwallCustomParams) - { - string json = IronSourceJSON.Json.Serialize (offerwallCustomParams); - CFSetOfferwallCustomParams (json); - } - - public IronSourceConfig () - { - - } - - - #else - public void setLanguage (string language) - { - Debug.Log (unsupportedPlatformStr); - } - - public void setClientSideCallbacks (bool status) - { - Debug.Log (unsupportedPlatformStr); - } - - public void setRewardedVideoCustomParams (Dictionary rewardedVideoCustomParams) - { - Debug.Log (unsupportedPlatformStr); - } - - public void setOfferwallCustomParams (Dictionary offerwallCustomParams) - { - Debug.Log (unsupportedPlatformStr); - } - - public IronSourceConfig () - { - Debug.Log (unsupportedPlatformStr); - } - - #endif -} - - diff --git a/Assets/IronSource/Scripts/IronSourceConfig.cs.meta b/Assets/IronSource/Scripts/IronSourceConfig.cs.meta deleted file mode 100644 index ca9715aa..00000000 --- a/Assets/IronSource/Scripts/IronSourceConfig.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bb6daa29fa2854059bfdf3302b87a7dd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceConstants.cs b/Assets/IronSource/Scripts/IronSourceConstants.cs deleted file mode 100644 index 5b6f3cde..00000000 --- a/Assets/IronSource/Scripts/IronSourceConstants.cs +++ /dev/null @@ -1,50 +0,0 @@ -public static class IronSourceConstants -{ - //General - public const string GET_INSTANCE_KEY = "getInstance"; - public const string ERROR_CODE = "error_code"; - public const string ERROR_DESCRIPTION = "error_description"; - public const string INSTANCE_ID_KEY = "instanceId"; - public const string PLACEMENT_KEY = "placement"; - public const string EMPTY_STRING = ""; - - //Bridge Classes - public const string interstitialBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityInterstitialListener"; - public const string LevelPlayinterstitialBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityLevelPlayInterstitialListener"; - public const string rewardedVideoBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityRewardedVideoListener"; - public const string rewardedVideoManualBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityRewardedVideoManualListener"; - public const string LevelPlayRewardedVideoBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityLevelPlayRewardedVideoListener"; - public const string LevelPlayRewardedVideoManualBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityLevelPlayRewardedVideoManualListener"; - public const string bridgeClass = "com.ironsource.unity.androidbridge.AndroidBridge"; - public const string offerwallBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityOfferwallListener"; - public const string bannerBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityBannerListener"; - public const string LevelPlaybannerBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityLevelPlayBannerListener"; - public const string segmentBridgeListenerClass = "com.ironsource.unity.androidbridge.UnitySegmentListener"; - public const string impressionDataBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityImpressionDataListener"; - public const string initializeBridgeListenerClass = "com.ironsource.unity.androidbridge.UnityInitializationListener"; - - //Impression Data - public const string IMPRESSION_DATA_KEY_AUCTION_ID = "auctionId"; - public const string IMPRESSION_DATA_KEY_AD_UNIT = "adUnit"; - public const string IMPRESSION_DATA_KEY_COUNTRY = "country"; - public const string IMPRESSION_DATA_KEY_ABTEST = "ab"; - public const string IMPRESSION_DATA_KEY_SEGMENT_NAME = "segmentName"; - public const string IMPRESSION_DATA_KEY_PLACEMENT = "placement"; - public const string IMPRESSION_DATA_KEY_AD_NETWORK = "adNetwork"; - public const string IMPRESSION_DATA_KEY_INSTANCE_NAME = "instanceName"; - public const string IMPRESSION_DATA_KEY_INSTANCE_ID = "instanceId"; - public const string IMPRESSION_DATA_KEY_REVENUE = "revenue"; - public const string IMPRESSION_DATA_KEY_PRECISION = "precision"; - public const string IMPRESSION_DATA_KEY_LIFETIME_REVENUE = "lifetimeRevenue"; - public const string IMPRESSION_DATA_KEY_ENCRYPTED_CPM = "encryptedCPM"; - public const string IMPRESSION_DATA_KEY_CONVERSION_VALUE = "conversionValue"; - public const string GENDER_MALE = "male"; - public const string GENDER_FEMALE = "female"; - public const string GENDER_UNKNOWN = "unknown"; - - //Mediation Settings - public const string IRONSOURCE_MEDIATION_SETTING_NAME = "IronSourceMediationSettings"; - public const string IRONSOURCE_MEDIATED_NETWORK_SETTING_NAME = "IronSourceMediatedNetworkSettings"; - public const string IRONSOURCE_RESOURCES_PATH = "Assets/IronSource/Resources"; - public const string IRONSOURCE_SKAN_ID_KEY = "su67r6k2v3.skadnetwork"; -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceConstants.cs.meta b/Assets/IronSource/Scripts/IronSourceConstants.cs.meta deleted file mode 100644 index bdb909ed..00000000 --- a/Assets/IronSource/Scripts/IronSourceConstants.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b1cb01dca300e4697ba0c3797ead70b5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceError.cs b/Assets/IronSource/Scripts/IronSourceError.cs deleted file mode 100644 index 10bf9c32..00000000 --- a/Assets/IronSource/Scripts/IronSourceError.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using System; - -public class IronSourceError -{ - private string description; - private int code; - - public int getErrorCode () - { - return code; - } - - public string getDescription () - { - return description; - } - - public int getCode () - { - return code; - } - - public IronSourceError (int errorCode, string errorDescription) - { - code = errorCode; - description = errorDescription; - } - - public override string ToString () - { - return code + " : " + description; - } -} - diff --git a/Assets/IronSource/Scripts/IronSourceError.cs.meta b/Assets/IronSource/Scripts/IronSourceError.cs.meta deleted file mode 100644 index 5d964276..00000000 --- a/Assets/IronSource/Scripts/IronSourceError.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: da4e465ec77584d1fa6b4e62487ab4c2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceEvents.cs b/Assets/IronSource/Scripts/IronSourceEvents.cs deleted file mode 100644 index 126b1883..00000000 --- a/Assets/IronSource/Scripts/IronSourceEvents.cs +++ /dev/null @@ -1,2346 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; - -public class IronSourceEvents : MonoBehaviour -{ -#if UNITY_IPHONE || UNITY_IOS - delegate void ISUnityBackgroundCallback(string args); - [DllImport("__Internal")] - static extern void RegisterCallback(ISUnityBackgroundCallback func); - -#endif - -#if UNITY_ANDROID -#pragma warning disable CS0067 - public static event Action onSdkInitializationCompletedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdShowFailedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdOpenedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdClosedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdStartedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdEndedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdRewardedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdClickedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAvailabilityChangedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdLoadFailedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdReadyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdOpenedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdClosedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdLoadedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdRewardedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdShowFailedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdClickedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdLoadFailedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdReadyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdLoadFailedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdOpenedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdClosedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdShowSucceededEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdShowFailedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdClickedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdReadyDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdOpenedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdClosedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdLoadFailedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdClickedDemandOnlyEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdShowFailedDemandOnlyEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallAvailableEvent; - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallOpenedEvent; - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action> onOfferwallAdCreditedEvent; - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onGetOfferwallCreditsFailedEvent; - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallClosedEvent; - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallShowFailedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdLoadedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdLeftApplicationEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdScreenDismissedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdScreenPresentedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdClickedEvent; - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdLoadFailedEvent; - - public static event Action onSegmentReceivedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use OnImpressionDataReady instead.")] - public static event Action onImpressionSuccessEvent; -#endif - - private const string ERROR_CODE = "error_code"; - private const string ERROR_DESCRIPTION = "error_description"; - private const string INSTANCE_ID_KEY = "instanceId"; - private const string PLACEMENT_KEY = "placement"; - #pragma warning disable CS0067 - public static event Action onImpressionDataReadyEvent; - -#if UNITY_ANDROID - private IUnityInitialization initializationAndroid; - private IUnityRewardedVideo rewardedVideoAndroid; - private IUnityRewardedVideoManual rewardedVideoAndroidManual; - private IUnityInterstitial interstitialAndroid; - private IUnityOfferwall offerwallAndroid; - private IUnityBanner bannerAndroid; - private IUnitySegment segmentAndroid; - private IUnityImpressionData impressionDataAndroid; -#endif - - void Awake() - { -#if UNITY_ANDROID && !UNITY_EDITOR - initializationAndroid = new IronSourceInitializationAndroid();//sets this.initialztionAndroid as listener for initialztionAndroid events in the bridge - registerInitializationEvents(); //subscribe to initialization events from this.initializationAndroid - rewardedVideoAndroid = new IronSourceRewardedVideoAndroid();//sets this.rewardedVideoAndroid as listener for RV(Mediation& Demand Only) events in the bridge - registerRewardedVideoEvents();//subscribe to RV events from this.rewardedVideoAndroid - rewardedVideoAndroidManual = new IronSourceRewardedVideoManualAndroid(); - registerRewardedVideoManualEvents();//subscribe to RV Manual events from this.rewardedVideoAndroid - registerRewardedVideoDemandOnlyEvents();//subscribe to RV Demand Only events from this.rewardedVideoAndroid - interstitialAndroid = new IronSourceInterstitialAndroid();//sets this.interstitialAndroid as listener for Interstitia(Mediation& Demand Only) events in the bridge - registerInterstitialEvents();//subscribe to Interstitial events from this.interstitialAndroid - registerInterstitialDemandOnlyEvents();//subscribe to Interstitial Demand Only events from this.interstitialAndroid - offerwallAndroid = new IronSourceOfferwallAndroid();//sets this.offerwallAndroid as listener for Offerwall(Mediation& Demand Only) events in the bridge - registerOfferwallEvents();//subscribe to Offerwall events from this.offerwallAndroid - bannerAndroid = new IronSourceBannerAndroid();//sets this.bannerAndroid as listener for Banner(Mediation& Demand Only) events in the bridge - registerBannerEvents();//subscribe to Banner events from this.bannerAndroid - impressionDataAndroid = new IronSourceImpressionDataAndroid();//sets this.impressionDataAndroid as listener for Impression Data events in the bridge - registerImpressionDataEvents();//subscribe to onImpressionSuccess event from this.impressionDataAndroid - segmentAndroid = new IronSourceSegmentAndroid();//sets this.segmentAndroid as listener for Segment events in the bridge - registerSegmentEvents();//subscribe to onSegmentRecieved event from this.segmentAndroid - -#endif - -#if UNITY_IPHONE || UNITY_IOS - #if !UNITY_EDITOR - RegisterCallback(FireCallback); - #endif -#endif - gameObject.name = "IronSourceEvents"; //Change the GameObject name to IronSourceEvents. - DontDestroyOnLoad(gameObject); //Makes the object not be destroyed automatically when loading a new scene. - } - - -#if UNITY_ANDROID && !UNITY_EDITOR - private void registerInitializationEvents() - { - initializationAndroid.OnSdkInitializationCompletedEvent += () => - { - if (onSdkInitializationCompletedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onSdkInitializationCompletedEvent?.Invoke(); - }); - } - - }; - } - - private void registerBannerEvents() - { - bannerAndroid.OnBannerAdLoaded += () => - { - if (onBannerAdLoadedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onBannerAdLoadedEvent?.Invoke(); - }); - } - - }; - - bannerAndroid.OnBannerAdClicked += () => - { - if (onBannerAdClickedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onBannerAdClickedEvent?.Invoke(); - }); - } - }; - - bannerAndroid.OnBannerAdLoadFailed += (ironSourceError) => - { - if (onBannerAdLoadFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onBannerAdLoadFailedEvent?.Invoke(ironSourceError); - }); - } - }; - - bannerAndroid.OnBannerAdLeftApplication += () => - { - if (onBannerAdLeftApplicationEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onBannerAdLeftApplicationEvent?.Invoke(); - }); - } - }; - - bannerAndroid.OnBannerAdScreenDismissed += () => - { - if (onBannerAdScreenDismissedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onBannerAdScreenDismissedEvent?.Invoke(); - }); - } - }; - - bannerAndroid.OnBannerAdScreenPresented += () => - { - if (onBannerAdScreenPresentedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onBannerAdScreenPresentedEvent?.Invoke(); - }); - } - }; - } - - //subscribe to IronSourceInterstitialAndroid IS Mediation & rewarded Interstitial events and notify to subscribed events inside the app - private void registerInterstitialEvents() - { - interstitialAndroid.OnInterstitialAdClicked += () => - { - if (onInterstitialAdClickedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdClickedEvent?.Invoke(); - }); - } - }; - - interstitialAndroid.OnInterstitialAdReady += () => - { - if (onInterstitialAdReadyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdReadyEvent?.Invoke(); - }); - } - }; - - interstitialAndroid.OnInterstitialAdClosed += () => - { - if (onInterstitialAdClosedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdClosedEvent?.Invoke(); - }); - } - }; - - interstitialAndroid.OnInterstitialAdOpened += () => - { - if (onInterstitialAdOpenedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdOpenedEvent?.Invoke(); - }); - } - }; - - interstitialAndroid.OnInterstitialAdLoadFailed += (ironsourceError) => - { - if (onInterstitialAdLoadFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdLoadFailedEvent?.Invoke(ironsourceError); - }); - } - }; - - interstitialAndroid.OnInterstitialAdShowFailed += (ironSourceError) => - { - if (onInterstitialAdShowFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdShowFailedEvent?.Invoke(ironSourceError); - }); - } - }; - - interstitialAndroid.OnInterstitialAdShowSucceeded += () => - { - if (onInterstitialAdShowSucceededEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdShowSucceededEvent?.Invoke(); - }); - } - }; - - } - - //subscribe to IronSourceInterstitialAndroid IS Demand Only events and notify to subscribed events inside the app - private void registerInterstitialDemandOnlyEvents() - { - interstitialAndroid.OnInterstitialAdReadyDemandOnly += (instanceId) => - { - if (onInterstitialAdReadyDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdReadyDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - interstitialAndroid.OnInterstitialAdClosedDemandOnly += (instanceId) => - { - if (onInterstitialAdClosedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdClosedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - interstitialAndroid.OnInterstitialAdOpenedDemandOnly += (instanceId) => - { - if (onInterstitialAdOpenedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdOpenedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - interstitialAndroid.OnInterstitialAdClickedDemandOnly += (instanceId) => - { - if (onInterstitialAdClickedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdClickedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - interstitialAndroid.OnInterstitialAdLoadFailedDemandOnly += (instanceId, ironSourceError) => - { - if (onInterstitialAdLoadFailedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdLoadFailedDemandOnlyEvent?.Invoke(instanceId, ironSourceError); - }); - } - }; - - interstitialAndroid.OnInterstitialAdShowFailedDemandOnly += (instanceId, ironSourceError) => - { - if (onInterstitialAdShowFailedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onInterstitialAdShowFailedDemandOnlyEvent?.Invoke(instanceId, ironSourceError); - }); - } - }; - - } - - private void registerOfferwallEvents() - { - offerwallAndroid.OnOfferwallOpened += () => - { - if (onOfferwallOpenedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onOfferwallOpenedEvent?.Invoke(); - }); - } - }; - - offerwallAndroid.OnOfferwallShowFailed += (error) => - { - if (onOfferwallShowFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onOfferwallShowFailedEvent?.Invoke(error); - }); - } - - }; - - offerwallAndroid.OnOfferwallClosed += () => - { - if (onOfferwallClosedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onOfferwallClosedEvent?.Invoke(); - }); - } - }; - - offerwallAndroid.OnOfferwallAvailable += (isAvailable) => - { - if (onOfferwallAvailableEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onOfferwallAvailableEvent?.Invoke(isAvailable); - }); - } - }; - - offerwallAndroid.OnOfferwallAdCredited += (dic) => - { - if (onOfferwallAdCreditedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onOfferwallAdCreditedEvent?.Invoke(dic); - }); - } - }; - - offerwallAndroid.OnGetOfferwallCreditsFailed += (error) => - { - if (onGetOfferwallCreditsFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onGetOfferwallCreditsFailedEvent?.Invoke(error); - }); - } - }; - } - - //subscribe to IronSourceSegmentAndroid onSegmentRecieved event and notify to subscribed event inside the app - private void registerSegmentEvents() - { - segmentAndroid.OnSegmentRecieved += (segmentName) => - { - if (onSegmentReceivedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onSegmentReceivedEvent?.Invoke(segmentName); - }); - } - }; - } - - //subscribe to IronSourceImpressionDatandroid onSegmentRecieved event and notify to subscribed event inside the app - private void registerImpressionDataEvents() - { - impressionDataAndroid.OnImpressionSuccess += (impressionData) => - { - - if (onImpressionSuccessEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onImpressionSuccessEvent?.Invoke(impressionData); - }); - } - }; - - impressionDataAndroid.OnImpressionDataReady += (impressionData) => - { - if (onImpressionDataReadyEvent != null) - { - onImpressionDataReadyEvent?.Invoke(impressionData); - } - }; - } - - //subscribe to IronSourceRewardedVideoAndroid RV Demand Only events and notify to subscribed events inside the app - public void registerRewardedVideoDemandOnlyEvents() - { - - rewardedVideoAndroid.OnRewardedVideoAdClosedDemandOnlyEvent += (instanceId) => - { - if (onRewardedVideoAdClosedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdClosedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAdLoadedDemandOnlyEvent += (instanceId) => - { - if (onRewardedVideoAdLoadedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdLoadedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAdOpenedDemandOnlyEvent += (instanceId) => - { - if (onRewardedVideoAdOpenedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdClickedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAdClickedDemandOnlyEvent += (instanceId) => - { - if (onRewardedVideoAdClickedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdClickedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAdRewardedDemandOnlyEvent += (instanceId) => - { - if (onRewardedVideoAdRewardedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdRewardedDemandOnlyEvent?.Invoke(instanceId); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAdLoadFailedDemandOnlyEvent += (instanceId, error) => - { - if (onRewardedVideoAdLoadFailedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdLoadFailedDemandOnlyEvent?.Invoke(instanceId, error); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAdShowFailedDemandOnlyEvent += (instanceId, error) => - { - if (onRewardedVideoAdShowFailedDemandOnlyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdShowFailedDemandOnlyEvent?.Invoke(instanceId, error); - }); - } - }; - } - - //subscribe to IronSourceRewardedVideoAndroid RV Mediation events and notify to subscribed events inside the app - private void registerRewardedVideoEvents() - { - rewardedVideoAndroid.OnRewardedVideoAdClicked += (IronSourcePlacement) => - { - if (onRewardedVideoAdClickedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdClickedEvent?.Invoke(IronSourcePlacement); - }); - } - }; - rewardedVideoAndroid.OnRewardedVideoAdShowFailed += (IronSourceError) => - { - if (onRewardedVideoAdShowFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdShowFailedEvent?.Invoke(IronSourceError); - }); - } - }; - rewardedVideoAndroid.OnRewardedVideoAdOpened += () => - { - if (onRewardedVideoAdOpenedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdOpenedEvent?.Invoke(); - }); - } - }; - rewardedVideoAndroid.OnRewardedVideoAdClosed += () => - { - if (onRewardedVideoAdClosedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdClosedEvent?.Invoke(); - }); - } - }; - rewardedVideoAndroid.OnRewardedVideoAdStarted += () => - { - if (onRewardedVideoAdStartedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdStartedEvent?.Invoke(); - }); - } - }; - rewardedVideoAndroid.OnRewardedVideoAdEnded += () => - { - if (onRewardedVideoAdEndedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdEndedEvent?.Invoke(); - }); - } - }; - rewardedVideoAndroid.OnRewardedVideoAdRewarded += (IronSourcePlacement) => - { - if (onRewardedVideoAdRewardedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdRewardedEvent?.Invoke(IronSourcePlacement); - }); - } - }; - - rewardedVideoAndroid.OnRewardedVideoAvailabilityChanged += (isAvailable) => - { - if (onRewardedVideoAvailabilityChangedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAvailabilityChangedEvent?.Invoke(isAvailable); - }); - } - }; - } - // ******************************* RewardedVideo Manual Load Events ******************************* - - public void registerRewardedVideoManualEvents() - { - rewardedVideoAndroidManual.OnRewardedVideoAdReady += () => - { - if (onRewardedVideoAdReadyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdReadyEvent?.Invoke(); - }); - } - }; - - rewardedVideoAndroidManual.OnRewardedVideoAdLoadFailed += (IronSourceError) => - { - if (onRewardedVideoAdLoadFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onRewardedVideoAdLoadFailedEvent?.Invoke(IronSourceError); - }); - } - }; - } - - - -#endif - -#if !UNITY_ANDROID - -#if UNITY_IPHONE || UNITY_IOS - - - [AOT.MonoPInvokeCallback(typeof(ISUnityBackgroundCallback))] - public static void FireCallback(string args) - { - if (onImpressionDataReadyEvent != null) - { - InvokeEvent(onImpressionDataReadyEvent, args); - } - } -#endif - - // ******************************* Init Event ******************************* - - private static event Action _onSdkInitializationCompletedEvent; - - public static event Action onSdkInitializationCompletedEvent - { - add - { - if (_onSdkInitializationCompletedEvent == null || !_onSdkInitializationCompletedEvent.GetInvocationList().Contains(value)) - { - _onSdkInitializationCompletedEvent += value; - } - } - - remove - { - if (_onSdkInitializationCompletedEvent != null && _onSdkInitializationCompletedEvent.GetInvocationList().Contains(value)) - { - _onSdkInitializationCompletedEvent -= value; - } - } - } - - public void onSdkInitializationCompleted(string empty) - { - if (_onSdkInitializationCompletedEvent != null) - { - _onSdkInitializationCompletedEvent(); - } - } - - // ******************************* Rewarded Video Events ******************************* - private static event Action _onRewardedVideoAdShowFailedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdShowFailedEvent - { - add - { - if (_onRewardedVideoAdShowFailedEvent == null || !_onRewardedVideoAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdShowFailedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdShowFailedEvent != null && _onRewardedVideoAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdShowFailedEvent -= value; - } - } - } - - public void onRewardedVideoAdShowFailed(string description) - { - if (_onRewardedVideoAdShowFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onRewardedVideoAdShowFailedEvent(sse); - } - } - - private static event Action _onRewardedVideoAdOpenedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdOpenedEvent - { - add - { - if (_onRewardedVideoAdOpenedEvent == null || !_onRewardedVideoAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdOpenedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdOpenedEvent != null && _onRewardedVideoAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdOpenedEvent -= value; - } - } - } - - public void onRewardedVideoAdOpened(string empty) - { - if (_onRewardedVideoAdOpenedEvent != null) - { - _onRewardedVideoAdOpenedEvent(); - } - } - - private static event Action _onRewardedVideoAdClosedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdClosedEvent - { - add - { - if (_onRewardedVideoAdClosedEvent == null || !_onRewardedVideoAdClosedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClosedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdClosedEvent != null && _onRewardedVideoAdClosedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClosedEvent -= value; - } - } - } - - public void onRewardedVideoAdClosed(string empty) - { - if (_onRewardedVideoAdClosedEvent != null) - { - _onRewardedVideoAdClosedEvent(); - } - } - - private static event Action _onRewardedVideoAdStartedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdStartedEvent - { - add - { - if (_onRewardedVideoAdStartedEvent == null || !_onRewardedVideoAdStartedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdStartedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdStartedEvent != null && _onRewardedVideoAdStartedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdStartedEvent -= value; - } - } - } - - public void onRewardedVideoAdStarted(string empty) - { - if (_onRewardedVideoAdStartedEvent != null) - { - _onRewardedVideoAdStartedEvent(); - } - } - - private static event Action _onRewardedVideoAdEndedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdEndedEvent - { - add - { - if (_onRewardedVideoAdEndedEvent == null || !_onRewardedVideoAdEndedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdEndedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdEndedEvent != null && _onRewardedVideoAdEndedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdEndedEvent -= value; - } - } - } - - public void onRewardedVideoAdEnded(string empty) - { - if (_onRewardedVideoAdEndedEvent != null) - { - _onRewardedVideoAdEndedEvent(); - } - } - - private static event Action _onRewardedVideoAdRewardedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdRewardedEvent - { - add - { - if (_onRewardedVideoAdRewardedEvent == null || !_onRewardedVideoAdRewardedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdRewardedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdRewardedEvent != null && _onRewardedVideoAdRewardedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdRewardedEvent -= value; - } - } - } - - public void onRewardedVideoAdRewarded(string description) - { - if (_onRewardedVideoAdRewardedEvent != null) - { - IronSourcePlacement ssp = getPlacementFromObject(description); - _onRewardedVideoAdRewardedEvent(ssp); - } - } - - private static event Action _onRewardedVideoAdClickedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdClickedEvent - { - add - { - if (_onRewardedVideoAdClickedEvent == null || !_onRewardedVideoAdClickedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClickedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdClickedEvent != null && _onRewardedVideoAdClickedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClickedEvent -= value; - } - } - } - - public void onRewardedVideoAdClicked(string description) - { - if (_onRewardedVideoAdClickedEvent != null) - { - IronSourcePlacement ssp = getPlacementFromObject(description); - _onRewardedVideoAdClickedEvent(ssp); - } - } - - private static event Action _onRewardedVideoAvailabilityChangedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAvailabilityChangedEvent - { - add - { - if (_onRewardedVideoAvailabilityChangedEvent == null || !_onRewardedVideoAvailabilityChangedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAvailabilityChangedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAvailabilityChangedEvent != null && _onRewardedVideoAvailabilityChangedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAvailabilityChangedEvent -= value; - } - } - } - - public void onRewardedVideoAvailabilityChanged(string stringAvailable) - { - bool isAvailable = (stringAvailable == "true") ? true : false; - if (_onRewardedVideoAvailabilityChangedEvent != null) - _onRewardedVideoAvailabilityChangedEvent(isAvailable); - } - - // ******************************* RewardedVideo DemandOnly Events ******************************* - - private static event Action _onRewardedVideoAdLoadedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdLoadedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdLoadedDemandOnlyEvent == null || !_onRewardedVideoAdLoadedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdLoadedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdLoadedDemandOnlyEvent != null && _onRewardedVideoAdLoadedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdLoadedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdLoadedDemandOnly(string instanceId) - { - if (_onRewardedVideoAdLoadedDemandOnlyEvent != null) - { - _onRewardedVideoAdLoadedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onRewardedVideoAdLoadFailedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdLoadFailedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdLoadFailedDemandOnlyEvent == null || !_onRewardedVideoAdLoadFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdLoadFailedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdLoadFailedDemandOnlyEvent != null && _onRewardedVideoAdLoadFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdLoadFailedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdLoadFailedDemandOnly(string args) - { - if (_onRewardedVideoAdLoadFailedDemandOnlyEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - _onRewardedVideoAdLoadFailedDemandOnlyEvent(instanceId, err); - } - } - - private static event Action _onRewardedVideoAdOpenedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdOpenedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdOpenedDemandOnlyEvent == null || !_onRewardedVideoAdOpenedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdOpenedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdOpenedDemandOnlyEvent != null && _onRewardedVideoAdOpenedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdOpenedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdOpenedDemandOnly(string instanceId) - { - if (_onRewardedVideoAdOpenedDemandOnlyEvent != null) - { - _onRewardedVideoAdOpenedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onRewardedVideoAdClosedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdClosedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdClosedDemandOnlyEvent == null || !_onRewardedVideoAdClosedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClosedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdClosedDemandOnlyEvent != null && _onRewardedVideoAdClosedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClosedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdClosedDemandOnly(string instanceId) - { - if (_onRewardedVideoAdClosedDemandOnlyEvent != null) - { - _onRewardedVideoAdClosedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onRewardedVideoAdRewardedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdRewardedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdRewardedDemandOnlyEvent == null || !_onRewardedVideoAdRewardedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdRewardedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdRewardedDemandOnlyEvent != null && _onRewardedVideoAdRewardedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdRewardedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdRewardedDemandOnly(string instanceId) - { - if (_onRewardedVideoAdRewardedDemandOnlyEvent != null) - { - _onRewardedVideoAdRewardedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onRewardedVideoAdShowFailedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdShowFailedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdShowFailedDemandOnlyEvent == null || !_onRewardedVideoAdShowFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdShowFailedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdShowFailedDemandOnlyEvent != null && _onRewardedVideoAdShowFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdShowFailedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdShowFailedDemandOnly(string args) - { - if (_onRewardedVideoAdShowFailedDemandOnlyEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - _onRewardedVideoAdShowFailedDemandOnlyEvent(instanceId, err); - } - } - - private static event Action _onRewardedVideoAdClickedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onRewardedVideoAdClickedDemandOnlyEvent - { - add - { - if (_onRewardedVideoAdClickedDemandOnlyEvent == null || !_onRewardedVideoAdClickedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClickedDemandOnlyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdClickedDemandOnlyEvent != null && _onRewardedVideoAdClickedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdClickedDemandOnlyEvent -= value; - } - } - } - - public void onRewardedVideoAdClickedDemandOnly(string instanceId) - { - if (_onRewardedVideoAdClickedDemandOnlyEvent != null) - { - _onRewardedVideoAdClickedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onSegmentReceivedEvent; - public static event Action onSegmentReceivedEvent - { - add - { - if (_onSegmentReceivedEvent == null || !_onSegmentReceivedEvent.GetInvocationList().Contains(value)) - { - _onSegmentReceivedEvent += value; - } - } - - remove - { - if (_onSegmentReceivedEvent != null && _onSegmentReceivedEvent.GetInvocationList().Contains(value)) - { - _onSegmentReceivedEvent -= value; - } - } - } - - public void onSegmentReceived(string segmentName) - { - if (_onSegmentReceivedEvent != null) - _onSegmentReceivedEvent(segmentName); - } - - // ******************************* Interstitial Events ******************************* - - private static event Action _onInterstitialAdReadyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdReadyEvent - { - add - { - if (_onInterstitialAdReadyEvent == null || !_onInterstitialAdReadyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdReadyEvent += value; - } - } - - remove - { - if (_onInterstitialAdReadyEvent != null && _onInterstitialAdReadyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdReadyEvent -= value; - } - } - } - - public void onInterstitialAdReady() - { - if (_onInterstitialAdReadyEvent != null) - _onInterstitialAdReadyEvent(); - } - - private static event Action _onInterstitialAdLoadFailedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdLoadFailedEvent - { - add - { - if (_onInterstitialAdLoadFailedEvent == null || !_onInterstitialAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdLoadFailedEvent += value; - } - } - - remove - { - if (_onInterstitialAdLoadFailedEvent != null && _onInterstitialAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdLoadFailedEvent -= value; - } - } - } - - public void onInterstitialAdLoadFailed(string description) - { - if (_onInterstitialAdLoadFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onInterstitialAdLoadFailedEvent(sse); - } - } - - private static event Action _onInterstitialAdOpenedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdOpenedEvent - { - add - { - if (_onInterstitialAdOpenedEvent == null || !_onInterstitialAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdOpenedEvent += value; - } - } - - remove - { - if (_onInterstitialAdOpenedEvent != null && _onInterstitialAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdOpenedEvent -= value; - } - } - } - - public void onInterstitialAdOpened(string empty) - { - if (_onInterstitialAdOpenedEvent != null) - { - _onInterstitialAdOpenedEvent(); - } - } - - private static event Action _onInterstitialAdClosedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdClosedEvent - { - add - { - if (_onInterstitialAdClosedEvent == null || !_onInterstitialAdClosedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClosedEvent += value; - } - } - - remove - { - if (_onInterstitialAdClosedEvent != null && _onInterstitialAdClosedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClosedEvent -= value; - } - } - } - - public void onInterstitialAdClosed(string empty) - { - if (_onInterstitialAdClosedEvent != null) - { - _onInterstitialAdClosedEvent(); - } - } - - private static event Action _onInterstitialAdShowSucceededEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdShowSucceededEvent - { - add - { - if (_onInterstitialAdShowSucceededEvent == null || !_onInterstitialAdShowSucceededEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdShowSucceededEvent += value; - } - } - - remove - { - if (_onInterstitialAdShowSucceededEvent != null && _onInterstitialAdShowSucceededEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdShowSucceededEvent -= value; - } - } - } - - public void onInterstitialAdShowSucceeded(string empty) - { - if (_onInterstitialAdShowSucceededEvent != null) - { - _onInterstitialAdShowSucceededEvent(); - } - } - - private static event Action _onInterstitialAdShowFailedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdShowFailedEvent - { - add - { - if (_onInterstitialAdShowFailedEvent == null || !_onInterstitialAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdShowFailedEvent += value; - } - } - - remove - { - if (_onInterstitialAdShowFailedEvent != null && _onInterstitialAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdShowFailedEvent -= value; - } - } - } - - public void onInterstitialAdShowFailed(string description) - { - if (_onInterstitialAdShowFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onInterstitialAdShowFailedEvent(sse); - } - } - - private static event Action _onInterstitialAdClickedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceInterstitialEvents listener instead.", false)] - public static event Action onInterstitialAdClickedEvent - { - add - { - if (_onInterstitialAdClickedEvent == null || !_onInterstitialAdClickedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClickedEvent += value; - } - } - - remove - { - if (_onInterstitialAdClickedEvent != null && _onInterstitialAdClickedEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClickedEvent -= value; - } - } - } - - public void onInterstitialAdClicked(string empty) - { - if (_onInterstitialAdClickedEvent != null) - { - _onInterstitialAdClickedEvent(); - } - } - - // ******************************* Interstitial DemanOnly Events ******************************* - - private static event Action _onInterstitialAdReadyDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdReadyDemandOnlyEvent - { - add - { - if (_onInterstitialAdReadyDemandOnlyEvent == null || !_onInterstitialAdReadyDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdReadyDemandOnlyEvent += value; - } - } - - remove - { - if (_onInterstitialAdReadyDemandOnlyEvent != null && _onInterstitialAdReadyDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdReadyDemandOnlyEvent -= value; - } - } - } - - public void onInterstitialAdReadyDemandOnly(string instanceId) - { - if (_onInterstitialAdReadyDemandOnlyEvent != null) - _onInterstitialAdReadyDemandOnlyEvent(instanceId); - } - - - private static event Action _onInterstitialAdLoadFailedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdLoadFailedDemandOnlyEvent - { - add - { - if (_onInterstitialAdLoadFailedDemandOnlyEvent == null || !_onInterstitialAdLoadFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdLoadFailedDemandOnlyEvent += value; - } - } - - remove - { - if (_onInterstitialAdLoadFailedDemandOnlyEvent != null && _onInterstitialAdLoadFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdLoadFailedDemandOnlyEvent -= value; - } - } - } - - public void onInterstitialAdLoadFailedDemandOnly(string args) - { - if (_onInterstitialAdLoadFailedDemandOnlyEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - _onInterstitialAdLoadFailedDemandOnlyEvent(instanceId, err); - } - } - - private static event Action _onInterstitialAdOpenedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdOpenedDemandOnlyEvent - { - add - { - if (_onInterstitialAdOpenedDemandOnlyEvent == null || !_onInterstitialAdOpenedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdOpenedDemandOnlyEvent += value; - } - } - - remove - { - if (_onInterstitialAdOpenedDemandOnlyEvent != null && _onInterstitialAdOpenedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdOpenedDemandOnlyEvent -= value; - } - } - } - - public void onInterstitialAdOpenedDemandOnly(string instanceId) - { - if (_onInterstitialAdOpenedDemandOnlyEvent != null) - { - _onInterstitialAdOpenedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onInterstitialAdClosedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdClosedDemandOnlyEvent - { - add - { - if (_onInterstitialAdClosedDemandOnlyEvent == null || !_onInterstitialAdClosedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClosedDemandOnlyEvent += value; - } - } - - remove - { - if (_onInterstitialAdClosedDemandOnlyEvent != null && _onInterstitialAdClosedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClosedDemandOnlyEvent -= value; - } - } - } - - public void onInterstitialAdClosedDemandOnly(string instanceId) - { - if (_onInterstitialAdClosedDemandOnlyEvent != null) - { - _onInterstitialAdClosedDemandOnlyEvent(instanceId); - } - } - - private static event Action _onInterstitialAdShowFailedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdShowFailedDemandOnlyEvent - { - add - { - if (_onInterstitialAdShowFailedDemandOnlyEvent == null || !_onInterstitialAdShowFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdShowFailedDemandOnlyEvent += value; - } - } - - remove - { - if (_onInterstitialAdShowFailedDemandOnlyEvent != null && _onInterstitialAdShowFailedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdShowFailedDemandOnlyEvent -= value; - } - } - } - - public void onInterstitialAdShowFailedDemandOnly(string args) - { - if (_onInterstitialAdLoadFailedDemandOnlyEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError sse = getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - _onInterstitialAdShowFailedDemandOnlyEvent(instanceId, sse); - } - } - - private static event Action _onInterstitialAdClickedDemandOnlyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0.1", false)] - public static event Action onInterstitialAdClickedDemandOnlyEvent - { - add - { - if (_onInterstitialAdClickedDemandOnlyEvent == null || !_onInterstitialAdClickedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClickedDemandOnlyEvent += value; - } - } - - remove - { - if (_onInterstitialAdClickedDemandOnlyEvent != null && _onInterstitialAdClickedDemandOnlyEvent.GetInvocationList().Contains(value)) - { - _onInterstitialAdClickedDemandOnlyEvent -= value; - } - } - } - - public void onInterstitialAdClickedDemandOnly(string instanceId) - { - if (_onInterstitialAdClickedDemandOnlyEvent != null) - { - _onInterstitialAdClickedDemandOnlyEvent(instanceId); - } - } - - // ******************************* Offerwall Events ******************************* - - private static event Action _onOfferwallOpenedEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallOpenedEvent - { - add - { - if (_onOfferwallOpenedEvent == null || !_onOfferwallOpenedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallOpenedEvent += value; - } - } - - remove - { - if (_onOfferwallOpenedEvent != null && _onOfferwallOpenedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallOpenedEvent -= value; - } - } - } - - public void onOfferwallOpened(string empty) - { - if (_onOfferwallOpenedEvent != null) - { - _onOfferwallOpenedEvent(); - } - } - - private static event Action _onOfferwallShowFailedEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallShowFailedEvent - { - add - { - if (_onOfferwallShowFailedEvent == null || !_onOfferwallShowFailedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallShowFailedEvent += value; - } - } - - remove - { - if (_onOfferwallShowFailedEvent != null && _onOfferwallShowFailedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallShowFailedEvent -= value; - } - } - } - - public void onOfferwallShowFailed(string description) - { - if (_onOfferwallShowFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onOfferwallShowFailedEvent(sse); - } - } - - private static event Action _onOfferwallClosedEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallClosedEvent - { - add - { - if (_onOfferwallClosedEvent == null || !_onOfferwallClosedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallClosedEvent += value; - } - } - - remove - { - if (_onOfferwallClosedEvent != null && _onOfferwallClosedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallClosedEvent -= value; - } - } - } - - public void onOfferwallClosed(string empty) - { - if (_onOfferwallClosedEvent != null) - { - _onOfferwallClosedEvent(); - } - } - - private static event Action _onGetOfferwallCreditsFailedEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onGetOfferwallCreditsFailedEvent - { - add - { - if (_onGetOfferwallCreditsFailedEvent == null || !_onGetOfferwallCreditsFailedEvent.GetInvocationList().Contains(value)) - { - _onGetOfferwallCreditsFailedEvent += value; - } - } - - remove - { - if (_onGetOfferwallCreditsFailedEvent != null && _onGetOfferwallCreditsFailedEvent.GetInvocationList().Contains(value)) - { - _onGetOfferwallCreditsFailedEvent -= value; - } - } - } - - public void onGetOfferwallCreditsFailed(string description) - { - if (_onGetOfferwallCreditsFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onGetOfferwallCreditsFailedEvent(sse); - - } - } - - private static event Action> _onOfferwallAdCreditedEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action> onOfferwallAdCreditedEvent - { - add - { - if (_onOfferwallAdCreditedEvent == null || !_onOfferwallAdCreditedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallAdCreditedEvent += value; - } - } - - remove - { - if (_onOfferwallAdCreditedEvent != null && _onOfferwallAdCreditedEvent.GetInvocationList().Contains(value)) - { - _onOfferwallAdCreditedEvent -= value; - } - } - } - - public void onOfferwallAdCredited(string json) - { - if (_onOfferwallAdCreditedEvent != null) - _onOfferwallAdCreditedEvent(IronSourceJSON.Json.Deserialize(json) as Dictionary); - } - - private static event Action _onOfferwallAvailableEvent; - - [Obsolete("This API call is for the ironSource Offerwall, which will soon be deprecated. Please migrate to the Tapjoy Offerwall using the 'Offerwall migration checklist'.", false)] - public static event Action onOfferwallAvailableEvent - { - add - { - if (_onOfferwallAvailableEvent == null || !_onOfferwallAvailableEvent.GetInvocationList().Contains(value)) - { - _onOfferwallAvailableEvent += value; - } - } - - remove - { - if (_onOfferwallAvailableEvent != null && _onOfferwallAvailableEvent.GetInvocationList().Contains(value)) - { - _onOfferwallAvailableEvent -= value; - } - } - } - - public void onOfferwallAvailable(string stringAvailable) - { - bool isAvailable = (stringAvailable == "true") ? true : false; - if (_onOfferwallAvailableEvent != null) - _onOfferwallAvailableEvent(isAvailable); - } - - // ******************************* Banner Events ******************************* - private static event Action _onBannerAdLoadedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdLoadedEvent - { - add - { - if (_onBannerAdLoadedEvent == null || !_onBannerAdLoadedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdLoadedEvent += value; - } - } - - remove - { - if (_onBannerAdLoadedEvent != null && _onBannerAdLoadedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdLoadedEvent -= value; - } - } - } - - public void onBannerAdLoaded() - { - if (_onBannerAdLoadedEvent != null) - _onBannerAdLoadedEvent(); - } - - private static event Action _onBannerAdLoadFailedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdLoadFailedEvent - { - add - { - if (_onBannerAdLoadFailedEvent == null || !_onBannerAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdLoadFailedEvent += value; - } - } - - remove - { - if (_onBannerAdLoadFailedEvent != null && _onBannerAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdLoadFailedEvent -= value; - } - } - } - - public void onBannerAdLoadFailed(string description) - { - if (_onBannerAdLoadFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onBannerAdLoadFailedEvent(sse); - } - - } - - private static event Action _onBannerAdClickedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdClickedEvent - { - add - { - if (_onBannerAdClickedEvent == null || !_onBannerAdClickedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdClickedEvent += value; - } - } - - remove - { - if (_onBannerAdClickedEvent != null && _onBannerAdClickedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdClickedEvent -= value; - } - } - } - - public void onBannerAdClicked() - { - if (_onBannerAdClickedEvent != null) - _onBannerAdClickedEvent(); - } - - private static event Action _onBannerAdScreenPresentedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdScreenPresentedEvent - { - add - { - if (_onBannerAdScreenPresentedEvent == null || !_onBannerAdScreenPresentedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdScreenPresentedEvent += value; - } - } - - remove - { - if (_onBannerAdScreenPresentedEvent != null && _onBannerAdScreenPresentedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdScreenPresentedEvent -= value; - } - } - } - - public void onBannerAdScreenPresented() - { - if (_onBannerAdScreenPresentedEvent != null) - _onBannerAdScreenPresentedEvent(); - } - - private static event Action _onBannerAdScreenDismissedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdScreenDismissedEvent - { - add - { - if (_onBannerAdScreenDismissedEvent == null || !_onBannerAdScreenDismissedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdScreenDismissedEvent += value; - } - } - - remove - { - if (_onBannerAdScreenDismissedEvent != null && _onBannerAdScreenDismissedEvent.GetInvocationList().Contains(value)) - { - _onBannerAdScreenDismissedEvent -= value; - } - } - } - - public void onBannerAdScreenDismissed() - { - if (_onBannerAdScreenDismissedEvent != null) - _onBannerAdScreenDismissedEvent(); - } - - private static event Action _onBannerAdLeftApplicationEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceBannerEvents listener instead.", false)] - public static event Action onBannerAdLeftApplicationEvent - { - add - { - if (_onBannerAdLeftApplicationEvent == null || !_onBannerAdLeftApplicationEvent.GetInvocationList().Contains(value)) - { - _onBannerAdLeftApplicationEvent += value; - } - } - - remove - { - if (_onBannerAdLeftApplicationEvent != null && _onBannerAdLeftApplicationEvent.GetInvocationList().Contains(value)) - { - _onBannerAdLeftApplicationEvent -= value; - } - } - } - - public void onBannerAdLeftApplication() - { - if (_onBannerAdLeftApplicationEvent != null) - _onBannerAdLeftApplicationEvent(); - } - - private static event Action _onImpressionSuccessEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use OnImpressionDataReady instead.")] - public static event Action onImpressionSuccessEvent - { - add - { - if (_onImpressionSuccessEvent == null || !_onImpressionSuccessEvent.GetInvocationList().Contains(value)) - { - _onImpressionSuccessEvent += value; - } - } - - remove - { - if (_onImpressionSuccessEvent != null && _onImpressionSuccessEvent.GetInvocationList().Contains(value)) - { - _onImpressionSuccessEvent -= value; - } - } - } - - public void onImpressionSuccess(string args) - { - IronSourceImpressionData impressionData = new IronSourceImpressionData(args); - - - if (_onImpressionSuccessEvent != null) - { - _onImpressionSuccessEvent(impressionData); - } - } - - // ******************************* RewardedVideo Manual Load Events ******************************* - - private static event Action _onRewardedVideoAdLoadFailedEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdLoadFailedEvent - { - add - { - if (_onRewardedVideoAdLoadFailedEvent == null || !_onRewardedVideoAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdLoadFailedEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdLoadFailedEvent != null && _onRewardedVideoAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdLoadFailedEvent -= value; - } - } - } - - public void onRewardedVideoAdLoadFailed(string description) - { - if (_onRewardedVideoAdLoadFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onRewardedVideoAdLoadFailedEvent(sse); - } - } - - private static event Action _onRewardedVideoAdReadyEvent; - - [Obsolete("This API has been deprecated as of SDK 7.3.0. Please use the alternate API in IronSourceRewardedVideoEvents listener instead.", false)] - public static event Action onRewardedVideoAdReadyEvent - { - add - { - if (_onRewardedVideoAdReadyEvent == null || !_onRewardedVideoAdReadyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdReadyEvent += value; - } - } - - remove - { - if (_onRewardedVideoAdReadyEvent != null && _onRewardedVideoAdReadyEvent.GetInvocationList().Contains(value)) - { - _onRewardedVideoAdReadyEvent -= value; - } - } - } - - public void onRewardedVideoAdReady(string empty) - { - if (_onRewardedVideoAdReadyEvent != null) - { - _onRewardedVideoAdReadyEvent(); - } - } - -#endif - - // ******************************* ConsentView Callbacks ******************************* - - //iOS callbacks only - in order to prevent using macro for iOS it's not only iOS - private static event Action _onConsentViewDidFailToLoadWithErrorEvent; - - public static event Action onConsentViewDidFailToLoadWithErrorEvent - { - add - { - if (_onConsentViewDidFailToLoadWithErrorEvent == null || !_onConsentViewDidFailToLoadWithErrorEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidFailToLoadWithErrorEvent += value; - } - } - - remove - { - if (_onConsentViewDidFailToLoadWithErrorEvent != null && _onConsentViewDidFailToLoadWithErrorEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidFailToLoadWithErrorEvent -= value; - } - } - } - - public void onConsentViewDidFailToLoadWithError(string args) - { - if (_onConsentViewDidFailToLoadWithErrorEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[1]); - string consentViewType = argList[0].ToString(); - _onConsentViewDidFailToLoadWithErrorEvent(consentViewType, err); - } - } - - private static event Action _onConsentViewDidFailToShowWithErrorEvent; - - public static event Action onConsentViewDidFailToShowWithErrorEvent - { - add - { - if (_onConsentViewDidFailToShowWithErrorEvent == null || !_onConsentViewDidFailToShowWithErrorEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidFailToShowWithErrorEvent += value; - } - } - - remove - { - if (_onConsentViewDidFailToShowWithErrorEvent != null && _onConsentViewDidFailToShowWithErrorEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidFailToShowWithErrorEvent -= value; - } - } - } - - public void onConsentViewDidFailToShowWithError(string args) - { - if (_onConsentViewDidFailToShowWithErrorEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[1]); - string consentViewType = argList[0].ToString(); - _onConsentViewDidFailToShowWithErrorEvent(consentViewType, err); - } - } - - private static event Action _onConsentViewDidAcceptEvent; - - public static event Action onConsentViewDidAcceptEvent - { - add - { - if (_onConsentViewDidAcceptEvent == null || !_onConsentViewDidAcceptEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidAcceptEvent += value; - } - } - - remove - { - if (_onConsentViewDidAcceptEvent != null && _onConsentViewDidAcceptEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidAcceptEvent -= value; - } - } - } - - public void onConsentViewDidAccept(string consentViewType) - { - if (_onConsentViewDidAcceptEvent != null) - { - _onConsentViewDidAcceptEvent(consentViewType); - } - } - - private static event Action _onConsentViewDidDismissEvent; - - public static event Action onConsentViewDidDismissEvent - { - add - { - if (_onConsentViewDidDismissEvent == null || !_onConsentViewDidDismissEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidDismissEvent += value; - } - } - - remove - { - if (_onConsentViewDidDismissEvent != null && _onConsentViewDidDismissEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidDismissEvent -= value; - } - } - } - - public void onConsentViewDidDismiss(string consentViewType) - { - if (_onConsentViewDidDismissEvent != null) - { - _onConsentViewDidDismissEvent(consentViewType); - } - } - - private static event Action _onConsentViewDidLoadSuccessEvent; - - public static event Action onConsentViewDidLoadSuccessEvent - { - add - { - if (_onConsentViewDidLoadSuccessEvent == null || !_onConsentViewDidLoadSuccessEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidLoadSuccessEvent += value; - } - } - - remove - { - if (_onConsentViewDidLoadSuccessEvent != null && _onConsentViewDidLoadSuccessEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidLoadSuccessEvent -= value; - } - } - } - - public void onConsentViewDidLoadSuccess(string consentViewType) - { - if (_onConsentViewDidLoadSuccessEvent != null) - { - _onConsentViewDidLoadSuccessEvent(consentViewType); - } - } - - private static event Action _onConsentViewDidShowSuccessEvent; - - public static event Action onConsentViewDidShowSuccessEvent - { - add - { - if (_onConsentViewDidShowSuccessEvent == null || !_onConsentViewDidShowSuccessEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidShowSuccessEvent += value; - } - } - - remove - { - if (_onConsentViewDidShowSuccessEvent != null && _onConsentViewDidShowSuccessEvent.GetInvocationList().Contains(value)) - { - _onConsentViewDidShowSuccessEvent -= value; - } - } - } - - public void onConsentViewDidShowSuccess(string consentViewType) - { - if (_onConsentViewDidShowSuccessEvent != null) - { - _onConsentViewDidShowSuccessEvent(consentViewType); - } - } - - - - // ******************************* Helper methods ******************************* - - private IronSourceError getErrorFromErrorObject(object descriptionObject) - { - Dictionary error = null; - if (descriptionObject is IDictionary) - { - error = descriptionObject as Dictionary; - } - else if (descriptionObject is String && !String.IsNullOrEmpty(descriptionObject.ToString())) - { - error = IronSourceJSON.Json.Deserialize(descriptionObject.ToString()) as Dictionary; - } - - IronSourceError sse = new IronSourceError(-1, ""); - if (error != null && error.Count > 0) - { - int eCode = Convert.ToInt32(error[ERROR_CODE].ToString()); - string eDescription = error[ERROR_DESCRIPTION].ToString(); - sse = new IronSourceError(eCode, eDescription); - } - - return sse; - } - - private IronSourcePlacement getPlacementFromObject(object placementObject) - { - Dictionary placementJSON = null; - if (placementObject is IDictionary) - { - placementJSON = placementObject as Dictionary; - } - else if (placementObject is String) - { - placementJSON = IronSourceJSON.Json.Deserialize(placementObject.ToString()) as Dictionary; - } - - IronSourcePlacement ssp = null; - if (placementJSON != null && placementJSON.Count > 0) - { - int rewardAmount = Convert.ToInt32(placementJSON["placement_reward_amount"].ToString()); - string rewardName = placementJSON["placement_reward_name"].ToString(); - string placementName = placementJSON["placement_name"].ToString(); - - ssp = new IronSourcePlacement(placementName, rewardName, rewardAmount); - } - - return ssp; - } - - - - - // Invoke ImpressionDataReady Events - - private static void InvokeEvent(Action evt, String args) - { - IronSourceImpressionData impressionData = new IronSourceImpressionData(args); - evt(impressionData); - } -} diff --git a/Assets/IronSource/Scripts/IronSourceEvents.cs.meta b/Assets/IronSource/Scripts/IronSourceEvents.cs.meta deleted file mode 100644 index 1e192951..00000000 --- a/Assets/IronSource/Scripts/IronSourceEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3deb69b6171934273a3ead00dd0a7961 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceEventsDispatcher.cs b/Assets/IronSource/Scripts/IronSourceEventsDispatcher.cs deleted file mode 100644 index f773de29..00000000 --- a/Assets/IronSource/Scripts/IronSourceEventsDispatcher.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -public class IronSourceEventsDispatcher : MonoBehaviour -{ - private static IronSourceEventsDispatcher instance = null; - - // Queue For Events - private static readonly Queue ironSourceExecuteOnMainThreadQueue = new Queue(); - - public static void executeAction(Action action) - { - lock (ironSourceExecuteOnMainThreadQueue) - { - ironSourceExecuteOnMainThreadQueue.Enqueue(action); - } - } - - void Update() - { - // dispatch events on the main thread when the queue is bigger than 0 - while (ironSourceExecuteOnMainThreadQueue.Count > 0) - { - Action IronSourceDequeuedAction = null; - lock (ironSourceExecuteOnMainThreadQueue) - { - try - { - IronSourceDequeuedAction = ironSourceExecuteOnMainThreadQueue.Dequeue(); - } - catch (Exception e) - { - Debug.LogException(e); - } - } - if (IronSourceDequeuedAction != null) - { - IronSourceDequeuedAction.Invoke(); - } - } - } - - public void removeFromParent() - { - if (Application.platform != RuntimePlatform.IPhonePlayer && Application.platform != RuntimePlatform.Android) - { - Destroy(this); - } - } - - public static void initialize() - { - if (isCreated()) - { - return; - } - - // Add an invisible game object to the scene - GameObject obj = new GameObject("IronSourceEventsDispatcher"); - obj.hideFlags = HideFlags.HideAndDontSave; - DontDestroyOnLoad(obj); - instance = obj.AddComponent(); - } - - public static bool isCreated() - { - return instance != null; - } - - public void Awake() - { - DontDestroyOnLoad(gameObject); - } - - public void OnDisable() - { - instance = null; - } - -} diff --git a/Assets/IronSource/Scripts/IronSourceEventsDispatcher.cs.meta b/Assets/IronSource/Scripts/IronSourceEventsDispatcher.cs.meta deleted file mode 100644 index e98491f7..00000000 --- a/Assets/IronSource/Scripts/IronSourceEventsDispatcher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dc750f736e0e346f7b0f2a143ea47a7d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceIAgent.cs b/Assets/IronSource/Scripts/IronSourceIAgent.cs deleted file mode 100644 index cf04746d..00000000 --- a/Assets/IronSource/Scripts/IronSourceIAgent.cs +++ /dev/null @@ -1,205 +0,0 @@ -using System.Collections.Generic; - -public interface IronSourceIAgent -{ - //******************* Base API *******************// - - /// - /// Allows publishers to set configurations for a waterfall of a given ad type. - /// - /// The configuration for the given ad types waterfall. - /// The AdFormat for which to configure the waterfall. - void SetWaterfallConfiguration(WaterfallConfiguration waterfallConfiguration, AdFormat adFormat); - - void onApplicationPause(bool pause); - - string getAdvertiserId(); - - void validateIntegration(); - - void shouldTrackNetworkState(bool track); - - bool setDynamicUserId(string dynamicUserId); - - void setAdaptersDebug(bool enabled); - - void setMetaData(string key, string value); - - void setMetaData(string key, params string[] values); - - int? getConversionValue(); - - void setManualLoadRewardedVideo(bool isOn); - - void setNetworkData(string networkKey, string networkData); - - void SetPauseGame(bool pause); - - //******************* SDK Init *******************// - - void setUserId(string userId); - - void init(string appKey); - - void init(string appKey, params string[] adUnits); - - void initISDemandOnly(string appKey, params string[] adUnits); - - //******************* RewardedVideo API *******************// - - void loadRewardedVideo(); - - void showRewardedVideo(); - - void showRewardedVideo(string placementName); - - bool isRewardedVideoAvailable(); - - bool isRewardedVideoPlacementCapped(string placementName); - - IronSourcePlacement getPlacementInfo(string name); - - void setRewardedVideoServerParams(Dictionary parameters); - - void clearRewardedVideoServerParams(); - - //******************* RewardedVideo DemandOnly API *******************// - - void showISDemandOnlyRewardedVideo(string instanceId); - - void loadISDemandOnlyRewardedVideo(string instanceId); - - bool isISDemandOnlyRewardedVideoAvailable(string instanceId); - - //******************* Interstitial API *******************// - - void loadInterstitial(); - - void showInterstitial(); - - void showInterstitial(string placementName); - - bool isInterstitialReady(); - - bool isInterstitialPlacementCapped(string placementName); - - //******************* Interstitial DemandOnly API *******************// - - void loadISDemandOnlyInterstitial(string instanceId); - - void showISDemandOnlyInterstitial(string instanceId); - - bool isISDemandOnlyInterstitialReady(string instanceId); - - //******************* Offerwall API *******************// - - void showOfferwall(); - - void showOfferwall(string placementName); - - bool isOfferwallAvailable(); - - void getOfferwallCredits(); - - //******************* Banner API *******************// - - void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position); - - void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position, string placementName); - - void destroyBanner(); - - void displayBanner(); - - void hideBanner(); - - bool isBannerPlacementCapped(string placementName); - - void setSegment(IronSourceSegment segment); - - void setConsent(bool consent); - - //******************* ConsentView API *******************// - - void loadConsentViewWithType(string consentViewType); - - void showConsentViewWithType(string consentViewType); - - //******************* ILRD API *******************// - - void setAdRevenueData(string dataSource, Dictionary impressionData); - - //******************* TestSuite API *******************// - - void launchTestSuite(); -} - -public static class dataSource -{ - public static string MOPUB { get { return "MoPub"; } } - -} - - -public static class IronSourceAdUnits -{ - public static string REWARDED_VIDEO { get { return "rewardedvideo"; } } - - public static string INTERSTITIAL { get { return "interstitial"; } } - - public static string OFFERWALL { get { return "offerwall"; } } - - public static string BANNER { get { return "banner"; } } -} - -public class IronSourceBannerSize -{ - private int width; - private int height; - private string description; - private bool isAdaptive; - - public static IronSourceBannerSize BANNER = new IronSourceBannerSize("BANNER"); - public static IronSourceBannerSize LARGE = new IronSourceBannerSize("LARGE"); - public static IronSourceBannerSize RECTANGLE = new IronSourceBannerSize("RECTANGLE"); - public static IronSourceBannerSize SMART = new IronSourceBannerSize("SMART"); - - private IronSourceBannerSize() - { - - } - - public IronSourceBannerSize(int width, int height) - { - this.width = width; - this.height = height; - this.description = "CUSTOM"; - } - - public IronSourceBannerSize(string description) - { - this.description = description; - this.width = 0; - this.height = 0; - } - - public void SetAdaptive(bool adaptive) - { - this.isAdaptive = adaptive; - } - - public bool IsAdaptiveEnabled() - { - return this.isAdaptive; - } - - public string Description { get { return description; } } - public int Width { get { return width; } } - public int Height { get { return height; } } -} - -public enum IronSourceBannerPosition -{ - TOP = 1, - BOTTOM = 2 -}; diff --git a/Assets/IronSource/Scripts/IronSourceIAgent.cs.meta b/Assets/IronSource/Scripts/IronSourceIAgent.cs.meta deleted file mode 100644 index 6b0384cb..00000000 --- a/Assets/IronSource/Scripts/IronSourceIAgent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6749c89e692aa42bc8193f5364870896 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceImpressionData.cs b/Assets/IronSource/Scripts/IronSourceImpressionData.cs deleted file mode 100644 index 56cc4b1b..00000000 --- a/Assets/IronSource/Scripts/IronSourceImpressionData.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using UnityEngine; - -public class IronSourceImpressionData -{ - - public readonly string auctionId; - public readonly string adUnit; - public readonly string country; - public readonly string ab; - public readonly string segmentName; - public readonly string placement; - public readonly string adNetwork; - public readonly string instanceName; - public readonly string instanceId; - public readonly double? revenue; - public readonly string precision; - public readonly double? lifetimeRevenue; - public readonly string encryptedCPM; - public readonly int? conversionValue; - public readonly string allData; - - - public IronSourceImpressionData(string json) - { - if (json != null) - { - try - { - object obj; - double parsedDouble; - int parsedInt; - allData = json; - // Retrieve a CultureInfo object. - CultureInfo invCulture = CultureInfo.InvariantCulture; - Dictionary jsonDic = IronSourceJSON.Json.Deserialize(json) as Dictionary; - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_AUCTION_ID, out obj) && obj != null) - { - auctionId = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_AD_UNIT, out obj) && obj != null) - { - adUnit = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_COUNTRY, out obj) && obj != null) - { - country = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_ABTEST, out obj) && obj != null) - { - ab = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_SEGMENT_NAME, out obj) && obj != null) - { - segmentName = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_PLACEMENT, out obj) && obj != null) - { - placement = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_AD_NETWORK, out obj) && obj != null) - { - adNetwork = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_INSTANCE_NAME, out obj) && obj != null) - { - instanceName = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.INSTANCE_ID_KEY, out obj) && obj != null) - { - instanceId = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_PRECISION, out obj) && obj != null) - { - precision = obj.ToString(); - } - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_ENCRYPTED_CPM, out obj) && obj != null) - { - encryptedCPM = obj.ToString(); - } - - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_REVENUE, out obj) && obj != null && double.TryParse(string.Format(invCulture, "{0}", obj), NumberStyles.Any, invCulture, out parsedDouble)) - { - revenue = parsedDouble; - } - - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_LIFETIME_REVENUE, out obj) && obj != null && double.TryParse(string.Format(invCulture,"{0}",obj), NumberStyles.Any, invCulture, out parsedDouble)) - { - lifetimeRevenue = parsedDouble; - } - - if (jsonDic.TryGetValue(IronSourceConstants.IMPRESSION_DATA_KEY_CONVERSION_VALUE, out obj) && obj != null && int.TryParse(string.Format(invCulture, "{0}", obj), NumberStyles.Any, invCulture, out parsedInt)) - { - conversionValue = parsedInt; - } - - } - catch (Exception ex) - { - Debug.Log("error parsing impression " + ex.ToString()); - } - - } - } - - public override string ToString() - { - return "IronSourceImpressionData{" + - "auctionId='" + auctionId + '\'' + - ", adUnit='" + adUnit + '\'' + - ", country='" + country + '\'' + - ", ab='" + ab + '\'' + - ", segmentName='" + segmentName + '\'' + - ", placement='" + placement + '\'' + - ", adNetwork='" + adNetwork + '\'' + - ", instanceName='" + instanceName + '\'' + - ", instanceId='" + instanceId + '\'' + - ", revenue=" + revenue + - ", precision='" + precision + '\'' + - ", lifetimeRevenue=" + lifetimeRevenue + - ", encryptedCPM='" + encryptedCPM + '\'' + - ", conversionValue=" + conversionValue + - '}'; - } -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceImpressionData.cs.meta b/Assets/IronSource/Scripts/IronSourceImpressionData.cs.meta deleted file mode 100644 index 2c067fc4..00000000 --- a/Assets/IronSource/Scripts/IronSourceImpressionData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 829dbfb8c11844ff699a13cb9e245bb9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceImpressionDataAndroid.cs b/Assets/IronSource/Scripts/IronSourceImpressionDataAndroid.cs deleted file mode 100644 index 339d22d8..00000000 --- a/Assets/IronSource/Scripts/IronSourceImpressionDataAndroid.cs +++ /dev/null @@ -1,48 +0,0 @@ -#if UNITY_ANDROID -using System; -using UnityEngine; - -public class IronSourceImpressionDataAndroid : AndroidJavaProxy, IUnityImpressionData -{ - public event Action OnImpressionSuccess = delegate { }; - public event Action OnImpressionDataReady = delegate { }; - - //implements UnityImpressionDataListener java interface - public IronSourceImpressionDataAndroid() : base(IronSourceConstants.impressionDataBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic(IronSourceConstants.GET_INSTANCE_KEY); - bridgeInstance.Call("setUnityImpressionDataListener", this); - } - } - catch (Exception e) - { - Debug.LogError("setUnityImpressionDataListener method doesn't exist, error: " + e.Message); - } - - } - - public void onImpressionSuccess(string data) - { - if (OnImpressionSuccess != null) - { - IronSourceImpressionData impressionData = new IronSourceImpressionData(data); - OnImpressionSuccess(impressionData); - } - } - - public void onImpressionDataReady(string data) - { - if (OnImpressionDataReady != null) - { - IronSourceImpressionData impressionData = new IronSourceImpressionData(data); - OnImpressionDataReady(impressionData); - } - } - -} - -#endif \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceImpressionDataAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceImpressionDataAndroid.cs.meta deleted file mode 100644 index ad148870..00000000 --- a/Assets/IronSource/Scripts/IronSourceImpressionDataAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27881d3c3f3c842c98043fba29cde8b1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceInitializationAndroid.cs b/Assets/IronSource/Scripts/IronSourceInitializationAndroid.cs deleted file mode 100644 index ed10da49..00000000 --- a/Assets/IronSource/Scripts/IronSourceInitializationAndroid.cs +++ /dev/null @@ -1,33 +0,0 @@ -#if UNITY_ANDROID -using System; -using UnityEngine; - -public class IronSourceInitializationAndroid : AndroidJavaProxy,IUnityInitialization -{ - public event Action OnSdkInitializationCompletedEvent = delegate { }; - - public IronSourceInitializationAndroid() : base(IronSourceConstants.initializeBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityInitializationListener", this); - } - } - catch (Exception e) - { - Debug.LogError("setUnityInitializationListener method doesn't exist, error: " + e.Message); - } - } - - void onSdkInitializationCompleted() { - if (this.OnSdkInitializationCompletedEvent != null) - { - this.OnSdkInitializationCompletedEvent(); - } - } -} - -#endif diff --git a/Assets/IronSource/Scripts/IronSourceInitializationAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceInitializationAndroid.cs.meta deleted file mode 100644 index e9d5869b..00000000 --- a/Assets/IronSource/Scripts/IronSourceInitializationAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 849765db32f774d74865a3f8cce632cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceInitilizer.cs b/Assets/IronSource/Scripts/IronSourceInitilizer.cs deleted file mode 100644 index 7218d2ec..00000000 --- a/Assets/IronSource/Scripts/IronSourceInitilizer.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine; - -public class IronSourceInitilizer -{ -#if UNITY_IOS || UNITY_ANDROID - [RuntimeInitializeOnLoadMethod] - static void Initilize() - { - var developerSettings = Resources.Load(IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME); - if (developerSettings != null) - { -#if UNITY_ANDROID - string appKey = developerSettings.AndroidAppKey; -#elif UNITY_IOS - string appKey = developerSettings.IOSAppKey; -#endif - if (developerSettings.EnableIronsourceSDKInitAPI == true) - { - if (appKey.Equals(string.Empty)) - { - Debug.LogWarning("IronSourceInitilizer Cannot init without AppKey"); - } - else - { - //IronSource.Agent.init(appKey); - //IronSource.UNITY_PLUGIN_VERSION = "7.2.1-ri"; - } - - } - - if (developerSettings.EnableAdapterDebug) - { - IronSource.Agent.setAdaptersDebug(true); - } - - if (developerSettings.EnableIntegrationHelper) - { - IronSource.Agent.validateIntegration(); - } - } - } -#endif - -} diff --git a/Assets/IronSource/Scripts/IronSourceInitilizer.cs.meta b/Assets/IronSource/Scripts/IronSourceInitilizer.cs.meta deleted file mode 100644 index 16b436e3..00000000 --- a/Assets/IronSource/Scripts/IronSourceInitilizer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc39216a290cc4078bd20fcd521b0f19 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceInterstitialAndroid.cs b/Assets/IronSource/Scripts/IronSourceInterstitialAndroid.cs deleted file mode 100644 index 42bfe847..00000000 --- a/Assets/IronSource/Scripts/IronSourceInterstitialAndroid.cs +++ /dev/null @@ -1,181 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; - -public class IronSourceInterstitialAndroid : AndroidJavaProxy, IUnityInterstitial -{ - - //implements UnityInterstitialListener java interface - public IronSourceInterstitialAndroid() : base(IronSourceConstants.interstitialBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityInterstitialListener", this); - } - - } - catch(Exception e) - { - Debug.LogError("setUnityInterstitialListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnInterstitialAdShowFailed = delegate { }; - public event Action OnInterstitialAdLoadFailed = delegate { }; - public event Action OnInterstitialAdReady = delegate { }; - public event Action OnInterstitialAdOpened = delegate { }; - public event Action OnInterstitialAdClosed = delegate { }; - public event Action OnInterstitialAdShowSucceeded = delegate { }; - public event Action OnInterstitialAdClicked = delegate { }; - - public event Action OnInterstitialAdRewarded = delegate { }; - - public event Action OnInterstitialAdReadyDemandOnly = delegate { }; - public event Action OnInterstitialAdOpenedDemandOnly = delegate { }; - public event Action OnInterstitialAdClosedDemandOnly = delegate { }; - public event Action OnInterstitialAdLoadFailedDemandOnly = delegate { }; - public event Action OnInterstitialAdClickedDemandOnly = delegate { }; - public event Action OnInterstitialAdShowFailedDemandOnly = delegate { }; - - void onInterstitialAdShowFailed(string description) - { - if (this.OnInterstitialAdShowFailed != null) - { - IronSourceError ssp = IronSourceUtils.getErrorFromErrorObject(description); - this.OnInterstitialAdShowFailed(ssp); - } - } - - void onInterstitialAdReady() - { - if (this.OnInterstitialAdReady != null) - { - this.OnInterstitialAdReady(); - } - - } - - void onInterstitialAdOpened() - { - if (this.OnInterstitialAdOpened != null) - { - this.OnInterstitialAdOpened(); - } - - } - - void onInterstitialAdClosed() - { - if (this.OnInterstitialAdClosed != null) - { - this.OnInterstitialAdClosed(); - } - - } - - void onInterstitialAdShowSucceeded() - { - if (this.OnInterstitialAdShowSucceeded != null) - { - - this.OnInterstitialAdShowSucceeded(); - } - - } - - - void onInterstitialAdClicked() - { - if (this.OnInterstitialAdClicked != null) - { - this.OnInterstitialAdClicked(); - } - - } - - void onInterstitialAdLoadFailed(string args) - { - if (this.OnInterstitialAdLoadFailed != null) - { - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(args); - this.OnInterstitialAdLoadFailed(err); - } - } - - void onInterstitialAdRewarded() - { - if (this.OnInterstitialAdRewarded != null) - { - this.OnInterstitialAdRewarded(); - } - - } - - void onInterstitialAdClickedDemandOnly(string instanceId) - { - if (this.OnInterstitialAdClickedDemandOnly != null) - { - this.OnInterstitialAdClickedDemandOnly(instanceId); - } - - } - - void onInterstitialAdClosedDemandOnly(string instanceId) - { - if (this.OnInterstitialAdClosedDemandOnly != null) - { - - this.OnInterstitialAdClosedDemandOnly(instanceId); - } - - } - - void onInterstitialAdOpenedDemandOnly(string instanceId) - { - if (this.OnInterstitialAdOpenedDemandOnly != null) - { - this.OnInterstitialAdOpenedDemandOnly(instanceId); - } - - } - - void onInterstitialAdReadyDemandOnly(string instanceId) - { - if (this.OnInterstitialAdReadyDemandOnly != null) - { - this.OnInterstitialAdReadyDemandOnly(instanceId); - } - - } - - void onInterstitialAdLoadFailedDemandOnly(string args) - { - if (this.OnInterstitialAdLoadFailedDemandOnly != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - this.OnInterstitialAdLoadFailedDemandOnly(instanceId, err); - } - - } - - void onInterstitialAdShowFailedDemandOnly(string args) - { - if (this.OnInterstitialAdShowFailedDemandOnly != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - this.OnInterstitialAdShowFailedDemandOnly(instanceId, err); - } - - } - - -} -#endif \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceInterstitialAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceInterstitialAndroid.cs.meta deleted file mode 100644 index f74c0233..00000000 --- a/Assets/IronSource/Scripts/IronSourceInterstitialAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 299c0f3cd370943d9bde56c54925a9d5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceInterstitialEvents.cs b/Assets/IronSource/Scripts/IronSourceInterstitialEvents.cs deleted file mode 100644 index 0761df9f..00000000 --- a/Assets/IronSource/Scripts/IronSourceInterstitialEvents.cs +++ /dev/null @@ -1,394 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - - -public class IronSourceInterstitialEvents : MonoBehaviour -{ - -#if UNITY_ANDROID - #pragma warning disable CS0067 - public static event Action onAdReadyEvent; - public static event Action onAdLoadFailedEvent; - public static event Action onAdOpenedEvent; - public static event Action onAdClosedEvent; - public static event Action onAdShowSucceededEvent; - public static event Action onAdShowFailedEvent; - public static event Action onAdClickedEvent; - - -#endif - -#if UNITY_ANDROID - private IUnityLevelPlayInterstitial LevelPlayInterstitialAndroid; -#endif - - void Awake() - { -#if UNITY_ANDROID && !UNITY_EDITOR - LevelPlayInterstitialAndroid = new IronSourceInterstitialLevelPlayAndroid();//sets this.IronSourceInterstitialLevelPlayAndroid as listener for Interstitia(Mediation& Demand Only) events in the bridge - registerInterstitialEvents();//subscribe to Interstitial events from this.interstitialAndroid -#endif - - gameObject.name = "IronSourceInterstitialEvents"; //Change the GameObject name to IronSourceEvents. - DontDestroyOnLoad(gameObject); //Makes the object not be destroyed automatically when loading a new scene. - } - - -#if UNITY_ANDROID && !UNITY_EDITOR - - //subscribe to IronSourceInterstitialAndroid IS Mediation & rewarded Interstitial events and notify to subscribed events inside the app - private void registerInterstitialEvents() - { - LevelPlayInterstitialAndroid.OnAdClicked += (IronSourceAdInfo) => - { - if (onAdClickedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdClickedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayInterstitialAndroid.OnAdReady += (IronSourceAdInfo) => - { - if (onAdReadyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdReadyEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayInterstitialAndroid.OnAdClosed += (IronSourceAdInfo) => - { - if (onAdClosedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdClosedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayInterstitialAndroid.OnAdOpened += (IronSourceAdInfo) => - { - if (onAdOpenedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdOpenedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayInterstitialAndroid.OnAdLoadFailed += (ironsourceError) => - { - if (onAdLoadFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdLoadFailedEvent?.Invoke(ironsourceError); - }); - } - }; - - LevelPlayInterstitialAndroid.OnAdShowFailed += (ironSourceError, IronSourceAdInfo) => - { - if (onAdShowFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdShowFailedEvent?.Invoke(ironSourceError, IronSourceAdInfo); - }); - } - }; - - LevelPlayInterstitialAndroid.OnAdShowSucceeded += (IronSourceAdInfo) => - { - if (onAdShowSucceededEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdShowSucceededEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - } - - -#endif - -#if !UNITY_ANDROID - - // ******************************* Interstitial Events ******************************* - - private static event Action _onAdReadyEvent; - - public static event Action onAdReadyEvent - { - add - { - if (_onAdReadyEvent == null || !_onAdReadyEvent.GetInvocationList().Contains(value)) - { - _onAdReadyEvent += value; - } - } - - remove - { - if (_onAdReadyEvent != null && _onAdReadyEvent.GetInvocationList().Contains(value)) - { - _onAdReadyEvent -= value; - } - } - } - - public void onAdReady(string args) - { - if (_onAdReadyEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdReadyEvent(adInfo); - } - } - - private static event Action _onAdLoadFailedEvent; - - public static event Action onAdLoadFailedEvent - { - add - { - if (_onAdLoadFailedEvent == null || !_onAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onAdLoadFailedEvent += value; - } - } - - remove - { - if (_onAdLoadFailedEvent != null && _onAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onAdLoadFailedEvent -= value; - } - } - } - - public void onAdLoadFailed(string description) - { - if (_onAdLoadFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onAdLoadFailedEvent(sse); - } - } - - private static event Action _onAdOpenedEvent; - - public static event Action onAdOpenedEvent - { - add - { - if (_onAdOpenedEvent == null || !_onAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onAdOpenedEvent += value; - } - } - - remove - { - if (_onAdOpenedEvent != null && _onAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onAdOpenedEvent -= value; - } - } - } - - public void onAdOpened(string args) - { - if (_onAdOpenedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdOpenedEvent(adInfo); - } - } - - private static event Action _onAdClosedEvent; - - public static event Action onAdClosedEvent - { - add - { - if (_onAdClosedEvent == null || !_onAdClosedEvent.GetInvocationList().Contains(value)) - { - _onAdClosedEvent += value; - } - } - - remove - { - if (_onAdClosedEvent != null && _onAdClosedEvent.GetInvocationList().Contains(value)) - { - _onAdClosedEvent -= value; - } - } - } - - public void onAdClosed(string args) - { - if (_onAdClosedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdClosedEvent(adInfo); - } - } - - private static event Action _onAdShowSucceededEvent; - - public static event Action onAdShowSucceededEvent - { - add - { - if (_onAdShowSucceededEvent == null || !_onAdShowSucceededEvent.GetInvocationList().Contains(value)) - { - _onAdShowSucceededEvent += value; - } - } - - remove - { - if (_onAdShowSucceededEvent != null && _onAdShowSucceededEvent.GetInvocationList().Contains(value)) - { - _onAdShowSucceededEvent -= value; - } - } - } - - public void onAdShowSucceeded(string args) - { - if (_onAdShowSucceededEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdShowSucceededEvent(adInfo); - } - } - - private static event Action _onAdShowFailedEvent; - - public static event Action onAdShowFailedEvent - { - add - { - if (_onAdShowFailedEvent == null || !_onAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onAdShowFailedEvent += value; - } - } - - remove - { - if (_onAdShowFailedEvent != null && _onAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onAdShowFailedEvent -= value; - } - } - } - - public void onAdShowFailed(string args) - { - if (_onAdShowFailedEvent != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[0]); - IronSourceAdInfo adInfo = new IronSourceAdInfo(argList[1].ToString()); - _onAdShowFailedEvent(err, adInfo); - } - } - - private static event Action _onAdClickedEvent; - - public static event Action onAdClickedEvent - { - add - { - if (_onAdClickedEvent == null || !_onAdClickedEvent.GetInvocationList().Contains(value)) - { - _onAdClickedEvent += value; - } - } - - remove - { - if (_onAdClickedEvent != null && _onAdClickedEvent.GetInvocationList().Contains(value)) - { - _onAdClickedEvent -= value; - } - } - } - - public void onAdClicked(string args) - { - if (_onAdClickedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdClickedEvent(adInfo); - } - } - -#endif - - // ******************************* Helper methods ******************************* - - private IronSourceError getErrorFromErrorObject(object descriptionObject) - { - Dictionary error = null; - if (descriptionObject is IDictionary) - { - error = descriptionObject as Dictionary; - } - else if (descriptionObject is String && !String.IsNullOrEmpty(descriptionObject.ToString())) - { - error = IronSourceJSON.Json.Deserialize(descriptionObject.ToString()) as Dictionary; - } - - IronSourceError sse = new IronSourceError(-1, ""); - if (error != null && error.Count > 0) - { - int eCode = Convert.ToInt32(error[IronSourceConstants.ERROR_CODE].ToString()); - string eDescription = error[IronSourceConstants.ERROR_DESCRIPTION].ToString(); - sse = new IronSourceError(eCode, eDescription); - } - - return sse; - } - - private IronSourcePlacement getPlacementFromObject(object placementObject) - { - Dictionary placementJSON = null; - if (placementObject is IDictionary) - { - placementJSON = placementObject as Dictionary; - } - else if (placementObject is String) - { - placementJSON = IronSourceJSON.Json.Deserialize(placementObject.ToString()) as Dictionary; - } - - IronSourcePlacement ssp = null; - if (placementJSON != null && placementJSON.Count > 0) - { - int rewardAmount = Convert.ToInt32(placementJSON["placement_reward_amount"].ToString()); - string rewardName = placementJSON["placement_reward_name"].ToString(); - string placementName = placementJSON["placement_name"].ToString(); - - ssp = new IronSourcePlacement(placementName, rewardName, rewardAmount); - } - - return ssp; - } -} diff --git a/Assets/IronSource/Scripts/IronSourceInterstitialEvents.cs.meta b/Assets/IronSource/Scripts/IronSourceInterstitialEvents.cs.meta deleted file mode 100644 index d619bb7f..00000000 --- a/Assets/IronSource/Scripts/IronSourceInterstitialEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 576748845c3204ff193559d48978140f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceInterstitialLevelPlayAndroid.cs b/Assets/IronSource/Scripts/IronSourceInterstitialLevelPlayAndroid.cs deleted file mode 100644 index 5c552e65..00000000 --- a/Assets/IronSource/Scripts/IronSourceInterstitialLevelPlayAndroid.cs +++ /dev/null @@ -1,106 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; - -public class IronSourceInterstitialLevelPlayAndroid : AndroidJavaProxy, IUnityLevelPlayInterstitial -{ - - //implements UnityInterstitialLevelPlayListener java interface - public IronSourceInterstitialLevelPlayAndroid() : base(IronSourceConstants.LevelPlayinterstitialBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityInterstitialLevelPlayListener", this); - } - - } - catch(Exception e) - { - Debug.LogError("setUnityInterstitialLevelPlayListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnAdShowFailed = delegate { }; - public event Action OnAdLoadFailed = delegate { }; - public event Action OnAdReady = delegate { }; - public event Action OnAdOpened = delegate { }; - public event Action OnAdClosed = delegate { }; - public event Action OnAdShowSucceeded = delegate { }; - public event Action OnAdClicked = delegate { }; - - void onAdShowFailed(string description, String data) - { - if (this.OnAdShowFailed != null) - { - IronSourceError ssp = IronSourceUtils.getErrorFromErrorObject(description); - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdShowFailed(ssp, adInfo); - } - } - - void onAdReady(String data) - { - if (this.OnAdReady != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdReady(adInfo); - } - - } - - void onAdOpened(String data) - { - if (this.OnAdOpened != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdOpened(adInfo); - } - - } - - void onAdClosed(String data) - { - if (this.OnAdClosed != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdClosed(adInfo); - } - - } - - void onAdShowSucceeded(String data) - { - if (this.OnAdShowSucceeded != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdShowSucceeded(adInfo); - } - - } - - - void onAdClicked(String data) - { - if (this.OnAdClicked != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdClicked(adInfo); - } - - } - - void onAdLoadFailed(string args) - { - if (this.OnAdLoadFailed != null) - { - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(args); - this.OnAdLoadFailed(err); - } - } - -} -#endif \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceInterstitialLevelPlayAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceInterstitialLevelPlayAndroid.cs.meta deleted file mode 100644 index ccea33ce..00000000 --- a/Assets/IronSource/Scripts/IronSourceInterstitialLevelPlayAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a7b9eefb9c15142e68f30b52f93a4381 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceJSON.cs b/Assets/IronSource/Scripts/IronSourceJSON.cs deleted file mode 100644 index 433e440b..00000000 --- a/Assets/IronSource/Scripts/IronSourceJSON.cs +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Based on the miniJSON by Calvin Rien - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; - -namespace IronSourceJSON -{ - public static class Json - { - public static object Deserialize (string json) - { - if (json == null) { - return null; - } - return Parser.Parse (json); - } - - sealed class Parser : IDisposable - { - const string WHITE_SPACE = " \t\n\r"; - const string WORD_BREAK = " \t\n\r{}[],:\""; - - enum TOKEN - { - NONE, - CURLY_OPEN, - CURLY_CLOSE, - SQUARED_OPEN, - SQUARED_CLOSE, - COLON, - COMMA, - STRING, - NUMBER, - TRUE, - FALSE, - NULL - } - ; - - StringReader json; - - Parser (string jsonString) - { - json = new StringReader (jsonString); - } - - public static object Parse (string jsonString) - { - using (var instance = new Parser(jsonString)) { - return instance.ParseValue (); - } - } - - public void Dispose () - { - json.Dispose (); - json = null; - } - - Dictionary ParseObject () - { - Dictionary table = new Dictionary (); - - // ditch opening brace - json.Read (); - - // { - while (true) { - switch (NextToken) { - case TOKEN.NONE: - return null; - case TOKEN.COMMA: - continue; - case TOKEN.CURLY_CLOSE: - return table; - default: - // name - string name = ParseString (); - if (name == null) { - return null; - } - - // : - if (NextToken != TOKEN.COLON) { - return null; - } - // ditch the colon - json.Read (); - - // value - table [name] = ParseValue (); - break; - } - } - } - - List ParseArray () - { - List array = new List (); - - // ditch opening bracket - json.Read (); - - // [ - var parsing = true; - while (parsing) { - TOKEN nextToken = NextToken; - - switch (nextToken) { - case TOKEN.NONE: - return null; - case TOKEN.COMMA: - continue; - case TOKEN.SQUARED_CLOSE: - parsing = false; - break; - default: - object value = ParseByToken (nextToken); - - array.Add (value); - break; - } - } - - return array; - } - - object ParseValue () - { - TOKEN nextToken = NextToken; - return ParseByToken (nextToken); - } - - object ParseByToken (TOKEN token) - { - switch (token) { - case TOKEN.STRING: - return ParseString (); - case TOKEN.NUMBER: - return ParseNumber (); - case TOKEN.CURLY_OPEN: - return ParseObject (); - case TOKEN.SQUARED_OPEN: - return ParseArray (); - case TOKEN.TRUE: - return true; - case TOKEN.FALSE: - return false; - case TOKEN.NULL: - return null; - default: - return null; - } - } - - string ParseString () - { - StringBuilder s = new StringBuilder (); - char c; - - // ditch opening quote - json.Read (); - - bool parsing = true; - while (parsing) { - - if (json.Peek () == -1) { - parsing = false; - break; - } - - c = NextChar; - switch (c) { - case '"': - parsing = false; - break; - case '\\': - if (json.Peek () == -1) { - parsing = false; - break; - } - - c = NextChar; - switch (c) { - case '"': - case '\\': - case '/': - s.Append (c); - break; - case 'b': - s.Append ('\b'); - break; - case 'f': - s.Append ('\f'); - break; - case 'n': - s.Append ('\n'); - break; - case 'r': - s.Append ('\r'); - break; - case 't': - s.Append ('\t'); - break; - case 'u': - var hex = new StringBuilder (); - - for (int i=0; i< 4; i++) { - hex.Append (NextChar); - } - - s.Append ((char)Convert.ToInt32 (hex.ToString (), 16)); - break; - } - break; - default: - s.Append (c); - break; - } - } - - return s.ToString (); - } - - object ParseNumber () - { - string number = NextWord; - - if (number.IndexOf ('.') == -1) { - long parsedInt; - Int64.TryParse (number, NumberStyles.Any, CultureInfo.InvariantCulture, out parsedInt); - return parsedInt; - } - - double parsedDouble; - Double.TryParse (number, NumberStyles.Any, CultureInfo.InvariantCulture, out parsedDouble); - return parsedDouble; - } - - void EatWhitespace () - { - while (WHITE_SPACE.IndexOf(PeekChar) != -1) { - json.Read (); - - if (json.Peek () == -1) { - break; - } - } - } - - char PeekChar { - get { - return Convert.ToChar (json.Peek ()); - } - } - - char NextChar { - get { - return Convert.ToChar (json.Read ()); - } - } - - string NextWord { - get { - StringBuilder word = new StringBuilder (); - - while (WORD_BREAK.IndexOf(PeekChar) == -1) { - word.Append (NextChar); - - if (json.Peek () == -1) { - break; - } - } - - return word.ToString (); - } - } - - TOKEN NextToken { - get { - EatWhitespace (); - - if (json.Peek () == -1) { - return TOKEN.NONE; - } - - char c = PeekChar; - switch (c) { - case '{': - return TOKEN.CURLY_OPEN; - case '}': - json.Read (); - return TOKEN.CURLY_CLOSE; - case '[': - return TOKEN.SQUARED_OPEN; - case ']': - json.Read (); - return TOKEN.SQUARED_CLOSE; - case ',': - json.Read (); - return TOKEN.COMMA; - case '"': - return TOKEN.STRING; - case ':': - return TOKEN.COLON; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - return TOKEN.NUMBER; - } - - string word = NextWord; - - switch (word) { - case "false": - return TOKEN.FALSE; - case "true": - return TOKEN.TRUE; - case "null": - return TOKEN.NULL; - } - - return TOKEN.NONE; - } - } - } - - /// - /// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string - /// - /// A Dictionary<string, object> / List<object> - /// A JSON encoded string, or null if object 'json' is not serializable - public static string Serialize (object obj) - { - return Serializer.Serialize (obj); - } - - sealed class Serializer - { - StringBuilder builder; - - Serializer () - { - builder = new StringBuilder (); - } - - public static string Serialize (object obj) - { - var instance = new Serializer (); - - instance.SerializeValue (obj); - - return instance.builder.ToString (); - } - - void SerializeValue (object value) - { - IList asList; - IDictionary asDict; - string asStr; - - if (value == null) { - builder.Append ("null"); - } else if ((asStr = value as string) != null) { - SerializeString (asStr); - } else if (value is bool) { - builder.Append (value.ToString ().ToLower ()); - } else if ((asList = value as IList) != null) { - SerializeArray (asList); - } else if ((asDict = value as IDictionary) != null) { - SerializeObject (asDict); - } else if (value is char) { - SerializeString (value.ToString ()); - } else { - SerializeOther (value); - } - } - - void SerializeObject (IDictionary obj) - { - bool first = true; - - builder.Append ('{'); - - foreach (object e in obj.Keys) { - if (!first) { - builder.Append (','); - } - - SerializeString (e.ToString ()); - builder.Append (':'); - - SerializeValue (obj [e]); - - first = false; - } - - builder.Append ('}'); - } - - void SerializeArray (IList anArray) - { - builder.Append ('['); - - bool first = true; - - foreach (object obj in anArray) { - if (!first) { - builder.Append (','); - } - - SerializeValue (obj); - - first = false; - } - - builder.Append (']'); - } - - void SerializeString (string str) - { - builder.Append ('\"'); - - char[] charArray = str.ToCharArray (); - foreach (var c in charArray) { - switch (c) { - case '"': - builder.Append ("\\\""); - break; - case '\\': - builder.Append ("\\\\"); - break; - case '\b': - builder.Append ("\\b"); - break; - case '\f': - builder.Append ("\\f"); - break; - case '\n': - builder.Append ("\\n"); - break; - case '\r': - builder.Append ("\\r"); - break; - case '\t': - builder.Append ("\\t"); - break; - default: - int codepoint = Convert.ToInt32 (c); - if ((codepoint >= 32) && (codepoint <= 126)) { - builder.Append (c); - } else { - builder.Append ("\\u" + Convert.ToString (codepoint, 16).PadLeft (4, '0')); - } - break; - } - } - - builder.Append ('\"'); - } - - void SerializeOther (object value) - { - if (value is float - || value is int - || value is uint - || value is long - || value is double - || value is sbyte - || value is byte - || value is short - || value is ushort - || value is ulong - || value is decimal) { - builder.Append (value.ToString ()); - } else { - SerializeString (value.ToString ()); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceJSON.cs.meta b/Assets/IronSource/Scripts/IronSourceJSON.cs.meta deleted file mode 100644 index 391f9fe4..00000000 --- a/Assets/IronSource/Scripts/IronSourceJSON.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e7d1678f6f44648159b459b1f0165c60 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceMediationSettings.cs b/Assets/IronSource/Scripts/IronSourceMediationSettings.cs deleted file mode 100644 index a745fb15..00000000 --- a/Assets/IronSource/Scripts/IronSourceMediationSettings.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.IO; -using UnityEngine; - -public class IronSourceMediationSettings : ScriptableObject{ - public static readonly string IRONSOURCE_SETTINGS_ASSET_PATH = Path.Combine(IronSourceConstants.IRONSOURCE_RESOURCES_PATH, IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME + ".asset"); - - [Header("Ironsource AppKey")] - [Tooltip("Add your application AppKeys, as provided in Ironsource Platform")] - public string AndroidAppKey = string.Empty; - [Tooltip("Add your application AppKeys, as provided in Ironsource Platform")] - public string IOSAppKey = string.Empty; - - [Header("Automatic Initialization")] - [Tooltip("Use this flag when you wish to initialize all ad units (recommended)")] - public bool EnableIronsourceSDKInitAPI; - - [Header("Ironsource SKAdNetwork ID")] - [Tooltip("Add Ironsource SKAdNetworkIdentifier to your Info.plist for iOS 14+")] - public bool AddIronsourceSkadnetworkID; - - [Header("Google Play Services Settings")] - [Tooltip("Add Google Play Services normal permission for API level 31 (Android 12)")] - public bool DeclareAD_IDPermission; - - [Header("Project Features")] - public bool EnableAdapterDebug; - - public bool EnableIntegrationHelper; -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceMediationSettings.cs.meta b/Assets/IronSource/Scripts/IronSourceMediationSettings.cs.meta deleted file mode 100644 index 71bc284a..00000000 --- a/Assets/IronSource/Scripts/IronSourceMediationSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d5a679b8640d04834b4f09b8c6adec7a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceOfferwallAndroid.cs b/Assets/IronSource/Scripts/IronSourceOfferwallAndroid.cs deleted file mode 100644 index f7aa5282..00000000 --- a/Assets/IronSource/Scripts/IronSourceOfferwallAndroid.cs +++ /dev/null @@ -1,85 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; - -public class IronSourceOfferwallAndroid : AndroidJavaProxy, IUnityOfferwall -{ - - //implements UnityOfferwallListener java interface - public IronSourceOfferwallAndroid() : base(IronSourceConstants.offerwallBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityOfferwallListener", this); - } - - } - catch(Exception e) - { - Debug.LogError("setUnityOfferwallListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnOfferwallShowFailed = delegate { }; - public event Action OnOfferwallOpened = delegate { }; - public event Action OnOfferwallClosed = delegate { }; - public event Action OnGetOfferwallCreditsFailed = delegate { }; - public event Action> OnOfferwallAdCredited = delegate { }; - public event Action OnOfferwallAvailable = delegate { }; - - public void onOfferwallOpened () - { - if (this.OnOfferwallOpened != null) { - this.OnOfferwallOpened (); - } - } - - - public void onOfferwallShowFailed (string description) - { - if (OnOfferwallShowFailed != null) { - IronSourceError sse = IronSourceUtils.getErrorFromErrorObject (description); - OnOfferwallShowFailed (sse); - } - } - - - public void onOfferwallClosed () - { - if (OnOfferwallClosed != null) { - OnOfferwallClosed (); - } - } - - - public void onGetOfferwallCreditsFailed (string description) - { - if (OnGetOfferwallCreditsFailed != null) { - IronSourceError sse = IronSourceUtils.getErrorFromErrorObject (description); - OnGetOfferwallCreditsFailed (sse); - - } - } - - - public void onOfferwallAdCredited (string json) - { - if (OnOfferwallAdCredited != null) - OnOfferwallAdCredited (IronSourceJSON.Json.Deserialize (json) as Dictionary); - } - - - public void onOfferwallAvailable (string stringAvailable) - { - bool isAvailable = (stringAvailable == "true") ? true : false; - if (OnOfferwallAvailable != null) - OnOfferwallAvailable (isAvailable); - } - - -} -#endif \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceOfferwallAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceOfferwallAndroid.cs.meta deleted file mode 100644 index f1ebad2d..00000000 --- a/Assets/IronSource/Scripts/IronSourceOfferwallAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d32ea3b332c094eb2bb831be593ac300 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourcePlacement.cs b/Assets/IronSource/Scripts/IronSourcePlacement.cs deleted file mode 100644 index 0467ae53..00000000 --- a/Assets/IronSource/Scripts/IronSourcePlacement.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -public class IronSourcePlacement -{ - private string rewardName; - private int rewardAmount; - private string placementName; - - public IronSourcePlacement (string placementName, string rewardName, int rewardAmount) - { - this.placementName = placementName; - this.rewardName = rewardName; - this.rewardAmount = rewardAmount; - } - - public string getRewardName () - { - return rewardName; - } - - public int getRewardAmount () - { - return rewardAmount; - } - - public string getPlacementName () - { - return placementName; - } - - public override string ToString () - { - return placementName + " : " + rewardName + " : " + rewardAmount; - } - - -} diff --git a/Assets/IronSource/Scripts/IronSourcePlacement.cs.meta b/Assets/IronSource/Scripts/IronSourcePlacement.cs.meta deleted file mode 100644 index b7a30edc..00000000 --- a/Assets/IronSource/Scripts/IronSourcePlacement.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e3e60cdfff0354bb295d78867c456bd9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoAndroid.cs b/Assets/IronSource/Scripts/IronSourceRewardedVideoAndroid.cs deleted file mode 100644 index 77c3dfdc..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoAndroid.cs +++ /dev/null @@ -1,190 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; -public class IronSourceRewardedVideoAndroid : AndroidJavaProxy, IUnityRewardedVideo -{ - //implements UnityRewardedVideoListener java interface - public IronSourceRewardedVideoAndroid(): base(IronSourceConstants.rewardedVideoBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityRewardedVideoListener", this); - } - } - catch(Exception e) - { - Debug.LogError("setUnityRewardedVideoListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnRewardedVideoAdShowFailed = delegate { }; - public event Action OnRewardedVideoAdOpened = delegate { }; - public event Action OnRewardedVideoAdClosed = delegate { }; - public event Action OnRewardedVideoAdStarted = delegate { }; - public event Action OnRewardedVideoAdEnded = delegate { }; - public event Action OnRewardedVideoAdRewarded = delegate { }; - public event Action OnRewardedVideoAdClicked = delegate { }; - public event Action OnRewardedVideoAvailabilityChanged = delegate { }; - - public event Action OnRewardedVideoAdOpenedDemandOnlyEvent = delegate { }; - public event Action OnRewardedVideoAdClosedDemandOnlyEvent = delegate { }; - public event Action OnRewardedVideoAdLoadedDemandOnlyEvent = delegate { }; - public event Action OnRewardedVideoAdRewardedDemandOnlyEvent = delegate { }; - public event Action OnRewardedVideoAdShowFailedDemandOnlyEvent = delegate { }; - public event Action OnRewardedVideoAdClickedDemandOnlyEvent = delegate { }; - public event Action OnRewardedVideoAdLoadFailedDemandOnlyEvent = delegate { }; - - - void onRewardedVideoAdShowFailed(string description) - { - if (this.OnRewardedVideoAdShowFailed != null) - { - IronSourceError ssp = IronSourceUtils.getErrorFromErrorObject(description); - this.OnRewardedVideoAdShowFailed(ssp); - } - } - - void onRewardedVideoAdClosed() - { - if (this.OnRewardedVideoAdClosed != null) - { - this.OnRewardedVideoAdClosed(); - } - - } - - void onRewardedVideoAdOpened() - { - if (this.OnRewardedVideoAdOpened != null) - { - this.OnRewardedVideoAdOpened(); - } - - } - - void onRewardedVideoAdStarted() - { - if (this.OnRewardedVideoAdStarted != null) - { - this.OnRewardedVideoAdStarted(); - } - - } - - void onRewardedVideoAdEnded() - { - if (this.OnRewardedVideoAdEnded != null) - { - - this.OnRewardedVideoAdEnded(); - } - - } - - void onRewardedVideoAdRewarded(string description) - { - if (this.OnRewardedVideoAdRewarded != null) - { - IronSourcePlacement ssp = IronSourceUtils.getPlacementFromObject(description); - this.OnRewardedVideoAdRewarded(ssp); - } - - } - - void onRewardedVideoAdClicked(string description) - { - if (this.OnRewardedVideoAdClicked != null) - { - IronSourcePlacement ssp = IronSourceUtils.getPlacementFromObject(description); - - this.OnRewardedVideoAdClicked(ssp); - } - - } - - void onRewardedVideoAvailabilityChanged(string stringAvailable) - { - bool isAvailable = (stringAvailable == "true") ? true : false; - - if (this.OnRewardedVideoAvailabilityChanged != null) - { - this.OnRewardedVideoAvailabilityChanged(isAvailable); - } - - } - - void onRewardedVideoAdShowFailedDemandOnly(string args) - { - if (this.OnRewardedVideoAdShowFailedDemandOnlyEvent != null && !String.IsNullOrEmpty(args)) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - this.OnRewardedVideoAdShowFailedDemandOnlyEvent(instanceId, err); - } - } - - void onRewardedVideoAdClosedDemandOnly(string instanceId) - { - if (this.OnRewardedVideoAdClosedDemandOnlyEvent != null) - { - this.OnRewardedVideoAdClosedDemandOnlyEvent(instanceId); - } - - } - - void onRewardedVideoAdOpenedDemandOnly(string instanceId) - { - if (this.OnRewardedVideoAdOpenedDemandOnlyEvent != null) - { - this.OnRewardedVideoAdOpenedDemandOnlyEvent(instanceId); - } - - } - - void onRewardedVideoAdRewardedDemandOnly(string instanceId) - { - if (this.OnRewardedVideoAdRewardedDemandOnlyEvent != null) - { - - this.OnRewardedVideoAdRewardedDemandOnlyEvent(instanceId); - } - - } - - void onRewardedVideoAdClickedDemandOnly(string instanceId) - { - if (this.OnRewardedVideoAdClickedDemandOnlyEvent != null) - { - this.OnRewardedVideoAdClickedDemandOnlyEvent(instanceId); - } - - } - - void onRewardedVideoAdLoadedDemandOnly(string instanceId) - { - if (this.OnRewardedVideoAdLoadedDemandOnlyEvent != null) - { - this.OnRewardedVideoAdLoadedDemandOnlyEvent(instanceId); - } - - } - - void onRewardedVideoAdLoadFailedDemandOnly(string args) - { - if (this.OnRewardedVideoAdLoadFailedDemandOnlyEvent != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(argList[1]); - string instanceId = argList[0].ToString(); - this.OnRewardedVideoAdLoadFailedDemandOnlyEvent(instanceId, err); - } - - } - -} -#endif \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceRewardedVideoAndroid.cs.meta deleted file mode 100644 index e0c99b24..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8b2bf524836824e59a8be3b07b148e53 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoEvents.cs b/Assets/IronSource/Scripts/IronSourceRewardedVideoEvents.cs deleted file mode 100644 index c24ccfc7..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoEvents.cs +++ /dev/null @@ -1,485 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - - -public class IronSourceRewardedVideoEvents : MonoBehaviour -{ - -#if UNITY_ANDROID - #pragma warning disable CS0067 - public static event Action onAdShowFailedEvent; - public static event Action onAdOpenedEvent; - public static event Action onAdClosedEvent; - public static event Action onAdRewardedEvent; - public static event Action onAdClickedEvent; - public static event Action onAdAvailableEvent; - public static event Action onAdUnavailableEvent; - public static event Action onAdLoadFailedEvent; - public static event Action onAdReadyEvent; - -#endif - -#if UNITY_ANDROID - private IUnityLevelPlayRewardedVideo LevelPlayRewardedVideoAndroid; - private IUnityLevelPlayRewardedVideoManual LevelPlayRewardedVideoAndroidManual; -#endif - - void Awake() - { -#if UNITY_ANDROID && !UNITY_EDITOR - LevelPlayRewardedVideoAndroid = new IronSourceRewardedVideoLevelPlayAndroid();//sets this.IronSourceRewardedVideoLevelPlayAndroid as listener for RV events in the bridge - registerRewardedVideoEvents();//subscribe to RV events from this.rewardedVideoLevelPlayAndroid - LevelPlayRewardedVideoAndroidManual = new IronSourceRewardedVideoLevelPlayManualAndroid(); - registerRewardedVideoManualEvents();//subscribe to RV Manual events from this.rewardedVideoManualLevelPlayAndroid -#endif - - gameObject.name = "IronSourceRewardedVideoEvents"; //Change the GameObject name to IronSourceEvents. - DontDestroyOnLoad(gameObject); //Makes the object not be destroyed automatically when loading a new scene. - } - - -#if UNITY_ANDROID && !UNITY_EDITOR - - //subscribe to IronSourceRewardedVideoLevelPlayAndroid RV Mediation events and notify to subscribed events inside the app - private void registerRewardedVideoEvents() - { - LevelPlayRewardedVideoAndroid.OnAdClicked += (IronSourcePlacement, IronSourceAdInfo) => - { - if (onAdClickedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdClickedEvent?.Invoke(IronSourcePlacement, IronSourceAdInfo); - }); - } - }; - LevelPlayRewardedVideoAndroid.OnAdShowFailed += (IronSourceError, IronSourceAdInfo) => - { - if (onAdShowFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdShowFailedEvent?.Invoke(IronSourceError, IronSourceAdInfo); - }); - } - }; - LevelPlayRewardedVideoAndroid.OnAdOpened += (IronSourceAdInfo) => - { - if (onAdOpenedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdOpenedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - LevelPlayRewardedVideoAndroid.OnAdClosed += (IronSourceAdInfo) => - { - if (onAdClosedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdClosedEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayRewardedVideoAndroid.OnAdRewarded += (IronSourcePlacement, IronSourceAdInfo) => - { - if (onAdRewardedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdRewardedEvent?.Invoke(IronSourcePlacement, IronSourceAdInfo); - }); - } - }; - - LevelPlayRewardedVideoAndroid.OnAdAvailable += ( IronSourceAdInfo) => - { - if (onAdAvailableEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdAvailableEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayRewardedVideoAndroid.OnAdUnavailable += () => - { - if (onAdUnavailableEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdUnavailableEvent?.Invoke(); - }); - } - }; - } - // ******************************* RewardedVideo Manual Load Events ******************************* - - public void registerRewardedVideoManualEvents() - { - LevelPlayRewardedVideoAndroidManual.OnAdReady += (IronSourceAdInfo) => - { - if (onAdReadyEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdReadyEvent?.Invoke(IronSourceAdInfo); - }); - } - }; - - LevelPlayRewardedVideoAndroidManual.OnAdLoadFailed += (IronSourceError) => - { - if (onAdLoadFailedEvent != null) - { - IronSourceEventsDispatcher.executeAction(() => - { - onAdLoadFailedEvent?.Invoke(IronSourceError); - }); - } - }; - } - - - -#endif - -#if !UNITY_ANDROID - - // ******************************* Rewarded Video Events ******************************* - private static event Action _onAdShowFailedEvent; - - public static event Action onAdShowFailedEvent - { - add - { - if (_onAdShowFailedEvent == null || !_onAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onAdShowFailedEvent += value; - } - } - - remove - { - if (_onAdShowFailedEvent != null && _onAdShowFailedEvent.GetInvocationList().Contains(value)) - { - _onAdShowFailedEvent -= value; - } - } - } - - public void onAdShowFailed(string args) - { - if (_onAdShowFailedEvent != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = getErrorFromErrorObject(argList[0]); - IronSourceAdInfo adInfo = new IronSourceAdInfo(argList[1].ToString()); - _onAdShowFailedEvent(err, adInfo); - } - } - - private static event Action _onAdOpenedEvent; - - public static event Action onAdOpenedEvent - { - add - { - if (_onAdOpenedEvent == null || !_onAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onAdOpenedEvent += value; - } - } - - remove - { - if (_onAdOpenedEvent != null && _onAdOpenedEvent.GetInvocationList().Contains(value)) - { - _onAdOpenedEvent -= value; - } - } - } - - public void onAdOpened(string args) - { - if (_onAdOpenedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdOpenedEvent(adInfo); - } - } - - private static event Action _onAdClosedEvent; - - public static event Action onAdClosedEvent - { - add - { - if (_onAdClosedEvent == null || !_onAdClosedEvent.GetInvocationList().Contains(value)) - { - _onAdClosedEvent += value; - } - } - - remove - { - if (_onAdClosedEvent != null && _onAdClosedEvent.GetInvocationList().Contains(value)) - { - _onAdClosedEvent -= value; - } - } - } - - public void onAdClosed(string args) - { - if (_onAdClosedEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdClosedEvent(adInfo); - } - } - - private static event Action _onAdRewardedEvent; - - public static event Action onAdRewardedEvent - { - add - { - if (_onAdRewardedEvent == null || !_onAdRewardedEvent.GetInvocationList().Contains(value)) - { - _onAdRewardedEvent += value; - } - } - - remove - { - if (_onAdRewardedEvent != null && _onAdRewardedEvent.GetInvocationList().Contains(value)) - { - _onAdRewardedEvent -= value; - } - } - } - - public void onAdRewarded(string args) - { - if (_onAdRewardedEvent != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourcePlacement ssp = getPlacementFromObject(argList[0]); - IronSourceAdInfo adInfo = new IronSourceAdInfo(argList[1].ToString()); - _onAdRewardedEvent(ssp, adInfo); - } - } - - private static event Action _onAdClickedEvent; - - public static event Action onAdClickedEvent - { - add - { - if (_onAdClickedEvent == null || !_onAdClickedEvent.GetInvocationList().Contains(value)) - { - _onAdClickedEvent += value; - } - } - - remove - { - if (_onAdClickedEvent != null && _onAdClickedEvent.GetInvocationList().Contains(value)) - { - _onAdClickedEvent -= value; - } - } - } - - public void onAdClicked(string args) - { - if (_onAdClickedEvent != null) - { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourcePlacement ssp = getPlacementFromObject(argList[0]); - IronSourceAdInfo adInfo = new IronSourceAdInfo(argList[1].ToString()); - _onAdClickedEvent(ssp, adInfo); - } - } - - private static event Action _onAdAvailableEvent; - - public static event Action onAdAvailableEvent - { - add - { - if (_onAdAvailableEvent == null || !_onAdAvailableEvent.GetInvocationList().Contains(value)) - { - _onAdAvailableEvent += value; - } - } - - remove - { - if (_onAdAvailableEvent != null && _onAdAvailableEvent.GetInvocationList().Contains(value)) - { - _onAdAvailableEvent -= value; - } - } - } - - public void onAdAvailable(string args) - { - if (_onAdAvailableEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(args); - _onAdAvailableEvent( adInfo); - } - } - - private static event Action _onAdUnavailableEvent; - - public static event Action onAdUnavailableEvent - { - add - { - if (_onAdUnavailableEvent == null || !_onAdUnavailableEvent.GetInvocationList().Contains(value)) - { - _onAdUnavailableEvent += value; - } - } - - remove - { - if (_onAdUnavailableEvent != null && _onAdUnavailableEvent.GetInvocationList().Contains(value)) - { - _onAdUnavailableEvent -= value; - } - } - } - - public void onAdUnavailable() - { - if (_onAdUnavailableEvent != null) - { - _onAdUnavailableEvent(); - } - } - - // ******************************* RewardedVideo Manual Load Events ******************************* - - private static event Action _onAdLoadFailedEvent; - - public static event Action onAdLoadFailedEvent - { - add - { - if (_onAdLoadFailedEvent == null || !_onAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onAdLoadFailedEvent += value; - } - } - - remove - { - if (_onAdLoadFailedEvent != null && _onAdLoadFailedEvent.GetInvocationList().Contains(value)) - { - _onAdLoadFailedEvent -= value; - } - } - } - - public void onAdLoadFailed(string description) - { - - if (_onAdLoadFailedEvent != null) - { - IronSourceError sse = getErrorFromErrorObject(description); - _onAdLoadFailedEvent(sse); - } - } - - private static event Action _onAdReadyEvent; - - public static event Action onAdReadyEvent - { - add - { - if (_onAdReadyEvent == null || !_onAdReadyEvent.GetInvocationList().Contains(value)) - { - _onAdReadyEvent += value; - } - } - - remove - { - if (_onAdReadyEvent != null && _onAdReadyEvent.GetInvocationList().Contains(value)) - { - _onAdReadyEvent -= value; - } - } - } - - public void onAdReady(string adinfo) - { - if (_onAdReadyEvent != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(adinfo); - _onAdReadyEvent(adInfo); - } - } - -#endif - // ******************************* Helper methods ******************************* - - private IronSourceError getErrorFromErrorObject(object descriptionObject) - { - Dictionary error = null; - if (descriptionObject is IDictionary) - { - error = descriptionObject as Dictionary; - } - else if (descriptionObject is String && !String.IsNullOrEmpty(descriptionObject.ToString())) - { - error = IronSourceJSON.Json.Deserialize(descriptionObject.ToString()) as Dictionary; - } - - IronSourceError sse = new IronSourceError(-1, ""); - if (error != null && error.Count > 0) - { - int eCode = Convert.ToInt32(error[IronSourceConstants.ERROR_CODE].ToString()); - string eDescription = error[IronSourceConstants.ERROR_DESCRIPTION].ToString(); - sse = new IronSourceError(eCode, eDescription); - } - - return sse; - } - - private IronSourcePlacement getPlacementFromObject(object placementObject) - { - Dictionary placementJSON = null; - if (placementObject is IDictionary) - { - placementJSON = placementObject as Dictionary; - } - else if (placementObject is String) - { - placementJSON = IronSourceJSON.Json.Deserialize(placementObject.ToString()) as Dictionary; - } - - IronSourcePlacement ssp = null; - if (placementJSON != null && placementJSON.Count > 0) - { - int rewardAmount = Convert.ToInt32(placementJSON["placement_reward_amount"].ToString()); - string rewardName = placementJSON["placement_reward_name"].ToString(); - string placementName = placementJSON["placement_name"].ToString(); - - ssp = new IronSourcePlacement(placementName, rewardName, rewardAmount); - } - - return ssp; - } -} diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoEvents.cs.meta b/Assets/IronSource/Scripts/IronSourceRewardedVideoEvents.cs.meta deleted file mode 100644 index 5d5efea6..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d33289d6669984b969fad6eb85e3b8a0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayAndroid.cs b/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayAndroid.cs deleted file mode 100644 index 674afaa0..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayAndroid.cs +++ /dev/null @@ -1,108 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; -public class IronSourceRewardedVideoLevelPlayAndroid : AndroidJavaProxy, IUnityLevelPlayRewardedVideo -{ - //implements UnityRewardedVideoListener java interface - public IronSourceRewardedVideoLevelPlayAndroid(): base(IronSourceConstants.LevelPlayRewardedVideoBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityRewardedVideoLevelPlayListener", this); - } - } - catch(Exception e) - { - Debug.LogError("setUnityRewardedVideoLevelPlayListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnAdShowFailed = delegate { }; - public event Action OnAdOpened = delegate { }; - public event Action OnAdClosed = delegate { }; - public event Action OnAdRewarded = delegate { }; - public event Action OnAdClicked = delegate { }; - public event Action OnAdAvailable = delegate { }; - public event Action OnAdUnavailable = delegate { }; - - void onAdShowFailed(string description, string data) - { - if (this.OnAdShowFailed != null) - { - IronSourceError ssp = IronSourceUtils.getErrorFromErrorObject(description); - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdShowFailed(ssp, adInfo); - } - } - - void onAdClosed(string data) - { - if (this.OnAdClosed != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdClosed(adInfo); - } - - } - - void onAdOpened(string data) - { - if (this.OnAdOpened != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdOpened(adInfo); - } - - } - - - void onAdRewarded(string description, string data) - { - if (this.OnAdRewarded != null) - { - IronSourcePlacement ssp = IronSourceUtils.getPlacementFromObject(description); - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdRewarded(ssp, adInfo); - } - - } - - void onAdClicked(string description, string data) - { - if (this.OnAdClicked != null) - { - IronSourcePlacement ssp = IronSourceUtils.getPlacementFromObject(description); - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdClicked(ssp, adInfo); - } - - } - - void onAdAvailable( string data) - { - - - if (this.OnAdAvailable != null) - { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdAvailable( adInfo); - } - - } - - void onAdUnavailable() - { - - if (this.OnAdUnavailable != null) - { - this.OnAdUnavailable(); - } - - } - -} -#endif \ No newline at end of file diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayAndroid.cs.meta deleted file mode 100644 index 0376eab5..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a717c006816184896a23dadce6da7f33 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayManualAndroid.cs b/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayManualAndroid.cs deleted file mode 100644 index e77fdd6a..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayManualAndroid.cs +++ /dev/null @@ -1,43 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; -public class IronSourceRewardedVideoLevelPlayManualAndroid : AndroidJavaProxy, IUnityLevelPlayRewardedVideoManual -{ - - public IronSourceRewardedVideoLevelPlayManualAndroid() : base(IronSourceConstants.LevelPlayRewardedVideoManualBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityRewardedVideoManualLevelPlayListener", this); - } - } - catch (Exception e) - { - Debug.LogError("setUnityRewardedVideoManualLevelPlayListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnAdLoadFailed = delegate { }; - public event Action OnAdReady = delegate { }; - - - void onAdReady(string data) { - if (this.OnAdReady != null) { - IronSourceAdInfo adInfo = new IronSourceAdInfo(data); - this.OnAdReady(adInfo); - } - } - - void onAdLoadFailed(string args) { - if (this.OnAdLoadFailed!=null) { - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(args); - this.OnAdLoadFailed(err); - } - } -} - -#endif diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayManualAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayManualAndroid.cs.meta deleted file mode 100644 index 910f6480..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoLevelPlayManualAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 82d1cd5e25c724d7fab5208f2354a812 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoManualAndroid.cs b/Assets/IronSource/Scripts/IronSourceRewardedVideoManualAndroid.cs deleted file mode 100644 index 3d8243c3..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoManualAndroid.cs +++ /dev/null @@ -1,43 +0,0 @@ -#if UNITY_ANDROID -using System; -using System.Collections.Generic; -using UnityEngine; -public class IronSourceRewardedVideoManualAndroid : AndroidJavaProxy, IUnityRewardedVideoManual -{ - - public IronSourceRewardedVideoManualAndroid() : base(IronSourceConstants.rewardedVideoManualBridgeListenerClass) - { - try - { - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnityRewardedVideoManualListener", this); - } - } - catch (Exception e) - { - Debug.LogError("setUnityRewardedVideoListener method doesn't exist, error: " + e.Message); - } - } - - public event Action OnRewardedVideoAdLoadFailed = delegate { }; - public event Action OnRewardedVideoAdReady = delegate { }; - - - void onRewardedVideoAdReady() { - if (this.OnRewardedVideoAdReady != null) { - this.OnRewardedVideoAdReady(); - } - } - - void onRewardedVideoAdLoadFailed(string args) { - if (this.OnRewardedVideoAdLoadFailed!=null) { - List argList = IronSourceJSON.Json.Deserialize(args) as List; - IronSourceError err = IronSourceUtils.getErrorFromErrorObject(argList[0]); - this.OnRewardedVideoAdLoadFailed(err); - } - } -} - -#endif diff --git a/Assets/IronSource/Scripts/IronSourceRewardedVideoManualAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceRewardedVideoManualAndroid.cs.meta deleted file mode 100644 index 5ecb3d85..00000000 --- a/Assets/IronSource/Scripts/IronSourceRewardedVideoManualAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4ea1e4f8db8774b389f90cebd2d04773 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceSegment.cs b/Assets/IronSource/Scripts/IronSourceSegment.cs deleted file mode 100644 index 332761b8..00000000 --- a/Assets/IronSource/Scripts/IronSourceSegment.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System.Linq; - - - - -public class IronSourceSegment -{ - - public int age; - public string gender = null; - public int level; - public int isPaying; - public long userCreationDate; - public double iapt; - public string segmentName = null; - public Dictionary customs; - - public IronSourceSegment () - { - customs = new Dictionary (); - age = -1; - level = -1; - isPaying = -1; - userCreationDate = -1; - iapt = 0; - } - - public void setCustom(string key, string value){ - customs.Add (key, value); - } - - public Dictionary getSegmentAsDict () - { - Dictionary temp = new Dictionary (); - if (age != -1) - temp.Add ("age", age + ""); - if (!string.IsNullOrEmpty(gender)) - temp.Add ("gender", gender); - if (level != -1) - temp.Add ("level", level + ""); - if (isPaying > -1 && isPaying < 2) - temp.Add ("isPaying", isPaying + ""); - if (userCreationDate != -1) - temp.Add ("userCreationDate", userCreationDate + ""); - if (!string.IsNullOrEmpty(segmentName)) - temp.Add ("segmentName", segmentName); - if (iapt > 0) - temp.Add ("iapt", iapt + ""); - - Dictionary result = temp.Concat (customs).GroupBy (d => d.Key).ToDictionary (d => d.Key, d => d.First ().Value); - - return result; - - } - - - - - - -} - - diff --git a/Assets/IronSource/Scripts/IronSourceSegment.cs.meta b/Assets/IronSource/Scripts/IronSourceSegment.cs.meta deleted file mode 100644 index 2e9a65d2..00000000 --- a/Assets/IronSource/Scripts/IronSourceSegment.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 41e0b08a705ac428db1eb46acd418c61 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceSegmentAndroid.cs b/Assets/IronSource/Scripts/IronSourceSegmentAndroid.cs deleted file mode 100644 index 4ecf0598..00000000 --- a/Assets/IronSource/Scripts/IronSourceSegmentAndroid.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using UnityEngine; - -public class IronSourceSegmentAndroid : AndroidJavaProxy, IUnitySegment - { - public event Action OnSegmentRecieved = delegate { }; - - //implements UnitySegmentListener java interface - public IronSourceSegmentAndroid():base(IronSourceConstants.segmentBridgeListenerClass) - { - try - { - - using (var pluginClass = new AndroidJavaClass(IronSourceConstants.bridgeClass)) - { - var bridgeInstance = pluginClass.CallStatic("getInstance"); - bridgeInstance.Call("setUnitySegmentListener", this); - } - } - catch(Exception e) - { - Debug.LogError("setUnitySegmentListener method doesn't exist, error: " + e.Message); - } - - } - - public void onSegmentRecieved(string segmentName){ - if(OnSegmentRecieved != null) - { - OnSegmentRecieved(segmentName); - } - } - -} diff --git a/Assets/IronSource/Scripts/IronSourceSegmentAndroid.cs.meta b/Assets/IronSource/Scripts/IronSourceSegmentAndroid.cs.meta deleted file mode 100644 index a47dc28c..00000000 --- a/Assets/IronSource/Scripts/IronSourceSegmentAndroid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8743b7fcafd79455984fee0841ab47d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/IronSourceUtils.cs b/Assets/IronSource/Scripts/IronSourceUtils.cs deleted file mode 100644 index 163cfbf1..00000000 --- a/Assets/IronSource/Scripts/IronSourceUtils.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -public class IronSourceUtils - { - private const string ERROR_CODE = "error_code"; - private const string ERROR_DESCRIPTION = "error_description"; - private const string INSTANCE_ID_KEY = "instanceId"; - private const string PLACEMENT_KEY = "placement"; - - public static IronSourceError getErrorFromErrorObject(object descriptionObject) - { - Dictionary error = null; - if (descriptionObject is IDictionary) - { - error = descriptionObject as Dictionary; - } - else if (descriptionObject is String && !String.IsNullOrEmpty(descriptionObject.ToString())) - { - error = IronSourceJSON.Json.Deserialize(descriptionObject.ToString()) as Dictionary; - } - - IronSourceError sse = new IronSourceError(-1, ""); - if (error != null && error.Count > 0) - { - int eCode = Convert.ToInt32(error[ERROR_CODE].ToString()); - string eDescription = error[ERROR_DESCRIPTION].ToString(); - sse = new IronSourceError(eCode, eDescription); - } - - return sse; - } - - public static IronSourcePlacement getPlacementFromObject(object placementObject) - { - Dictionary placementJSON = null; - if (placementObject is IDictionary) - { - placementJSON = placementObject as Dictionary; - } - else if (placementObject is String) - { - placementJSON = IronSourceJSON.Json.Deserialize(placementObject.ToString()) as Dictionary; - } - - IronSourcePlacement ssp = null; - if (placementJSON != null && placementJSON.Count > 0) - { - int rewardAmount = Convert.ToInt32(placementJSON["placement_reward_amount"].ToString()); - string rewardName = placementJSON["placement_reward_name"].ToString(); - string placementName = placementJSON["placement_name"].ToString(); - - ssp = new IronSourcePlacement(placementName, rewardName, rewardAmount); - } - - return ssp; - } -} diff --git a/Assets/IronSource/Scripts/IronSourceUtils.cs.meta b/Assets/IronSource/Scripts/IronSourceUtils.cs.meta deleted file mode 100644 index 2337b14a..00000000 --- a/Assets/IronSource/Scripts/IronSourceUtils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e268f5d89df2410382cdfb83cc44124 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/UnsupportedPlatformAgent.cs b/Assets/IronSource/Scripts/UnsupportedPlatformAgent.cs deleted file mode 100644 index 49498fac..00000000 --- a/Assets/IronSource/Scripts/UnsupportedPlatformAgent.cs +++ /dev/null @@ -1,321 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - -public class UnsupportedPlatformAgent : IronSourceIAgent -{ - public UnsupportedPlatformAgent() - { - Debug.Log("Generated with Unity editor"); - } - - #region IronSourceAgent implementation - - /// - /// This function is not supported on the current platform and does nothing. - /// - /// The configuration for the given ad types waterfall. - /// The AdFormat for which to configure the waterfall. - public void SetWaterfallConfiguration(WaterfallConfiguration waterfallConfiguration, AdFormat adFormat) - { - } - - public void start() - { - } - - //******************* Base API *******************// - - public void onApplicationPause(bool pause) - { - } - - - public string getAdvertiserId() - { - - return ""; - } - - public void validateIntegration() - { - - } - - public void shouldTrackNetworkState(bool track) - { - - } - - public bool setDynamicUserId(string dynamicUserId) - { - - return false; - } - - public void setAdaptersDebug(bool enabled) - { - - } - - public void setMetaData(string key, string value) - { - - } - - public void setMetaData(string key, params string[] values) - { - - } - - public int? getConversionValue() - { - - return null; - } - - public void setManualLoadRewardedVideo(bool isOn) - { - - } - - public void setNetworkData(string networkKey, string networkDataJson) - { - - } - - public void SetPauseGame(bool pause) - { - - } - - //******************* SDK Init *******************// - - public void setUserId(string userId) - { - - } - - public void init(string appKey) - { - - } - - public void init(string appKey, params string[] adUnits) - { - - } - - public void initISDemandOnly(string appKey, params string[] adUnits) - { - - } - - //******************* RewardedVideo API *******************// - - public void loadRewardedVideo() - { - - } - - - public void showRewardedVideo() - { - - } - - public void showRewardedVideo(string placementName) - { - - } - - public bool isRewardedVideoAvailable() - { - - return false; - } - - public bool isRewardedVideoPlacementCapped(string placementName) - { - - return true; - } - - public IronSourcePlacement getPlacementInfo(string placementName) - { - - return null; - } - - public void setRewardedVideoServerParams(Dictionary parameters) - { - - } - - public void clearRewardedVideoServerParams() - { - - } - - //******************* RewardedVideo DemandOnly API *******************// - - public void showISDemandOnlyRewardedVideo(string instanceId) - { - - } - - public void loadISDemandOnlyRewardedVideo(string instanceId) - { - - - } - - public bool isISDemandOnlyRewardedVideoAvailable(string instanceId) - { - - return false; - } - - //******************* Interstitial API *******************// - - public void loadInterstitial() - { - - } - - public void showInterstitial() - { - - } - - public void showInterstitial(string placementName) - { - - } - - public bool isInterstitialReady() - { - - return false; - } - - public bool isInterstitialPlacementCapped(string placementName) - { - - return true; - } - - //******************* Interstitial DemandOnly API *******************// - - public void loadISDemandOnlyInterstitial(string instanceId) - { - - } - - public void showISDemandOnlyInterstitial(string instanceId) - { - - } - - public bool isISDemandOnlyInterstitialReady(string instanceId) - { - - return false; - } - - //******************* Offerwall API *******************// - - public void showOfferwall() - { - - } - - public void showOfferwall(string placementName) - { - - } - - public void getOfferwallCredits() - { - - } - - public bool isOfferwallAvailable() - { - - return false; - } - - //******************* Banner API *******************// - - public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position) - { - - } - - public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position, string placementName) - { - - } - - public void destroyBanner() - { - - } - - public void displayBanner() - { - - } - - public void hideBanner() - { - - } - - public bool isBannerPlacementCapped(string placementName) - { - - return false; - } - - public void setSegment(IronSourceSegment segment) - { - - } - - public void setConsent(bool consent) - { - - } - - //******************* ConsentView API *******************// - - public void loadConsentViewWithType(string consentViewType) - { - - } - - public void showConsentViewWithType(string consentViewType) - { - - } - - //******************* ILRD API *******************// - - public void setAdRevenueData(string dataSource, Dictionary impressionData) - { - - } - - //******************* TestSuite API *******************// - - public void launchTestSuite() - { - Debug.Log("Unsupported Platform"); - } - - - - #endregion -} \ No newline at end of file diff --git a/Assets/IronSource/Scripts/UnsupportedPlatformAgent.cs.meta b/Assets/IronSource/Scripts/UnsupportedPlatformAgent.cs.meta deleted file mode 100644 index e0079146..00000000 --- a/Assets/IronSource/Scripts/UnsupportedPlatformAgent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f52b91b3228874bdaadbe415fd90984f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/WaterfallConfiguration.cs b/Assets/IronSource/Scripts/WaterfallConfiguration.cs deleted file mode 100644 index a3da4edc..00000000 --- a/Assets/IronSource/Scripts/WaterfallConfiguration.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System.Collections.Generic; -using System; - -/// -/// Configuration class which allows users to customize or filter a Waterfall. -/// -public class WaterfallConfiguration -{ - readonly double? ceiling; - readonly double? floor; - - /// - /// Gets the ceiling value. - /// - public double? Ceiling { get { return ceiling; } } - - /// - /// Gets the floor value. - /// - public double? Floor { get { return floor; } } - - /// - /// Initializes a new instance of the WaterfallConfiguration class. - /// - /// The ceiling value. - /// The floor value. - private WaterfallConfiguration(double? ceiling, double? floor) - { - this.ceiling = ceiling; - this.floor = floor; - } - - /// - /// Gets a builder for creating instances of WaterfallConfiguration. - /// - /// The WaterfallConfigurationBuilder. - public static WaterfallConfigurationBuilder Builder() - { - return new WaterfallConfigurationBuilder(); - } - - /// - /// Creates an empty instance of WaterfallConfiguration. - /// - /// The empty WaterfallConfiguration. - public static WaterfallConfiguration Empty() - { - return new WaterfallConfiguration(double.NaN, double.NaN); - } - - /// - /// Builder class which to create a WaterfallConfiguration. - /// - public class WaterfallConfigurationBuilder - { - double? ceiling; - double? floor; - - internal WaterfallConfigurationBuilder() {} - - /// - /// Sets the ceiling value. - /// - /// The ceiling value. - /// The WaterfallConfigurationBuilder. - public WaterfallConfigurationBuilder SetCeiling(double ceiling) - { - this.ceiling = ceiling; - return this; - } - - /// - /// Sets the floor value. - /// - /// The floor value. - /// The WaterfallConfigurationBuilder. - public WaterfallConfigurationBuilder SetFloor(double floor) - { - this.floor = floor; - return this; - } - - /// - /// Builds an instance of WaterfallConfiguration based on the configured values. - /// - /// The created WaterfallConfiguration. - public WaterfallConfiguration Build() - { - return new WaterfallConfiguration(ceiling, floor); - } - } -} diff --git a/Assets/IronSource/Scripts/WaterfallConfiguration.cs.meta b/Assets/IronSource/Scripts/WaterfallConfiguration.cs.meta deleted file mode 100644 index 0874d844..00000000 --- a/Assets/IronSource/Scripts/WaterfallConfiguration.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 354652886a99945cba942b569effe7bb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IronSource/Scripts/iOSAgent.cs b/Assets/IronSource/Scripts/iOSAgent.cs deleted file mode 100644 index 9792319b..00000000 --- a/Assets/IronSource/Scripts/iOSAgent.cs +++ /dev/null @@ -1,533 +0,0 @@ -#if UNITY_IPHONE || UNITY_IOS -using UnityEngine; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System; -using System.Globalization; - - -public class iOSAgent : IronSourceIAgent -{ - - struct IOSWaterfallConfiguration - { - public double Floor; - public double Ceiling; - } - - [DllImport("__Internal")] - private static extern void LPPSetWaterfallConfiguration(IOSWaterfallConfiguration configurationParams, AdFormat adFormat); - - [DllImport("__Internal")] - private static extern void CFSetPluginData(string pluginType, string pluginVersion, string pluginFrameworkVersion); - - [DllImport("__Internal")] - private static extern string CFGetAdvertiserId(); - - [DllImport("__Internal")] - private static extern void CFValidateIntegration(); - - [DllImport("__Internal")] - private static extern void CFShouldTrackNetworkState(bool track); - - [DllImport("__Internal")] - private static extern bool CFSetDynamicUserId(string dynamicUserId); - - [DllImport("__Internal")] - private static extern void CFSetAdaptersDebug(bool enabled); - - [DllImport("__Internal")] - private static extern void CFSetMetaData(string key, string value); - - [DllImport("__Internal")] - private static extern void CFSetMetaDataWithValues(string key, params string[] values); - - [DllImport("__Internal")] - private static extern string CFGetConversionValue(); - - [DllImport("__Internal")] - private static extern void CFSetManualLoadRewardedVideo(bool isOn); - - [DllImport("__Internal")] - private static extern void CFSetNetworkData(string networkKey, string networkData); - - delegate void ISUnityPauseGame(bool pause); - [DllImport("__Internal")] - private static extern void RegisterPauseGameFunction(bool pasue); - - - //******************* SDK Init *******************// - - [DllImport("__Internal")] - private static extern void CFSetUserId(string userId); - - [DllImport("__Internal")] - private static extern void CFInit(string appKey); - - [DllImport("__Internal")] - private static extern void CFInitWithAdUnits(string appKey, params string[] adUnits); - - [DllImport("__Internal")] - private static extern void CFInitISDemandOnly(string appKey, params string[] adUnits); - - //******************* RewardedVideo API *******************// - - [DllImport("__Internal")] - private static extern void CFLoadRewardedVideo(); - - - [DllImport("__Internal")] - private static extern void CFShowRewardedVideo(); - - [DllImport("__Internal")] - private static extern void CFShowRewardedVideoWithPlacementName(string placementName); - - [DllImport("__Internal")] - private static extern bool CFIsRewardedVideoAvailable(); - - [DllImport("__Internal")] - private static extern bool CFIsRewardedVideoPlacementCapped(string placementName); - - [DllImport("__Internal")] - private static extern string CFGetPlacementInfo(string placementName); - - [DllImport("__Internal")] - private static extern void CFSetRewardedVideoServerParameters(string jsonString); - - [DllImport("__Internal")] - private static extern void CFClearRewardedVideoServerParameters(); - - //******************* RewardedVideo DemandOnly API *******************// - - [DllImport("__Internal")] - private static extern void CFShowISDemandOnlyRewardedVideo(string instanceId); - - [DllImport("__Internal")] - private static extern void CFLoadISDemandOnlyRewardedVideo(string instanceId); - - [DllImport("__Internal")] - private static extern bool CFIsDemandOnlyRewardedVideoAvailable(string instanceId); - - //******************* Interstitial API *******************// - - [DllImport("__Internal")] - private static extern void CFLoadInterstitial(); - - [DllImport("__Internal")] - private static extern void CFShowInterstitial(); - - [DllImport("__Internal")] - private static extern void CFShowInterstitialWithPlacementName(string placementName); - - [DllImport("__Internal")] - private static extern bool CFIsInterstitialReady(); - - [DllImport("__Internal")] - private static extern bool CFIsInterstitialPlacementCapped(string placementName); - - //******************* Interstitial DemandOnly API *******************// - - [DllImport("__Internal")] - private static extern void CFLoadISDemandOnlyInterstitial(string instanceId); - - [DllImport("__Internal")] - private static extern void CFShowISDemandOnlyInterstitial(string instanceId); - - [DllImport("__Internal")] - private static extern bool CFIsDemandOnlyInterstitialReady(string instanceId); - - - //******************* Offerwall API *******************// - - [DllImport("__Internal")] - private static extern void CFShowOfferwall(); - - [DllImport("__Internal")] - private static extern void CFShowOfferwallWithPlacementName(string placementName); - - [DllImport("__Internal")] - private static extern void CFGetOfferwallCredits(); - - [DllImport("__Internal")] - private static extern bool CFIsOfferwallAvailable(); - - //******************* Banner API *******************// - - [DllImport("__Internal")] - private static extern void CFLoadBanner(string description, int width, int height, int position, string placementName, bool isAdaptive); - - [DllImport("__Internal")] - private static extern void CFDestroyBanner(); - - [DllImport("__Internal")] - private static extern void CFDisplayBanner(); - - [DllImport("__Internal")] - private static extern void CFHideBanner(); - - [DllImport("__Internal")] - private static extern bool CFIsBannerPlacementCapped(string placementName); - - [DllImport("__Internal")] - private static extern void CFSetSegment(string json); - - [DllImport("__Internal")] - private static extern void CFSetConsent(bool consent); - - //******************* ConsentView API *******************// - - [DllImport("__Internal")] - private static extern void CFLoadConsentViewWithType(string consentViewType); - - [DllImport("__Internal")] - private static extern void CFShowConsentViewWithType(string consentViewType); - - //******************* ILRD API *******************// - - [DllImport("__Internal")] - private static extern void CFSetAdRevenueData(string dataSource, string impressionData); - - //******************* TestSuite API *******************// - - [DllImport("__Internal")] - private static extern void CFLaunchTestSuite(); - - public iOSAgent() - { - } - - #region IronSourceIAgent implementation - - //******************* Base API *******************// - - /// - /// Allows publishers to set configurations for a waterfall of a given ad type. - /// - /// The AdFormat for which to configure the waterfall. - /// The configuration for the given ad types waterfall. - public void SetWaterfallConfiguration(WaterfallConfiguration waterfallConfiguration, AdFormat adFormat) - { - var config = new IOSWaterfallConfiguration - { - Floor = waterfallConfiguration.Floor ?? 0.0, - Ceiling = waterfallConfiguration.Ceiling ?? 0.0 - }; - - LPPSetWaterfallConfiguration(config, adFormat); - } - - public void onApplicationPause(bool pause) - { - - } - - public string getAdvertiserId() - { - return CFGetAdvertiserId(); - } - - public void validateIntegration() - { - CFValidateIntegration(); - } - - public void shouldTrackNetworkState(bool track) - { - CFShouldTrackNetworkState(track); - } - - public bool setDynamicUserId(string dynamicUserId) - { - return CFSetDynamicUserId(dynamicUserId); - } - - public void setAdaptersDebug(bool enabled) - { - CFSetAdaptersDebug(enabled); - } - - public void setMetaData(string key, params string[] values) - { - CFSetMetaDataWithValues(key, values); - } - - public void setMetaData(string key, string value) - { - CFSetMetaData(key, value); - } - - public int? getConversionValue() - { - CultureInfo invCulture = CultureInfo.InvariantCulture; - int parsedInt; - if (int.TryParse(string.Format(invCulture, "{0}", CFGetConversionValue()), NumberStyles.Any, invCulture, out parsedInt)) - { - return parsedInt; - } - - return null; - } - - public void setManualLoadRewardedVideo(bool isOn) - { - CFSetManualLoadRewardedVideo(isOn); - } - - public void setNetworkData(string networkKey, string networkData) - { - CFSetNetworkData(networkKey, networkData); - } - - [AOT.MonoPInvokeCallback(typeof(ISUnityPauseGame))] - public void SetPauseGame(bool pause) - { - RegisterPauseGameFunction(pause); - if (pause) - { - setMetaData("IS_PAUSE_GAME_FLAG", "true"); - } - else - { - setMetaData("IS_PAUSE_GAME_FLAG", "false"); - } - } - - //******************* SDK Init *******************// - - public void setUserId(string userId) - { - CFSetUserId(userId); - } - - public void init(string appKey) - { - CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion()); - Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion()); - CFInit(appKey); - } - - public void init(string appKey, params string[] adUnits) - { - CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion()); - Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion()); - CFInitWithAdUnits(appKey, adUnits); - } - - public void initISDemandOnly(string appKey, params string[] adUnits) - { - CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion()); - Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion()); - CFInitISDemandOnly(appKey, adUnits); - } - - //******************* RewardedVideo API *******************// - - public void loadRewardedVideo() - { - CFLoadRewardedVideo(); - } - - public void showRewardedVideo() - { - CFShowRewardedVideo(); - } - - public void showRewardedVideo(string placementName) - { - CFShowRewardedVideoWithPlacementName(placementName); - } - - public bool isRewardedVideoAvailable() - { - return CFIsRewardedVideoAvailable(); - } - - public bool isRewardedVideoPlacementCapped(string placementName) - { - return CFIsRewardedVideoPlacementCapped(placementName); - } - - public IronSourcePlacement getPlacementInfo(string placementName) - { - IronSourcePlacement sp = null; - - string spString = CFGetPlacementInfo(placementName); - if (spString != null) - { - Dictionary spDic = IronSourceJSON.Json.Deserialize(spString) as Dictionary; - string pName = spDic["placement_name"].ToString(); - string rewardName = spDic["reward_name"].ToString(); - int rewardAmount = Convert.ToInt32(spDic["reward_amount"].ToString()); - sp = new IronSourcePlacement(pName, rewardName, rewardAmount); - } - - return sp; - } - - public void setRewardedVideoServerParams(Dictionary parameters) - { - string json = IronSourceJSON.Json.Serialize(parameters); - CFSetRewardedVideoServerParameters(json); - } - - public void clearRewardedVideoServerParams() - { - CFClearRewardedVideoServerParameters(); - } - - //******************* RewardedVideo DemandOnly API *******************// - - public void showISDemandOnlyRewardedVideo(string instanceId) - { - CFShowISDemandOnlyRewardedVideo(instanceId); - } - - public void loadISDemandOnlyRewardedVideo(string instanceId) - { - CFLoadISDemandOnlyRewardedVideo(instanceId); - } - - public bool isISDemandOnlyRewardedVideoAvailable(string instanceId) - { - return CFIsDemandOnlyRewardedVideoAvailable(instanceId); - } - - //******************* Interstitial API *******************// - - public void loadInterstitial() - { - CFLoadInterstitial(); - } - - public void showInterstitial() - { - CFShowInterstitial(); - } - - public void showInterstitial(string placementName) - { - CFShowInterstitialWithPlacementName(placementName); - } - - public bool isInterstitialReady() - { - return CFIsInterstitialReady(); - } - - public bool isInterstitialPlacementCapped(string placementName) - { - return CFIsInterstitialPlacementCapped(placementName); - } - - //******************* Interstitial DemandOnly API *******************// - - public void loadISDemandOnlyInterstitial(string instanceId) - { - CFLoadISDemandOnlyInterstitial(instanceId); - } - - public void showISDemandOnlyInterstitial(string instanceId) - { - CFShowISDemandOnlyInterstitial(instanceId); - } - - public bool isISDemandOnlyInterstitialReady(string instanceId) - { - return CFIsDemandOnlyInterstitialReady(instanceId); - } - - //******************* Offerwall API *******************// - - public void showOfferwall() - { - CFShowOfferwall(); - } - - public void showOfferwall(string placementName) - { - CFShowOfferwallWithPlacementName(placementName); - } - - public void getOfferwallCredits() - { - CFGetOfferwallCredits(); - } - - public bool isOfferwallAvailable() - { - return CFIsOfferwallAvailable(); - } - - //******************* Banner API *******************// - - public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position) - { - loadBanner(size, position, ""); - } - - public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position, string placementName) - { - CFLoadBanner(size.Description, (int)size.Width, (int)size.Height, (int)position, placementName, (bool)size.IsAdaptiveEnabled()); - } - - public void destroyBanner() - { - CFDestroyBanner(); - } - - public void displayBanner() - { - CFDisplayBanner(); - } - - public void hideBanner() - { - CFHideBanner(); - } - - public bool isBannerPlacementCapped(string placementName) - { - return CFIsBannerPlacementCapped(placementName); - } - - public void setSegment(IronSourceSegment segment) - { - Dictionary dict = segment.getSegmentAsDict(); - string json = IronSourceJSON.Json.Serialize(dict); - CFSetSegment(json); - } - - public void setConsent(bool consent) - { - CFSetConsent(consent); - } - - public void loadConsentViewWithType(string consentViewType) - { - CFLoadConsentViewWithType(consentViewType); - } - - public void showConsentViewWithType(string consentViewType) - { - CFShowConsentViewWithType(consentViewType); - } - - //******************* ILRD API *******************// - - public void setAdRevenueData(string dataSource, Dictionary impressionData) - { - string json = IronSourceJSON.Json.Serialize(impressionData); - CFSetAdRevenueData(dataSource, json); - } - - //******************* TestSuite API *******************// - - public void launchTestSuite() - { - Debug.Log("iOSAgent: launching TestSuite"); - CFLaunchTestSuite(); - } - - #endregion -} -#endif diff --git a/Assets/IronSource/Scripts/iOSAgent.cs.meta b/Assets/IronSource/Scripts/iOSAgent.cs.meta deleted file mode 100644 index edfdfd53..00000000 --- a/Assets/IronSource/Scripts/iOSAgent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c60166fbbddfb4f388ad35e9ab2ab6f3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/PipeOut/Scenes/Loading.unity b/Assets/PipeOut/Scenes/Loading.unity index 9b8f87f7..8c1c3cda 100644 --- a/Assets/PipeOut/Scenes/Loading.unity +++ b/Assets/PipeOut/Scenes/Loading.unity @@ -122,53 +122,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &11358291 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 11358293} - - component: {fileID: 11358292} - m_Layer: 0 - m_Name: GoogleSignInManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &11358292 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 11358291} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: aea303bf6931eb64a925ac187863ae99, type: 3} - m_Name: - m_EditorClassIdentifier: - bootstrapper: {fileID: 1407567916} - googleSignInButton: {fileID: 1119814872} - guestLoginButton: {fileID: 843293979} ---- !u!4 &11358293 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 11358291} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.97327656, y: 2.3616843, z: 90} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &83133762 GameObject: m_ObjectHideFlags: 0 @@ -910,53 +863,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 439213423} m_CullTransparentMesh: 1 ---- !u!21 &457499801 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/Shiny_Reflect - m_Shader: {fileID: 4800000, guid: 6fc94ae14d17d3642b09718b5b932fd2, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex2: - m_Texture: {fileID: 2800000, guid: 6ed1aafd335608e48aa3198044a161df, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _Distortion: 0.27399376 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - - _Value2: 0.5 - - _Value3: 1 - - _Value4: 0 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &502314208 GameObject: m_ObjectHideFlags: 0 @@ -2491,7 +2397,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1119814873} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: + m_MethodName: + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!114 &1119814873 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2800,7 +2718,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 457499801} + m_Material: {fileID: 1380792927} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} @@ -2873,6 +2791,53 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!21 &1380792927 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/Shiny_Reflect + m_Shader: {fileID: 4800000, guid: 6fc94ae14d17d3642b09718b5b932fd2, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex2: + m_Texture: {fileID: 2800000, guid: 6ed1aafd335608e48aa3198044a161df, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _Distortion: 1.1174531 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Value2: 0.5 + - _Value3: 1 + - _Value4: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1407567915 GameObject: m_ObjectHideFlags: 0 @@ -3650,6 +3615,5 @@ SceneRoots: - {fileID: 408891932} - {fileID: 1407567917} - {fileID: 1797903893} - - {fileID: 11358293} - {fileID: 1466205357} - {fileID: 502314209} diff --git a/Assets/Plugins/Android/mainTemplate.gradle b/Assets/Plugins/Android/mainTemplate.gradle index a0258762..aadee50e 100644 --- a/Assets/Plugins/Android/mainTemplate.gradle +++ b/Assets/Plugins/Android/mainTemplate.gradle @@ -14,16 +14,13 @@ dependencies { // Android Resolver Dependencies Start implementation 'androidx.constraintlayout:constraintlayout:2.1.4' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12 implementation 'com.google.android.gms:play-services-ads:23.2.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7 - implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:17 implementation 'com.google.android.gms:play-services-base:18.6.0' // Assets/Firebase/Editor/AppDependencies.xml:17 - implementation 'com.google.android.gms:play-services-basement:18.1.0' // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:25 implementation 'com.google.android.ump:user-messaging-platform:2.2.0' // Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7 implementation 'com.google.firebase:firebase-analytics:22.4.0' // Assets/Firebase/Editor/AuthDependencies.xml:15 implementation 'com.google.firebase:firebase-app-unity:12.8.0' // Assets/Firebase/Editor/AppDependencies.xml:22 implementation 'com.google.firebase:firebase-auth:23.2.0' // Assets/Firebase/Editor/AuthDependencies.xml:13 implementation 'com.google.firebase:firebase-auth-unity:12.8.0' // Assets/Firebase/Editor/AuthDependencies.xml:20 implementation 'com.google.firebase:firebase-common:21.0.0' // Assets/Firebase/Editor/AppDependencies.xml:13 - implementation 'com.ironsource.sdk:mediationsdk:7.3.1.1' // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:9 implementation 'com.onesignal:OneSignal:5.1.26' // Packages/com.onesignal.unity.android/Editor/OneSignalAndroidDependencies.xml:6 // Android Resolver Dependencies End **DEPS** diff --git a/Assets/Plugins/Android/settingsTemplate.gradle b/Assets/Plugins/Android/settingsTemplate.gradle index 9c1fe0fd..5d7446f1 100644 --- a/Assets/Plugins/Android/settingsTemplate.gradle +++ b/Assets/Plugins/Android/settingsTemplate.gradle @@ -25,10 +25,7 @@ dependencyResolutionManagement { url (unityProjectPath + "/Assets/GeneratedLocalRepo/Firebase/m2repository") // Assets/Firebase/Editor/AppDependencies.xml:22, Assets/Firebase/Editor/AuthDependencies.xml:20 } maven { - url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7, Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12, Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7, Assets/IronSource/Editor/IronSourceSDKDependencies.xml:17, Assets/IronSource/Editor/IronSourceSDKDependencies.xml:25 - } - maven { - url "https://android-sdk.is.com/" // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:9 + url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7, Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12, Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7 } mavenLocal() // Android Resolver Repos End diff --git a/Assets/Scripts/AdmobController.cs b/Assets/Scripts/AdmobController.cs index efac2949..34923d29 100644 --- a/Assets/Scripts/AdmobController.cs +++ b/Assets/Scripts/AdmobController.cs @@ -50,14 +50,14 @@ public class AdmobController : MonoBehaviour Debug.Log("unity-script: IronSource.Agent.validateIntegration"); - IronSource.Agent.validateIntegration(); - IronSource.Agent.setConsent(true); + // IronSource.Agent.validateIntegration(); + // IronSource.Agent.setConsent(true); - Debug.Log("unity-script: unity version" + IronSource.unityVersion()); + // Debug.Log("unity-script: unity version" + IronSource.unityVersion()); // SDK init Debug.Log("unity-script: IronSource.Agent.init"); - IronSource.Agent.init(appKey); + // IronSource.Agent.init(appKey); } void OnEnable() @@ -98,7 +98,7 @@ public class AdmobController : MonoBehaviour void OnApplicationPause(bool isPaused) { Debug.Log("unity-script: OnApplicationPause = " + isPaused); - IronSource.Agent.onApplicationPause(isPaused); + // IronSource.Agent.onApplicationPause(isPaused); } @@ -126,21 +126,21 @@ public class AdmobController : MonoBehaviour #endregion #region AdInfo Rewarded Video - public void RewardedVideoOnAdOpenedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoOnAdOpenedEvent With AdInfo " + adInfo); - } - - public void RewardedVideoOnAdClosedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoOnAdClosedEvent With AdInfo " + adInfo); - } - - public void RewardedVideoOnAdAvailable(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoOnAdAvailable With AdInfo " + adInfo); - isRewardedAdAvailable = true; - } + // public void RewardedVideoOnAdOpenedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got RewardedVideoOnAdOpenedEvent With AdInfo " + adInfo); + // } + + // public void RewardedVideoOnAdClosedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got RewardedVideoOnAdClosedEvent With AdInfo " + adInfo); + // } + + // public void RewardedVideoOnAdAvailable(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got RewardedVideoOnAdAvailable With AdInfo " + adInfo); + // isRewardedAdAvailable = true; + // } public void RewardedVideoOnAdUnavailable() { @@ -148,108 +148,108 @@ public class AdmobController : MonoBehaviour isRewardedAdAvailable = false; } - public void RewardedVideoOnAdShowFailedEvent(IronSourceError ironSourceError, IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoAdOpenedEvent With Error" + ironSourceError + "And AdInfo " + adInfo); - } + // public void RewardedVideoOnAdShowFailedEvent(IronSourceError ironSourceError, IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got RewardedVideoAdOpenedEvent With Error" + ironSourceError + "And AdInfo " + adInfo); + // } - public void RewardedVideoOnAdRewardedEvent(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoOnAdRewardedEvent With Placement" + ironSourcePlacement + "And AdInfo " + adInfo); - } + // public void RewardedVideoOnAdRewardedEvent(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got RewardedVideoOnAdRewardedEvent With Placement" + ironSourcePlacement + "And AdInfo " + adInfo); + // } - public void RewardedVideoOnAdClickedEvent(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got RewardedVideoOnAdClickedEvent With Placement" + ironSourcePlacement + "And AdInfo " + adInfo); - } + // public void RewardedVideoOnAdClickedEvent(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got RewardedVideoOnAdClickedEvent With Placement" + ironSourcePlacement + "And AdInfo " + adInfo); + // } #endregion #region AdInfo Interstitial - void InterstitialOnAdReadyEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got InterstitialOnAdReadyEvent With AdInfo " + adInfo); - isInterAdAvailable = true; - } - - void InterstitialOnAdLoadFailed(IronSourceError ironSourceError) - { - Debug.Log("unity-script: I got InterstitialOnAdLoadFailed With Error " + ironSourceError); - isInterAdAvailable = false; - - } - - void InterstitialOnAdOpenedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got InterstitialOnAdOpenedEvent With AdInfo " + adInfo); - } - - void InterstitialOnAdClickedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got InterstitialOnAdClickedEvent With AdInfo " + adInfo); - } - - void InterstitialOnAdShowSucceededEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got InterstitialOnAdShowSucceededEvent With AdInfo " + adInfo); - } - - void InterstitialOnAdShowFailedEvent(IronSourceError ironSourceError, IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got InterstitialOnAdShowFailedEvent With Error " + ironSourceError + " And AdInfo " + adInfo); - } - - void InterstitialOnAdClosedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got InterstitialOnAdClosedEvent With AdInfo " + adInfo); - IronSource.Agent.loadInterstitial(); - } + // void InterstitialOnAdReadyEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got InterstitialOnAdReadyEvent With AdInfo " + adInfo); + // isInterAdAvailable = true; + // } + + // void InterstitialOnAdLoadFailed(IronSourceError ironSourceError) + // { + // Debug.Log("unity-script: I got InterstitialOnAdLoadFailed With Error " + ironSourceError); + // isInterAdAvailable = false; + // + // } + + // void InterstitialOnAdOpenedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got InterstitialOnAdOpenedEvent With AdInfo " + adInfo); + // } + + // void InterstitialOnAdClickedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got InterstitialOnAdClickedEvent With AdInfo " + adInfo); + // } + + // void InterstitialOnAdShowSucceededEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got InterstitialOnAdShowSucceededEvent With AdInfo " + adInfo); + // } + + // void InterstitialOnAdShowFailedEvent(IronSourceError ironSourceError, IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got InterstitialOnAdShowFailedEvent With Error " + ironSourceError + " And AdInfo " + adInfo); + // } + + // void InterstitialOnAdClosedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got InterstitialOnAdClosedEvent With AdInfo " + adInfo); + // IronSource.Agent.loadInterstitial(); + // } #endregion #region Banner AdInfo - void BannerOnAdLoadedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got BannerOnAdLoadedEvent With AdInfo " + adInfo); - // IronSource.Agent.displayBanner(); - } - - void BannerOnAdLoadFailedEvent(IronSourceError ironSourceError) - { - Debug.Log("unity-script: I got BannerOnAdLoadFailedEvent With Error " + ironSourceError); - } - - void BannerOnAdClickedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got BannerOnAdClickedEvent With AdInfo " + adInfo); - } - - void BannerOnAdScreenPresentedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got BannerOnAdScreenPresentedEvent With AdInfo " + adInfo); - } - - void BannerOnAdScreenDismissedEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got BannerOnAdScreenDismissedEvent With AdInfo " + adInfo); - } - - void BannerOnAdLeftApplicationEvent(IronSourceAdInfo adInfo) - { - Debug.Log("unity-script: I got BannerOnAdLeftApplicationEvent With AdInfo " + adInfo); - } + // void BannerOnAdLoadedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got BannerOnAdLoadedEvent With AdInfo " + adInfo); + // // IronSource.Agent.displayBanner(); + // } + + // void BannerOnAdLoadFailedEvent(IronSourceError ironSourceError) + // { + // Debug.Log("unity-script: I got BannerOnAdLoadFailedEvent With Error " + ironSourceError); + // } + + // void BannerOnAdClickedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got BannerOnAdClickedEvent With AdInfo " + adInfo); + // } + + // void BannerOnAdScreenPresentedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got BannerOnAdScreenPresentedEvent With AdInfo " + adInfo); + // } + + // void BannerOnAdScreenDismissedEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got BannerOnAdScreenDismissedEvent With AdInfo " + adInfo); + // } + + // void BannerOnAdLeftApplicationEvent(IronSourceAdInfo adInfo) + // { + // Debug.Log("unity-script: I got BannerOnAdLeftApplicationEvent With AdInfo " + adInfo); + // } #endregion #region ImpressionSuccess callback handler - void ImpressionDataReadyEvent(IronSourceImpressionData impressionData) - { - Debug.Log("unity - script: I got ImpressionDataReadyEvent ToString(): " + impressionData.ToString()); - Debug.Log("unity - script: I got ImpressionDataReadyEvent allData: " + impressionData.allData); - } + // void ImpressionDataReadyEvent(IronSourceImpressionData impressionData) + // { + // Debug.Log("unity - script: I got ImpressionDataReadyEvent ToString(): " + impressionData.ToString()); + // Debug.Log("unity - script: I got ImpressionDataReadyEvent allData: " + impressionData.allData); + // } #endregion } diff --git a/Assets/Scripts/GamePlayManager.cs b/Assets/Scripts/GamePlayManager.cs index 664b12d5..dc973c83 100644 --- a/Assets/Scripts/GamePlayManager.cs +++ b/Assets/Scripts/GamePlayManager.cs @@ -476,8 +476,6 @@ public class GamePlayManager : MonoBehaviour nextBtn.interactable = true; GameManager.currentLevelGroup.SetLevelCompleted(GameManager.CurrentLevelNo, Time.time - startTime); PlayerPrefsSyncManager.instance.SyncPlayerPrefsToPlayFab(); - if (AdmobController.isInterAdAvailable) - IronSource.Agent.showInterstitial(); } private void UpdateAchievements() diff --git a/Assets/Scripts/RewardedVideoButton.cs b/Assets/Scripts/RewardedVideoButton.cs index 2133163f..7c875e64 100644 --- a/Assets/Scripts/RewardedVideoButton.cs +++ b/Assets/Scripts/RewardedVideoButton.cs @@ -47,10 +47,10 @@ public class RewardedVideoButton : MonoBehaviour Sound.instance.PlayButton(); } - public void HandleRewardBasedVideoRewarded(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo ironSourceAdInfo) - { - - } + // public void HandleRewardBasedVideoRewarded(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo ironSourceAdInfo) + // { + // + // } //public void HandleRewardBasedVideoRewarded(object sender, Reward args) //{ @@ -66,7 +66,7 @@ public class RewardedVideoButton : MonoBehaviour private void OnDisable() { - IronSourceRewardedVideoEvents.onAdRewardedEvent -= HandleRewardBasedVideoRewarded; + // IronSourceRewardedVideoEvents.onAdRewardedEvent -= HandleRewardBasedVideoRewarded; AdsManager.Instance.OnUserEarnedReward -= OnRewardAdComplete; //if (AdmobController.instance.rewardBasedVideo != null) //{ diff --git a/Assets/Scripts/RewardedVideoCallBack.cs b/Assets/Scripts/RewardedVideoCallBack.cs index a01cac21..be191bc9 100644 --- a/Assets/Scripts/RewardedVideoCallBack.cs +++ b/Assets/Scripts/RewardedVideoCallBack.cs @@ -27,7 +27,7 @@ public class RewardedVideoCallBack : MonoBehaviour private void AddEvents() { - IronSourceRewardedVideoEvents.onAdRewardedEvent += HandleRewardBasedVideoRewarded; + // IronSourceRewardedVideoEvents.onAdRewardedEvent += HandleRewardBasedVideoRewarded; //if (AdmobController.instance.rewardBasedVideo != null) //{ @@ -39,14 +39,14 @@ public class RewardedVideoCallBack : MonoBehaviour //{ //} - public void HandleRewardBasedVideoRewarded(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo ironSourceAdInfo) - { - //onRewarded.Invoke(); - } + // public void HandleRewardBasedVideoRewarded(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo ironSourceAdInfo) + // { + // //onRewarded.Invoke(); + // } private void OnDestroy() { - IronSourceRewardedVideoEvents.onAdRewardedEvent -= HandleRewardBasedVideoRewarded; + // IronSourceRewardedVideoEvents.onAdRewardedEvent -= HandleRewardBasedVideoRewarded; //if (AdmobController.instance.rewardBasedVideo != null) //{ diff --git a/Assets/Scripts/RewardedVideoGroup.cs b/Assets/Scripts/RewardedVideoGroup.cs index f345ce57..9d18b356 100644 --- a/Assets/Scripts/RewardedVideoGroup.cs +++ b/Assets/Scripts/RewardedVideoGroup.cs @@ -49,7 +49,7 @@ public class RewardedVideoGroup : MonoBehaviour private void AddEvents() { - IronSourceRewardedVideoEvents.onAdRewardedEvent += HandleRewardBasedVideoRewarded; + // IronSourceRewardedVideoEvents.onAdRewardedEvent += HandleRewardBasedVideoRewarded; } @@ -60,7 +60,7 @@ public class RewardedVideoGroup : MonoBehaviour public void OnClick() { - IronSource.Agent.showRewardedVideo(); + // IronSource.Agent.showRewardedVideo(); //AdmobController.instance.ShowRewardBasedVideo(); Sound.instance.PlayButton(); } @@ -75,11 +75,11 @@ public class RewardedVideoGroup : MonoBehaviour } } - public void HandleRewardBasedVideoRewarded(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo ironSourceAdInfo) - { - buttonGroup.SetActive(value: false); - ShowTimerText(GameConfig.instance.rewardedVideoPeriod); - } + // public void HandleRewardBasedVideoRewarded(IronSourcePlacement ironSourcePlacement, IronSourceAdInfo ironSourceAdInfo) + // { + // buttonGroup.SetActive(value: false); + // ShowTimerText(GameConfig.instance.rewardedVideoPeriod); + // } //public void HandleRewardBasedVideoRewarded(object sender, Reward args) //{ @@ -110,14 +110,14 @@ public class RewardedVideoGroup : MonoBehaviour { //if (AdmobController.instance.rewardBasedVideo == null) //{ - // return false; - //} - return IronSource.Agent.isRewardedVideoAvailable(); + return false; + // } + // return IronSource.Agent.isRewardedVideoAvailable(); } private void OnDestroy() { - IronSourceRewardedVideoEvents.onAdRewardedEvent -= HandleRewardBasedVideoRewarded; + // IronSourceRewardedVideoEvents.onAdRewardedEvent -= HandleRewardBasedVideoRewarded; } diff --git a/ProjectSettings/AndroidResolverDependencies.xml b/ProjectSettings/AndroidResolverDependencies.xml index 44d2e04c..99258fd7 100644 --- a/ProjectSettings/AndroidResolverDependencies.xml +++ b/ProjectSettings/AndroidResolverDependencies.xml @@ -2,16 +2,13 @@ androidx.constraintlayout:constraintlayout:2.1.4 com.google.android.gms:play-services-ads:23.2.0 - com.google.android.gms:play-services-ads-identifier:18.0.1 com.google.android.gms:play-services-base:18.6.0 - com.google.android.gms:play-services-basement:18.1.0 com.google.android.ump:user-messaging-platform:2.2.0 com.google.firebase:firebase-analytics:22.4.0 com.google.firebase:firebase-app-unity:12.8.0 com.google.firebase:firebase-auth:23.2.0 com.google.firebase:firebase-auth-unity:12.8.0 com.google.firebase:firebase-common:21.0.0 - com.ironsource.sdk:mediationsdk:7.3.1.1 com.onesignal:OneSignal:5.1.26