Skip to content

Commit ab93de6

Browse files
authored
Merge pull request #59 from VirtueSky/dev
Dev
2 parents eb6e199 + 8ef5009 commit ab93de6

File tree

68 files changed

+853
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+853
-426
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
### 1: Download the repository and drop it into folder `Assets`
2424
### 2: Add the line below to `Packages/manifest.json`
2525

26-
for version `3.3.6`
26+
for version `3.3.7`
2727
```json
28-
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.3.6",
28+
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.3.7",
2929
```
3030

3131
## Includes modules

VirtueSky/ATT_IOS/Editor/PostBuildStep.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ public static void OnPostProcessBuild(BuildTarget buildTarget, string pathToXcod
2727

2828
// Save changes to the plist:
2929
File.WriteAllText(plistPath, plistObj.WriteToString());
30+
31+
// --- Copy GoogleService-Info.split if exist ---
32+
string sourceSplitPath = Path.Combine("Assets", "GoogleService-Info.split");
33+
string destSplitPath = Path.Combine(pathToXcode, "GoogleService-Info.split");
34+
if (File.Exists(sourceSplitPath))
35+
{
36+
File.Copy(sourceSplitPath, destSplitPath, true);
37+
UnityEngine.Debug.Log("[PostBuildStep] Copied GoogleService-Info.split to Xcode build folder.");
38+
}
39+
else
40+
{
41+
UnityEngine.Debug.LogWarning("[PostBuildStep] GoogleService-Info.split not found in Assets.");
42+
}
3043
}
3144
}
3245

