Skip to content

Commit

Permalink
update ver
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtueSky committed Jan 10, 2024
1 parent c6540a8 commit a26a441
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

### Add the line below to `Packages/manifest.json`

for version `2.3.2`
for version `2.3.3`
```csharp
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#2.3.2",
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#2.3.3",
```

#### Note:
Expand Down
17 changes: 16 additions & 1 deletion VirtueSky/ControlPanel/ControlPanelWindowEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,21 @@ void OnDrawScriptDefineSymbols()

#endregion

#region flag AppsFlyer

GUILayout.BeginHorizontal();
if (GUILayout.Button("VIRTUESKY_APPSFLYER", GUILayout.Width(400)))
{
EditorScriptDefineSymbols.AppsFlyerConfigFlag();
}

GUILayout.Space(10);
GUILayout.Toggle(EditorScriptDefineSymbols.IsAppsFlyerFlag(),
TextIsEnable(EditorScriptDefineSymbols.IsAppsFlyerFlag()));
GUILayout.EndHorizontal();

#endregion

GUILayout.EndVertical();
}

Expand Down Expand Up @@ -837,7 +852,7 @@ void OnDrawAbout()
GUILayout.TextArea(
"Description: Core ScriptableObject architecture for building Unity games",
EditorStyles.boldLabel);
GUILayout.TextArea("Version: 2.3.2", EditorStyles.boldLabel);
GUILayout.TextArea("Version: 2.3.3", EditorStyles.boldLabel);
GUILayout.TextArea("Author: VirtueSky", EditorStyles.boldLabel);
GUILayout.Space(10);
if (GUILayout.Button("Open GitHub Repository"))
Expand Down
1 change: 1 addition & 0 deletions VirtueSky/TrackingRevenue/AppTracking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static void TrackRevenue(double value, string network, string unitId, str
AdjustTrackingRevenue.AdjustTrackRevenue(value, network, unitId, format, adNetwork);
FirebaseAnalyticTrackingRevenue.FirebaseAnalyticTrackRevenue(value, network, unitId,
format, adNetwork);
AppsFlyerTrackingRevenue.AppsFlyerTrackRevenue(value, network, unitId, format, adNetwork);
}

public static void FirebaseAnalyticTrackATTResult(int status)
Expand Down
6 changes: 6 additions & 0 deletions VirtueSky/TrackingRevenue/AppsFlyerTrackingRevenue.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System.Collections.Generic;

#if VIRTUESKY_APPSFLYER
using AppsFlyerSDK;
#endif


namespace VirtueSky.TrackingRevenue
{
Expand All @@ -8,6 +12,7 @@ public static class AppsFlyerTrackingRevenue
public static void AppsFlyerTrackRevenue(double value, string network, string unitId,
string format, string adNetwork)
{
#if VIRTUESKY_APPSFLYER
Dictionary<string, string> purchaseEvent = new Dictionary<string, string>();
purchaseEvent.Add("value", value.ToString());
switch (adNetwork.ToLower())
Expand All @@ -26,6 +31,7 @@ public static void AppsFlyerTrackRevenue(double value, string network, string un
purchaseEvent.Add("ad_source", network);

AppsFlyer.sendEvent("af_purchase", purchaseEvent);
#endif
}
}
}
24 changes: 24 additions & 0 deletions VirtueSky/Utils/Editor/EditorScriptDefineSymbols.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,30 @@ public static bool IsNotificationFlag()

#endregion

#region AppsFlyer

private const string menuPathAppsFlyer = "Sunflower/ScriptDefineSymbols/VIRTUESKY_APPSFLYER";

[MenuItem(menuPathAppsFlyer)]
public static void AppsFlyerConfigFlag()
{
SwitchFlag("VIRTUESKY_APPSFLYER");
}

[MenuItem(menuPathAppsFlyer, true)]
public static bool IsAppsFlyerConfigFlagEnable()
{
Menu.SetChecked(menuPathAppsFlyer, IsFlagEnabled("VIRTUESKY_APPSFLYER"));
return true;
}

public static bool IsAppsFlyerFlag()
{
return IsFlagEnabled("VIRTUESKY_APPSFLYER");
}

#endregion

#region Base Functions

public static void SwitchFlag(string flag)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.virtuesky.sunflower",
"displayName": "Sunflower",
"description": "Core ScriptableObject Architecture for building Unity games",
"version": "2.3.2",
"version": "2.3.3",
"unity": "2022.3",
"category": "virtuesky",
"keywords": [
Expand Down

0 comments on commit a26a441

Please sign in to comment.