Skip to content

Commit

Permalink
Merge pull request #26 from VirtueSky/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VirtueSky authored Oct 4, 2024
2 parents 8f009cb + 6290a40 commit b58f184
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 50 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
### 1: Download the repo and drop it into folder `Assets`
### 2: Add the line below to `Packages/manifest.json`

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

## Includes modules
Expand Down
24 changes: 12 additions & 12 deletions VirtueSky/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 VersionSunflower = "3.0.7";
public const string VersionSunflower = "3.0.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 VirtueSky/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 VirtueSky/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 VirtueSky/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 VirtueSky/PrimeTween/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.22
v1.2.0
2 changes: 1 addition & 1 deletion VirtueSky/Tracking/Runtime/AdjustTracking/AdjustSetting.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
using UnityEngine;
using VirtueSky.Inspector;
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class TrackingAdjust : 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
21 changes: 11 additions & 10 deletions VirtueSky/Tracking/Runtime/AppTracking.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#if VIRTUESKY_FIREBASE_ANALYTIC
using Firebase.Analytics;
#endif


namespace VirtueSky.Tracking
namespace VirtueSky.Tracking
{
public struct AppTracking
{
Expand All @@ -19,16 +14,21 @@ public static void TrackRevenue(double value, string network, string unitId, str
public static void FirebaseAnalyticTrackATTResult(int status)
{
#if VIRTUESKY_FIREBASE_ANALYTIC
FirebaseAnalytics.LogEvent("app_tracking_transparency", "status", status);
Firebase.Analytics.FirebaseAnalytics.LogEvent("app_tracking_transparency", "status", status);
#endif
}

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(AdjustSetting.AppToken, AdjustSetting.AdjustEnvironment, AdjustSetting.LogLevel == AdjustSdk.AdjustLogLevel.Suppress);
adjustConfig.LogLevel = AdjustSetting.LogLevel;
adjustConfig.IsAdServicesEnabled = true;
adjustConfig.IsIdfaReadingEnabled = true;
AdjustSdk.Adjust.InitSdk(adjustConfig);
UnityEngine.Debug.Log($"Start Tracking {adjust.name}");
#endif
}

Expand All @@ -37,6 +37,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 @@ -3,12 +3,12 @@
"rootNamespace": "",
"references": [
"VirtueSky.Sunflower.Inspector",
"Pancake.Adjust",
"AppsFlyer",
"AppsFlyerAdRevenue",
"UnityEngine.Purchasing",
"Virtuesky.Sunflower.Misc",
"Virtuesky.Sunflower.Utils"
"Virtuesky.Sunflower.Utils",
"AdjustSdk.Scripts"
],
"includePlatforms": [],
"excludePlatforms": [],
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": "3.0.7",
"version": "3.0.8",
"unity": "2022.3",
"category": "virtuesky",
"license": "MIT",
Expand Down

0 comments on commit b58f184

Please sign in to comment.