Skip to content

Commit b6813f6

Browse files
committed
Logs fixed
1 parent b4f9ff0 commit b6813f6

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

Assets/ConsentManagementProvider/Scripts/facade/CMP.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void LoadMessage(string authId = null)
6565
{
6666
if (IsEditor)
6767
{
68-
CmpDebugUtil.LogWarning("Emulating LoadMessage call... Sourcepoint CMP works only for real Android/iOS devices, not the Unity Editor.");
68+
Debug.LogWarning("Emulating LoadMessage call... Sourcepoint CMP works only for real Android/iOS devices, not the Unity Editor.");
6969
return;
7070
}
7171

Assets/ConsentManagementProvider/Scripts/json/JsonUnwrapper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Collections.Generic;
22
using System.Text.Json;
3-
using UnityEngine;
43

54
namespace ConsentManagementProviderLib.Json
65
{
@@ -195,6 +194,7 @@ private static JsonElement getValueJsonElement(JsonElement element, string name)
195194
JsonElement value = getValueJsonElement(element, name);
196195
if (value.ValueKind == JsonValueKind.Undefined)
197196
{
197+
CmpDebugUtil.LogWarning(name + " == JsonValueKind.Undefined! Unable to unwrap!");
198198
return null;
199199
}
200200
return value.ToString();
@@ -205,6 +205,7 @@ private static object getObjectJsonElement(JsonElement element, string name)
205205
JsonElement value = getValueJsonElement(element, name);
206206
if (value.ValueKind == JsonValueKind.Undefined)
207207
{
208+
CmpDebugUtil.LogWarning(name + " == JsonValueKind.Undefined! Unable to unwrap!");
208209
return null;
209210
}
210211
return value;

Assets/ConsentManagementProvider/Scripts/wrapper/iOS/CMPiOSListenerHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void OnConsentReady(string message)
4949
}
5050
catch (Exception ex)
5151
{
52-
CmpDebugUtil.LogError(
52+
Debug.LogError(
5353
"Something went wrong while parsing the json data; null will be returned. \n Exception message: " +
5454
ex.Message);
5555
}
@@ -96,7 +96,7 @@ void OnCustomConsentGDPRCallback(string jsonSPGDPRConsent)
9696
}
9797
catch (Exception ex)
9898
{
99-
CmpDebugUtil.LogError(
99+
Debug.LogError(
100100
"Something went wrong while parsing the json data; null will be returned. \n Exception message: " +
101101
ex.Message);
102102
}

Assets/ExampleApp/Scripts/ConsentEventHandler.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ void Awake()
1616

1717
public void OnConsentUIReady()
1818
{
19-
CmpDebugUtil.LogWarning("User will be shown the web view with series of consent messages!");
19+
Debug.LogWarning("User will be shown the web view with series of consent messages!");
2020
}
2121

2222
public void OnConsentAction(CONSENT_ACTION_TYPE action)
2323
{
24-
CmpDebugUtil.LogWarning($"User made {action} action with consent view!");
24+
Debug.LogWarning($"User made {action} action with consent view!");
2525
}
2626

2727
public void OnConsentError(Exception exception)
2828
{
29-
CmpDebugUtil.LogError("Oh no, an error! " + exception.Message);
29+
Debug.LogError("Oh no, an error! " + exception.Message);
3030
}
3131

3232
public void OnConsentUIFinished()
3333
{
34-
CmpDebugUtil.LogWarning("User has interacted with the web view consent message and it is disappeared!");
34+
Debug.LogWarning("User has interacted with the web view consent message and it is disappeared!");
3535
}
3636

3737
public void OnConsentSpFinished(SpConsents spConsents)
3838
{
39-
CmpDebugUtil.LogWarning("OnSpFinished() called!");
39+
Debug.LogWarning("OnSpFinished() called!");
4040
}
4141

4242
public void OnConsentReady(SpConsents spConsents)
4343
{
44-
CmpDebugUtil.Log($"The user interaction on consent messages is done. You can use the spConsent info; \n If it was the last from the series of consents, you can continue user's gaming experience!");
44+
Debug.Log($"The user interaction on consent messages is done. You can use the spConsent info; \n If it was the last from the series of consents, you can continue user's gaming experience!");
4545
}
4646

4747
private void OnDestroy()

Assets/ExampleApp/Scripts/CustomConsentButtonCaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public void OnCustomConsentButtonClick()
2020

2121
private void SuccessDelegate(GdprConsent customConsent)
2222
{
23-
CmpDebugUtil.Log($"I am your success callback!");
23+
Debug.Log($"I am your success callback!");
2424
}
2525
}

Assets/UI/Scripts/ClickStubCmpButton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ public class ClickStubCmpButton : MonoBehaviour
55
{
66
public void LogStubOnClick()
77
{
8-
CmpDebugUtil.Log($"{this.name} element has been CKICKED");
8+
Debug.Log($"{this.name} element has been CLICKED");
99
}
1010
}

0 commit comments

Comments
 (0)