Skip to content

Commit

Permalink
Merge pull request #18 from wolf-org/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VirtueSky authored Oct 9, 2024
2 parents ad00d4d + df33d6d commit dc539b3
Show file tree
Hide file tree
Showing 19 changed files with 126 additions and 83 deletions.
16 changes: 8 additions & 8 deletions Module/ControlPanel/CPAdjustDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace VirtueSky.ControlPanel.Editor
{
public class CPAdjustDrawer
{
private static AdjustSetting _setting;
private static AdjustConfig config;
private static UnityEditor.Editor _editor;
private static Vector2 scroll = Vector2.zero;

Expand All @@ -19,8 +19,8 @@ public static void OnEnable()
private static void Init()
{
if (_editor != null) _editor = null;
_setting = CreateAsset.GetScriptableAsset<AdjustSetting>();
_editor = UnityEditor.Editor.CreateEditor(_setting);
config = CreateAsset.GetScriptableAsset<AdjustConfig>();
_editor = UnityEditor.Editor.CreateEditor(config);
}

public static void OnDrawAdjust()
Expand All @@ -47,14 +47,14 @@ public static void OnDrawAdjust()
GUILayout.Space(10);
CPUtility.GuiLine(2);
GUILayout.Space(10);
CPUtility.DrawHeader("Adjust Settings");
CPUtility.DrawHeader("Adjust Config");
GUILayout.Space(10);
if (_setting == null)
if (config == null)
{
if (GUILayout.Button("Create AdjustSettings"))
if (GUILayout.Button("Create AdjustConfig"))
{
_setting =
CreateAsset.CreateAndGetScriptableAsset<AdjustSetting>(isPingAsset: false);
config =
CreateAsset.CreateAndGetScriptableAsset<AdjustConfig>(isPingAsset: false);
Init();
}
}
Expand Down
16 changes: 8 additions & 8 deletions Module/ControlPanel/CPAppsFlyerDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace VirtueSky.ControlPanel.Editor
{
public class CPAppsFlyerDrawer
{
private static AppsFlyerSetting _setting;
private static AppsFlyerConfig config;
private static UnityEditor.Editor _editor;
private static Vector2 scroll = Vector2.zero;
private static readonly string pathScriptableTracking = $"{FileExtension.DefaultRootPath}/Tracking_AppsFlyer";
Expand All @@ -20,8 +20,8 @@ public static void OnEnable()
private static void Init()
{
if (_editor != null) _editor = null;
_setting = CreateAsset.GetScriptableAsset<AppsFlyerSetting>();
_editor = UnityEditor.Editor.CreateEditor(_setting);
config = CreateAsset.GetScriptableAsset<AppsFlyerConfig>();
_editor = UnityEditor.Editor.CreateEditor(config);
}

public static void OnDrawAppsFlyer()
Expand Down Expand Up @@ -51,14 +51,14 @@ public static void OnDrawAppsFlyer()
GUILayout.Space(10);
CPUtility.GuiLine(2);
GUILayout.Space(10);
CPUtility.DrawHeader("AppsFlyer Settings");
CPUtility.DrawHeader("AppsFlyer Config");
GUILayout.Space(10);
if (_setting == null)
if (config == null)
{
if (GUILayout.Button("Create AppsFlyerSettings"))
if (GUILayout.Button("Create AppsFlyerConfig"))
{
_setting =
CreateAsset.CreateAndGetScriptableAsset<AppsFlyerSetting>(isPingAsset: false);
config =
CreateAsset.CreateAndGetScriptableAsset<AppsFlyerConfig>(isPingAsset: false);
Init();
}
}
Expand Down
24 changes: 12 additions & 12 deletions Module/ControlPanel/ConstantPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public class ConstantPackage
{
public const string VersionUnityCommon = "1.3.7";
public const string VersionUnityCommon = "1.3.8";
public const string PackageNameInAppPurchase = "com.unity.purchasing";
public const string MaxVersionInAppPurchase = "4.12.2";
public const string PackageNameNewtonsoftJson = "com.unity.nuget.newtonsoft-json";
Expand Down Expand Up @@ -36,7 +36,7 @@ public class ConstantPackage
"com.google.external-dependency-manager";

public const string MaxVersionGGExternalDependencyManager =
"https://github.com/google-unity/external-dependency-manager.git#1.2.182";
"https://github.com/google-unity/external-dependency-manager.git#1.2.183";

public const string PackageNameGGPlayReview = "com.google.play.review";

Expand All @@ -50,40 +50,40 @@ public class ConstantPackage
public const string PackageNameFirebaseApp = "com.google.firebase.app";

public const string MaxVersionFirebaseApp =
"https://github.com/firebase-unity/firebase-app.git#12.2.1";
"https://github.com/firebase-unity/firebase-app.git#12.3.0";

public const string PackageNameFirebaseRemoteConfig = "com.google.firebase.remote-config";

public const string MaxVersionFirebaseRemoteConfig =
"https://github.com/firebase-unity/firebase-remote-config.git#12.2.1";
"https://github.com/firebase-unity/firebase-remote-config.git#12.3.0";

public const string PackageNameFirebaseAnalytics = "com.google.firebase.analytics";

public const string MaxVersionFirebaseAnalytics =
"https://github.com/firebase-unity/firebase-analytics.git#12.2.1";
"https://github.com/firebase-unity/firebase-analytics.git#12.3.0";

public const string PackageNameFirebaseDatabase = "com.google.firebase.database";

public const string MaxVersionFirebaseDatabase =
"https://github.com/firebase-unity/firebase-database.git#12.2.1";
"https://github.com/firebase-unity/firebase-database.git#12.3.0";

public const string PackageNameFirebaseAuth = "com.google.firebase.auth";
public const string MaxVersionFirebaseAuth = "https://github.com/firebase-unity/firebase-auth.git#12.2.1";
public const string MaxVersionFirebaseAuth = "https://github.com/firebase-unity/firebase-auth.git#12.3.0";

public const string PackageNameFirebaseCrashlytics = "com.google.firebase.crashlytics";

public const string MaxVersionFirebaseCrashlytics =
"https://github.com/firebase-unity/firebase-crashlytics.git#12.2.1";
"https://github.com/firebase-unity/firebase-crashlytics.git#12.3.0";

public const string PackageNameFirebaseSupportIos = "com.google.firebase.support-ios";

public const string MaxVersionFirebaseSupportIos =
"https://github.com/firebase-unity/firebase-support-ios.git#12.2.1";
"https://github.com/firebase-unity/firebase-support-ios.git#12.3.0";

#endregion

public const string PackageNameAdjust = "com.pancake.adjust";
public const string MaxVersionAdjust = "https://github.com/pancake-llc/adjust.git#4.38.0";
public const string PackageNameAdjust = "com.adjust.sdk";
public const string MaxVersionAdjust = "https://github.com/adjust/unity_sdk.git?path=Assets/Adjust#v5.0.3";
public const string PackageNamePlayFab = "com.pancake.playfab";

public const string MaxVersionPlayFab =
Expand All @@ -92,7 +92,7 @@ public class ConstantPackage
public const string PackageNameAppFlyer = "appsflyer-unity-plugin";

public const string MaxVersionAppFlyer =
"https://github.com/AppsFlyerSDK/appsflyer-unity-plugin.git#v6.14.3";
"https://github.com/AppsFlyerSDK/appsflyer-unity-plugin.git#v6.15.3";

public const string PackageNameAppFlyerRevenueGeneric =
"appsflyer-unity-adrevenue-generic-connector";
Expand Down
40 changes: 40 additions & 0 deletions Module/PrimeTween/Runtime/Internal/Obsolete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,45 @@ public Sequence SetCycles(int cycles) {
public bool IsAlive => isAlive;
[EditorBrowsable(EditorBrowsableState.Never)] [Obsolete(Messages.obsoleteIsPausedMessage)]
public bool IsPaused => isPaused;

const string chainAndInsertCallbackMessage = "The behavior of ChainCallback() and InsertCallback() methods was fixed in version 1.2.0. " +
"Use their obsolete counterparts only if you need to preserve the old incorrect behaviour in the existing project.\n" +
"More info: https://github.com/KyryloKuzyk/PrimeTween/discussions/112\n\n";
[EditorBrowsable(EditorBrowsableState.Never)] [Obsolete(chainAndInsertCallbackMessage)]
public Sequence ChainCallbackObsolete([NotNull] Action callback, bool warnIfTargetDestroyed = true) {
if (tryManipulate()) {
InsertCallbackObsolete(duration, callback, warnIfTargetDestroyed);
}
return this;
}
[EditorBrowsable(EditorBrowsableState.Never)] [Obsolete(chainAndInsertCallbackMessage)]
public Sequence InsertCallbackObsolete(float atTime, Action callback, bool warnIfTargetDestroyed = true) {
if (!tryManipulate()) {
return this;
}
var delay = PrimeTweenManager.delayWithoutDurationCheck(PrimeTweenManager.dummyTarget, atTime, false);
Assert.IsTrue(delay.HasValue);
delay.Value.tween.OnComplete(callback, warnIfTargetDestroyed);
return Insert(0f, delay.Value);
}
[EditorBrowsable(EditorBrowsableState.Never)] [Obsolete(chainAndInsertCallbackMessage)]
public Sequence ChainCallbackObsolete<T>([NotNull] T target, [NotNull] Action<T> callback, bool warnIfTargetDestroyed = true) where T: class {
if (tryManipulate()) {
InsertCallbackObsolete(duration, target, callback, warnIfTargetDestroyed);
}
return this;
}
[EditorBrowsable(EditorBrowsableState.Never)] [Obsolete(chainAndInsertCallbackMessage)]
public Sequence InsertCallbackObsolete<T>(float atTime, [NotNull] T target, Action<T> callback, bool warnIfTargetDestroyed = true) where T: class {
if (!tryManipulate()) {
return this;
}
var delay = PrimeTweenManager.delayWithoutDurationCheck(target, atTime, false);
if (!delay.HasValue) {
return this;
}
delay.Value.tween.OnComplete(target, callback, warnIfTargetDestroyed);
return Insert(0f, delay.Value);
}
}
}
2 changes: 1 addition & 1 deletion Module/PrimeTween/Runtime/Internal/TweenMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public static Tween MaterialProperty([NotNull] Material target, int propertyId,
tween => (tween.target as Material).GetVector(tween.intParam).ToContainer(), TweenType.MaterialPropertyVector4);
}

// No 'startFromCurrent' overload
// No 'startFromCurrent' overload because euler angles animation should always have the startValue to prevent ambiguous results
public static Tween EulerAngles([NotNull] Transform target, Vector3 startValue, Vector3 endValue, float duration, Ease ease = Ease.Default, int cycles = 1, CycleMode cycleMode = CycleMode.Restart, float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false)
=> EulerAngles(target, new TweenSettings<Vector3>(startValue, endValue, new TweenSettings(duration, ease, cycles, cycleMode, startDelay, endDelay, useUnscaledTime)));
public static Tween EulerAngles([NotNull] Transform target, Vector3 startValue, Vector3 endValue, float duration, Easing ease, int cycles = 1, CycleMode cycleMode = CycleMode.Restart, float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false)
Expand Down
18 changes: 8 additions & 10 deletions Module/PrimeTween/Runtime/Sequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,10 @@ public Sequence InsertCallback(float atTime, Action callback, bool warnIfTargetD
if (!tryManipulate()) {
return this;
}
var maybeDelay = PrimeTweenManager.delayWithoutDurationCheck(PrimeTweenManager.dummyTarget, atTime, false);
Assert.IsTrue(maybeDelay.HasValue);
var delay = maybeDelay.Value;
delay.tween.OnComplete(callback, warnIfTargetDestroyed);
return Insert(0f, delay);
var delay = PrimeTweenManager.delayWithoutDurationCheck(PrimeTweenManager.dummyTarget, 0f, false);
Assert.IsTrue(delay.HasValue);
delay.Value.tween.OnComplete(callback, warnIfTargetDestroyed);
return Insert(atTime, delay.Value);
}

/// <summary>Schedules <see cref="callback"/> after all previously added tweens. Passing 'target' allows to write a non-allocating callback.</summary>
Expand All @@ -248,13 +247,12 @@ public Sequence InsertCallback<T>(float atTime, [NotNull] T target, Action<T> ca
if (!tryManipulate()) {
return this;
}
var maybeDelay = PrimeTweenManager.delayWithoutDurationCheck(target, atTime, false);
if (!maybeDelay.HasValue) {
var delay = PrimeTweenManager.delayWithoutDurationCheck(target, 0f, false);
if (!delay.HasValue) {
return this;
}
var delay = maybeDelay.Value;
delay.tween.OnComplete(target, callback, warnIfTargetDestroyed);
return Insert(0f, delay);
delay.Value.tween.OnComplete(target, callback, warnIfTargetDestroyed);
return Insert(atTime, delay.Value);
}

/// <summary>Schedules delay after all previously added tweens.</summary>
Expand Down
2 changes: 1 addition & 1 deletion Module/PrimeTween/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.22
v1.2.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if VIRTUESKY_ADJUST
using com.adjust.sdk;
using AdjustSdk;
#endif
using UnityEngine;
using VirtueSky.Inspector;
Expand All @@ -8,7 +8,7 @@
namespace VirtueSky.Tracking
{
[EditorIcon("icon_scriptable"), HideMonoScript]
public class AdjustSetting : ScriptableSettings<AdjustSetting>
public class AdjustConfig : ScriptableSettings<AdjustConfig>
{
[SerializeField] private string appToken;
#if VIRTUESKY_ADJUST
Expand Down
18 changes: 9 additions & 9 deletions Module/Tracking/AdjustTracking/AdjustTrackingRevenue.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if VIRTUESKY_ADJUST
using com.adjust.sdk;
using AdjustSdk;
#endif

namespace VirtueSky.Tracking
Expand All @@ -14,22 +14,22 @@ public static void AdjustTrackRevenue(double value, string network, string unitI
switch (adNetwork.ToLower())
{
case "admob":
source = com.adjust.sdk.AdjustConfig.AdjustAdRevenueSourceAdMob;
source = "admob_sdk";
break;
case "max":
source = com.adjust.sdk.AdjustConfig.AdjustAdRevenueSourceAppLovinMAX;
source = "applovin_max_sdk";
break;
case "ironsource":
source = com.adjust.sdk.AdjustConfig.AdjustAdRevenueSourceIronSource;
source = "levelplay_ironsource_sdk";
break;
}

AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(source);
adjustAdRevenue.setRevenue(value, "USD");
adjustAdRevenue.setAdRevenueNetwork(network);
adjustAdRevenue.setAdRevenueUnit(unitId);
adjustAdRevenue.setAdRevenuePlacement(placement);
Adjust.trackAdRevenue(adjustAdRevenue);
adjustAdRevenue.SetRevenue(value, "USD");
adjustAdRevenue.AdRevenueNetwork = network;
adjustAdRevenue.AdRevenueUnit = unitId;
adjustAdRevenue.AdRevenuePlacement = placement;
Adjust.TrackAdRevenue(adjustAdRevenue);
#endif
}
}
Expand Down
2 changes: 1 addition & 1 deletion Module/Tracking/AdjustTracking/ScriptableTrackingAdjust.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ScriptableTrackingAdjust : ScriptableObject
public void TrackEvent()
{
#if VIRTUESKY_ADJUST
com.adjust.sdk.Adjust.trackEvent(new com.adjust.sdk.AdjustEvent(eventToken));
AdjustSdk.Adjust.TrackEvent(new AdjustSdk.AdjustEvent(eventToken));
#endif
}
}
Expand Down
11 changes: 8 additions & 3 deletions Module/Tracking/AppTracking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ public static void TrackEventATTResult(int status)
public static void StartTrackingAdjust()
{
#if VIRTUESKY_ADJUST
var adjust = new UnityEngine.GameObject("Adjust", typeof(com.adjust.sdk.Adjust));
com.adjust.sdk.Adjust.StartTracking(AdjustSetting.AppToken, AdjustSetting.AdjustEnvironment,
AdjustSetting.LogLevel);
var adjust = new UnityEngine.GameObject("Adjust", typeof(AdjustSdk.Adjust));
var adjustConfig = new AdjustSdk.AdjustConfig(AdjustConfig.AppToken, AdjustConfig.AdjustEnvironment, AdjustConfig.LogLevel == AdjustSdk.AdjustLogLevel.Suppress);
adjustConfig.LogLevel = AdjustConfig.LogLevel;
adjustConfig.IsAdServicesEnabled = true;
adjustConfig.IsIdfaReadingEnabled = true;
AdjustSdk.Adjust.InitSdk(adjustConfig);
UnityEngine.Debug.Log($"Start Tracking {adjust.name}");
#endif
}

Expand All @@ -32,6 +36,7 @@ public static void StartTrackingAppsFlyer()
#if VIRTUESKY_APPSFLYER
var appFlyerObject =
new UnityEngine.GameObject("AppsFlyerObject", typeof(VirtueSky.Tracking.AppsFlyerObject));
UnityEngine.Debug.Log($"Start Tracking {appFlyerObject.name}");
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace VirtueSky.Tracking
{
[EditorIcon("icon_scriptable"), HideMonoScript]
public class AppsFlyerSetting : ScriptableSettings<AppsFlyerSetting>
public class AppsFlyerConfig : ScriptableSettings<AppsFlyerConfig>
{
[SerializeField] private string devKey;
[SerializeField] private string appID;
Expand Down
8 changes: 4 additions & 4 deletions Module/Tracking/AppsFlyerTracking/AppsFlyerObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private void Start()
#if VIRTUESKY_APPSFLYER
// These fields are set from the editor so do not modify!
//******************************//
AppsFlyer.setIsDebug(AppsFlyerSetting.IsDebug);
AppsFlyer.setIsDebug(AppsFlyerConfig.IsDebug);
#if UNITY_WSA_10_0 && !UNITY_EDITOR
AppsFlyer.initSDK(AppsFlyerSetting.DevKey, AppsFlyerSetting.UWPAppID,
AppsFlyerSetting.GetConversionData ? this : null);
Expand All @@ -30,8 +30,8 @@ private void Start()
AppsFlyerSetting.GetConversionData ? this : null);
#else

AppsFlyer.initSDK(AppsFlyerSetting.DevKey, AppsFlyerSetting.AppID,
AppsFlyerSetting.GetConversionData ? this : null);
AppsFlyer.initSDK(AppsFlyerConfig.DevKey, AppsFlyerConfig.AppID,
AppsFlyerConfig.GetConversionData ? this : null);
#endif
//******************************/

Expand All @@ -40,7 +40,7 @@ private void Start()
AppsFlyerAdRevenue.start();

// Set to true to view debug logs. (development only!)
AppsFlyerAdRevenue.setIsDebug(AppsFlyerSetting.IsDebugAdRevenue);
AppsFlyerAdRevenue.setIsDebug(AppsFlyerConfig.IsDebugAdRevenue);
#endif
}
}
Expand Down
Loading

0 comments on commit dc539b3

Please sign in to comment.