VirtueSky/ControlPanel/ConstantPackage.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class ConstantPackage
44
{
5-
public const string VersionSunflower = "3.3.6";
5+
public const string VersionSunflower = "3.3.7";
66
public const string PackageNameInAppPurchase = "com.unity.purchasing";
77
public const string MaxVersionInAppPurchase = "4.12.2";
88
public const string PackageNameNewtonsoftJson = "com.unity.nuget.newtonsoft-json";
@@ -20,7 +20,7 @@ public class ConstantPackage
2020
public const string PackageNameAdmob = "com.google.ads.mobile";
2121

2222
public const string VersionAdmob =
23-
"https://github.com/googleads/googleads-mobile-unity.git?path=packages/com.google.ads.mobile#v10.1.0";
23+
"https://github.com/googleads/googleads-mobile-unity.git?path=packages/com.google.ads.mobile#v10.2.0";
2424

2525
#region Google Unity
2626

@@ -96,7 +96,7 @@ public class ConstantPackage
9696
public const string PackageNameCoffeeUIEffect = "com.coffee.ui-effect";
9797

9898
public const string MaxVersionCoffeeUIEffect =
99-
"https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.8.6";
99+
"https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.9.2";
100100

101101
public const string PackageNameCoffeeUIParticle = "com.coffee.ui-particle";
102102

@@ -105,7 +105,7 @@ public class ConstantPackage
105105

106106
public const string PackageNameAppleSignIn = "com.lupidan.apple-signin-unity";
107107

108-
public const string MaxVersionAppleSignIn = "https://github.com/lupidan/apple-signin-unity.git#v1.4.4";
108+
public const string MaxVersionAppleSignIn = "https://github.com/lupidan/apple-signin-unity.git#v1.5.0";
109109

110110
#region Spine
111111

VirtueSky/PrimeTween/Editor/AssemblyInfo.cs.meta

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VirtueSky/PrimeTween/Editor/CodeGenerator.asset

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,17 @@ MonoBehaviour:
946946
dependency: 9
947947
placeInGlobalScope: 0
948948
generateOnlyOverloads: 0
949+
- description: Color_VisualElement
950+
methodName: Color
951+
targetType: UnityEngine.UIElements.VisualElement
952+
propertyType: 2
953+
propertyName:
954+
propertyGetter: style.color.value
955+
propertySetter: style.color = val
956+
dotweenMethodName:
957+
dependency: 9
958+
placeInGlobalScope: 0
959+
generateOnlyOverloads: 0
949960
- description: VisualElementBackgroundColor_VisualElement
950961
methodName: VisualElementBackgroundColor
951962
targetType: UnityEngine.UIElements.VisualElement
@@ -957,6 +968,28 @@ MonoBehaviour:
957968
dependency: 9
958969
placeInGlobalScope: 0
959970
generateOnlyOverloads: 0
971+
- description: VisualElementOpacity_VisualElement
972+
methodName: VisualElementOpacity
973+
targetType: UnityEngine.UIElements.VisualElement
974+
propertyType: 1
975+
propertyName:
976+
propertyGetter: style.opacity.value
977+
propertySetter: style.opacity = val
978+
dotweenMethodName:
979+
dependency: 9
980+
placeInGlobalScope: 0
981+
generateOnlyOverloads: 0
982+
- description: Alpha_VisualElement
983+
methodName: Alpha
984+
targetType: UnityEngine.UIElements.VisualElement
985+
propertyType: 1
986+
propertyName:
987+
propertyGetter: style.opacity.value
988+
propertySetter: style.opacity = val
989+
dotweenMethodName:
990+
dependency: 9
991+
placeInGlobalScope: 0
992+
generateOnlyOverloads: 0
960993
- description: OffsetMin_RectTransform
961994
methodName: OffsetMin
962995
targetType: UnityEngine.RectTransform
@@ -1034,6 +1067,17 @@ MonoBehaviour:
10341067
dependency: 10
10351068
placeInGlobalScope: 0
10361069
generateOnlyOverloads: 1
1070+
- description: FontSize_TMP_Text
1071+
methodName: TextFontSize
1072+
targetType: TMPro.TMP_Text
1073+
propertyType: 1
1074+
propertyName: fontSize
1075+
propertyGetter:
1076+
propertySetter:
1077+
dotweenMethodName:
1078+
dependency: 10
1079+
placeInGlobalScope: 0
1080+
generateOnlyOverloads: 0
10371081
additiveMethodsGenerator:
10381082
additiveMethods:
10391083
- methodName: PositionAdditive

VirtueSky/PrimeTween/Editor/CodeGenerator.asset.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VirtueSky/PrimeTween/Editor/CodeGenerator.cs

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,14 @@ void generateMethods() {
248248
{ // generate enums
249249
foreach (var group in methodsData.GroupBy(_ => _.dependency)) {
250250
foreach (var data in group) {
251-
text += " ";
252-
var enumName = GetTweenTypeEnumName(data);
251+
string enumName = GetTweenTypeEnumName(data);
252+
if (methodDataToEnumName.Values.Contains(enumName)) {
253+
// skip duplicates like VisualElementColor_VisualElement / Color_VisualElement and VisualElementOpacity_VisualElement / Alpha_VisualElement
254+
Debug.Log($"skip duplicate {enumName}");
255+
continue;
256+
}
253257
methodDataToEnumName.Add(data, enumName);
258+
text += " ";
254259
text += enumName;
255260
text += ",\n";
256261
}
@@ -281,7 +286,10 @@ internal static (PropType, Type) TweenTypeToTweenData(TweenType tweenType) {
281286
}
282287
}
283288
foreach (var data in group) {
284-
utilsText += $" case TweenType.{methodDataToEnumName[data]}:\n";
289+
if (!methodDataToEnumName.TryGetValue(data, out string enumName)) {
290+
continue;
291+
}
292+
utilsText += $" case TweenType.{enumName}:\n";
285293
utilsText += $" return (PropType.{data.propertyType}, typeof({getTypeByName(data.targetType).FullName}));\n";
286294
}
287295
if (shouldWrapInDefine(dependency)) {
@@ -348,14 +356,20 @@ internal static (PropType, Type) TweenTypeToTweenData(TweenType tweenType) {
348356
static string GetTweenTypeEnumName(MethodGenerationData data) {
349357
string result = "";
350358
var dependency = data.dependency;
359+
if (dependency == Dependency.UI_ELEMENTS_MODULE_INSTALLED) {
360+
if (data.methodName == "Alpha") {
361+
return "VisualElementOpacity";
362+
}
363+
}
364+
351365
if (dependency != Dependency.None) {
352366
result += getMethodPrefix(dependency);
353367
}
354368
if (dependency == Dependency.UI_ELEMENTS_MODULE_INSTALLED && !data.methodName.Contains("VisualElement")) {
355369
result += "VisualElement";
356370
}
357371
result += data.methodName;
358-
if ((data.methodName == "Alpha" || data.methodName == "Color") && data.dependency == Dependency.UNITY_UGUI_INSTALLED) {
372+
if ((data.methodName == "Alpha" || data.methodName == "Color") && dependency == Dependency.UNITY_UGUI_INSTALLED) {
359373
result += getTypeByName(data.targetType).Name;
360374
} else if (data.methodName == "Scale" && data.propertyType == PropType.Float) {
361375
result += "Uniform";
@@ -542,15 +556,15 @@ public static Tween Custom_TEMPLATE(TweenSettings<float> settings, [NotNull] Act
542556
var tween = PrimeTweenManager.fetchTween();
543557
tween.startValue.CopyFrom(ref settings.startValue);
544558
tween.endValue.CopyFrom(ref settings.endValue);
545-
tween.setPropType(PropType.Float);
546559
tween.customOnValueChange = onValueChange;
547560
tween.Setup(PrimeTweenManager.dummyTarget, ref settings.settings, _tween => {
548561
var _onValueChange = _tween.customOnValueChange as Action<Single>;
549562
var val = _tween.FloatVal;
550563
try {
551564
_onValueChange(val);
552565
} catch (Exception e) {
553-
Assert.LogError($""Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}, exception:\n{e}\n"", _tween.id, _tween.target as UnityEngine.Object);
566+
UnityEngine.Debug.LogException(e);
567+
Assert.LogWarning($""Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}\n"", _tween.id, _tween.target as UnityEngine.Object);
554568
_tween.EmergencyStop();
555569
}
556570
}, null, false, TweenType.CustomFloat);
@@ -576,7 +590,6 @@ static Tween Custom_internal<T>([NotNull] T target, TweenSettings<float> setting
576590
var tween = PrimeTweenManager.fetchTween();
577591
tween.startValue.CopyFrom(ref settings.startValue);
578592
tween.endValue.CopyFrom(ref settings.endValue);
579-
tween.setPropType(PropType.Float);
580593
tween.customOnValueChange = onValueChange;
581594
tween.isAdditive = isAdditive;
582595
tween.Setup(target, ref settings.settings, _tween => {
@@ -593,7 +606,8 @@ static Tween Custom_internal<T>([NotNull] T target, TweenSettings<float> setting
593606
try {
594607
_onValueChange(_target, val);
595608
} catch (Exception e) {
596-
Assert.LogError($""Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}, exception:\n{e}\n"", _tween.id, _tween.target as UnityEngine.Object);
609+
UnityEngine.Debug.LogException(e, _target as UnityEngine.Object);
610+
Assert.LogWarning($""Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}\n"", _tween.id, _tween.target as UnityEngine.Object);
597611
_tween.EmergencyStop();
598612
}
599613
}, null, false, TweenType.CustomFloat);
@@ -603,7 +617,6 @@ static Tween animate(object target, ref TweenSettings<float> settings, [NotNull]
603617
var tween = PrimeTweenManager.fetchTween();
604618
tween.startValue.CopyFrom(ref settings.startValue);
605619
tween.endValue.CopyFrom(ref settings.endValue);
606-
tween.setPropType(PropType.Float);
607620
tween.Setup(target, ref settings.settings, setter, getter, settings.startFromCurrent, _tweenType);
608621
return PrimeTweenManager.Animate(tween);
609622
}
@@ -612,7 +625,6 @@ static Tween animateWithIntParam([NotNull] object target, int intParam, ref Twee
612625
tween.intParam = intParam;
613626
tween.startValue.CopyFrom(ref settings.startValue);
614627
tween.endValue.CopyFrom(ref settings.endValue);
615-
tween.setPropType(PropType.Float);
616628
tween.Setup(target, ref settings.settings, setter, getter, settings.startFromCurrent, _tweenType);
617629
return PrimeTweenManager.Animate(tween);
618630
}";

VirtueSky/PrimeTween/Editor/CodeGenerator.cs.meta

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VirtueSky/PrimeTween/Editor/CodeTemplates.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public static Tween Custom_TEMPLATE(TweenSettings<float> settings, [NotNull] Act
7070
try {
7171
_onValueChange(val);
7272
} catch (Exception e) {
73-
Assert.LogError($"Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}, exception:\n{e}\n", _tween.id, _tween.target as UnityEngine.Object);
73+
UnityEngine.Debug.LogException(e);
74+
Assert.LogWarning($"Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}\n", _tween.id, _tween.target as UnityEngine.Object);
7475
_tween.EmergencyStop();
7576
}
7677
}, null, false, TweenType.CustomFloat);
@@ -113,7 +114,8 @@ static Tween Custom_internal<T>([NotNull] T target, TweenSettings<float> setting
113114
try {
114115
_onValueChange(_target, val);
115116
} catch (Exception e) {
116-
Assert.LogError($"Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}, exception:\n{e}\n", _tween.id, _tween.target as UnityEngine.Object);
117+
UnityEngine.Debug.LogException(e, _target as UnityEngine.Object);
118+
Assert.LogWarning($"Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}\n", _tween.id, _tween.target as UnityEngine.Object);
117119
_tween.EmergencyStop();
118120
}
119121
}, null, false, TweenType.CustomFloat);

VirtueSky/PrimeTween/Editor/CodeTemplates.cs.meta

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)