Skip to content

Commit dcd8f14

Browse files
committed
fix sign msg and fmt
1 parent 972b620 commit dcd8f14

File tree

30 files changed

+39147
-29959
lines changed

30 files changed

+39147
-29959
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,6 @@ dotnet_diagnostic.JSON002.severity = silent
164164

165165
# CS8981: The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
166166
dotnet_diagnostic.CS8981.severity = suggestion
167+
168+
# IDE0055: Fix formatting
169+
dotnet_diagnostic.IDE0055.severity = silent
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
package="com.thirdweb.unity"
5-
xmlns:tools="http://schemas.android.com/tools">
6-
7-
<application>
8-
<activity android:name="com.unity3d.player.UnityPlayerActivity"
9-
android:theme="@style/UnityThemeSelector">
10-
<intent-filter>
11-
<action android:name="android.intent.action.MAIN" />
12-
<category android:name="android.intent.category.LAUNCHER" />
13-
</intent-filter>
14-
15-
<intent-filter>
16-
<action android:name="android.intent.action.VIEW" />
17-
<category android:name="android.intent.category.DEFAULT" />
18-
<category android:name="android.intent.category.BROWSABLE" />
19-
<!-- Set your bundle id here -->
20-
<!-- Replace 'com.thirdweb.unitysdk' with your desired scheme -->
21-
<data android:scheme="com.thirdweb.unitysdk" />
22-
</intent-filter>
23-
24-
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
25-
</activity>
26-
</application>
27-
</manifest>
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
package="com.thirdweb.unity"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
>
7+
<application>
8+
<activity
9+
android:name="com.unity3d.player.UnityPlayerActivity"
10+
android:theme="@style/UnityThemeSelector"
11+
>
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
14+
<category android:name="android.intent.category.LAUNCHER" />
15+
</intent-filter>
16+
<intent-filter>
17+
<action android:name="android.intent.action.VIEW" />
18+
<category android:name="android.intent.category.DEFAULT" />
19+
<category android:name="android.intent.category.BROWSABLE" />
20+
<!-- Set your bundle id here -->
21+
<!-- Replace 'com.thirdweb.unitysdk' with your desired scheme -->
22+
<data android:scheme="com.thirdweb.unitysdk" />
23+
</intent-filter>
24+
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
25+
</activity>
26+
</application>
27+
</manifest>

Assets/Thirdweb/Editor/Postprocessor.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ public class Postprocessor
2424
[PostProcessBuild(1)]
2525
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
2626
{
27-
if (target != BuildTarget.WebGL) return;
28-
if (!supportedPostprocessor) return;
29-
if (!IsEnable) return;
27+
if (target != BuildTarget.WebGL)
28+
return;
29+
if (!supportedPostprocessor)
30+
return;
31+
if (!IsEnable)
32+
return;
3033

3134
var path = Path.Combine(pathToBuiltProject, "index.html");
32-
if (!File.Exists(path)) return;
35+
if (!File.Exists(path))
36+
return;
3337

3438
var html = File.ReadAllText(path);
3539

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<dependencies>
2-
<androidPackages>
3-
<androidPackage spec="androidx.browser:browser:1.4.0" />
4-
</androidPackages>
5-
</dependencies>
2+
<androidPackages>
3+
<androidPackage spec="androidx.browser:browser:1.4.0" />
4+
</androidPackages>
5+
</dependencies>

Assets/Thirdweb/Plugins/ThreadingPatcher/Editor/WebGLThreadingPatcher.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using Mono.Cecil;
2-
using Mono.Cecil.Cil;
31
using System.IO;
42
using System.Linq;
3+
using Mono.Cecil;
4+
using Mono.Cecil.Cil;
55
using UnityEditor;
66
using UnityEditor.Build;
77
using UnityEditor.Build.Reporting;
@@ -805,7 +805,7 @@ private static TypeDefinition AddMonoPInvokeCallbackAttribute(ModuleDefinition m
805805
{
806806
var type = new TypeDefinition("AOT", "MonoPInvokeCallbackAttribute", TypeAttributes.AnsiClass | TypeAttributes.AutoClass | TypeAttributes.BeforeFieldInit | TypeAttributes.Public)
807807
{
808-
BaseType = moduleDefinition.ImportReference(moduleDefinition.Types.First(t => t.FullName == "System.Attribute"))
808+
BaseType = moduleDefinition.ImportReference(moduleDefinition.Types.First(t => t.FullName == "System.Attribute")),
809809
};
810810
var ctor = new MethodDefinition(
811811
".ctor",

Assets/Thirdweb/Plugins/ThreadingPatcher/Runtime/TimerRunner.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ private void Awake()
3030
var scheduler = timer.GetNestedType("Scheduler", BindingFlags.NonPublic);
3131

3232
var timerSchedulerInstance = scheduler.GetProperty("Instance").GetValue(null);
33-
_timerSchedulerLoop = (Func<int>)scheduler.GetMethod("RunSchedulerLoop", BindingFlags.Instance | BindingFlags.NonPublic)
34-
.CreateDelegate(typeof(Func<int>), timerSchedulerInstance);
33+
_timerSchedulerLoop = (Func<int>)scheduler.GetMethod("RunSchedulerLoop", BindingFlags.Instance | BindingFlags.NonPublic).CreateDelegate(typeof(Func<int>), timerSchedulerInstance);
3534
}
3635

3736
[Preserve]
@@ -59,4 +58,4 @@ private IEnumerator TimerUpdateCoroutine()
5958
#pragma warning restore CS0162 // Unreachable code detected
6059
}
6160
}
62-
}
61+
}

Assets/Thirdweb/Plugins/WebGLInputCopy/WebGLInput/Detail/RebuildChecker.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class RebuildChecker
1212
int beforeCaretPosition;
1313
int beforeSelectionFocusPosition;
1414
int beforeSelectionAnchorPosition;
15+
1516
//Vector2 anchoredPosition;
1617

1718
public RebuildChecker(IInputField input)
@@ -26,28 +27,32 @@ public bool NeedRebuild(bool debug = false)
2627
// any not same
2728
if (beforeString != input.text)
2829
{
29-
if(debug) Debug.Log(string.Format("beforeString : {0} != {1}", beforeString, input.text));
30+
if (debug)
31+
Debug.Log(string.Format("beforeString : {0} != {1}", beforeString, input.text));
3032
beforeString = input.text;
3133
res = true;
3234
}
3335

3436
if (beforeCaretPosition != input.caretPosition)
3537
{
36-
if (debug) Debug.Log(string.Format("beforeCaretPosition : {0} != {1}", beforeCaretPosition, input.caretPosition));
38+
if (debug)
39+
Debug.Log(string.Format("beforeCaretPosition : {0} != {1}", beforeCaretPosition, input.caretPosition));
3740
beforeCaretPosition = input.caretPosition;
3841
res = true;
3942
}
4043

4144
if (beforeSelectionFocusPosition != input.selectionFocusPosition)
4245
{
43-
if (debug) Debug.Log(string.Format("beforeSelectionFocusPosition : {0} != {1}", beforeSelectionFocusPosition, input.selectionFocusPosition));
46+
if (debug)
47+
Debug.Log(string.Format("beforeSelectionFocusPosition : {0} != {1}", beforeSelectionFocusPosition, input.selectionFocusPosition));
4448
beforeSelectionFocusPosition = input.selectionFocusPosition;
4549
res = true;
4650
}
4751

4852
if (beforeSelectionAnchorPosition != input.selectionAnchorPosition)
4953
{
50-
if (debug) Debug.Log(string.Format("beforeSelectionAnchorPosition : {0} != {1}", beforeSelectionAnchorPosition, input.selectionAnchorPosition));
54+
if (debug)
55+
Debug.Log(string.Format("beforeSelectionAnchorPosition : {0} != {1}", beforeSelectionAnchorPosition, input.selectionAnchorPosition));
5156
beforeSelectionAnchorPosition = input.selectionAnchorPosition;
5257
res = true;
5358
}

Assets/Thirdweb/Plugins/WebGLInputCopy/WebGLInput/Detail/Support.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public static Rect GetScreenCoordinates(RectTransform uiElement)
2020
if (canvas && useCamera)
2121
{
2222
var camera = canvas.worldCamera;
23-
if (!camera) camera = Camera.main;
23+
if (!camera)
24+
camera = Camera.main;
2425

2526
for (var i = 0; i < worldCorners.Length; i++)
2627
{
@@ -40,6 +41,5 @@ public static Rect GetScreenCoordinates(RectTransform uiElement)
4041

4142
return new Rect(min.x, min.y, max.x - min.x, max.y - min.y);
4243
}
43-
4444
}
45-
}
45+
}

Assets/Thirdweb/Plugins/WebGLInputCopy/WebGLInput/Events/KeyboardEvent.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
namespace WebGLSupport
22
{
33
public delegate void KeyboardEventHandler(WebGLInput input, KeyboardEvent keyboardEvent);
4+
45
public sealed class KeyboardEvent
56
{
67
public string Key { get; }
78
public int Code { get; }
89
public bool ShiftKey { get; }
910
public bool CtrlKey { get; }
1011
public bool AltKey { get; }
12+
1113
public KeyboardEvent(string key, int code, bool shiftKey, bool ctrlKey, bool altKey)
1214
{
1315
Key = key;

Assets/Thirdweb/Plugins/WebGLInputCopy/WebGLInput/Mobile/WebGLInputMobile.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System.Collections;
1+
using System;
2+
using System.Collections;
23
using System.Collections.Generic;
3-
using UnityEngine;
4-
using UnityEngine.EventSystems;
54
using System.Runtime.InteropServices; // for DllImport
65
using AOT;
7-
using System;
6+
using UnityEngine;
7+
using UnityEngine.EventSystems;
88

99
namespace WebGLSupport
1010
{
@@ -21,7 +21,10 @@ class WebGLInputMobilePlugin
2121
/// ID を割り振り
2222
/// </summary>
2323
/// <returns></returns>
24-
public static int WebGLInputMobileRegister(Action<int> OnTouchEnd) { return 0; }
24+
public static int WebGLInputMobileRegister(Action<int> OnTouchEnd)
25+
{
26+
return 0;
27+
}
2528

2629
public static void WebGLInputMobileOnFocusOut(int id, Action<int> OnFocusOut) { }
2730
#endif
@@ -47,7 +50,8 @@ private void Awake()
4750
/// <param name="eventData"></param>
4851
public void OnPointerDown(PointerEventData eventData)
4952
{
50-
if (id != -1) return;
53+
if (id != -1)
54+
return;
5155
id = WebGLInputMobilePlugin.WebGLInputMobileRegister(OnTouchEnd);
5256
instances[id] = this;
5357
}
@@ -62,7 +66,7 @@ static void OnTouchEnd(int id)
6266

6367
static IEnumerator RegisterOnFocusOut(int id)
6468
{
65-
yield return null; // wait one frame.
69+
yield return null; // wait one frame.
6670
WebGLInputMobilePlugin.WebGLInputMobileOnFocusOut(id, OnFocusOut);
6771
}
6872

@@ -75,7 +79,7 @@ static void OnFocusOut(int id)
7579

7680
static IEnumerator ExecFocusOut(int id)
7781
{
78-
yield return null; // wait one frame.
82+
yield return null; // wait one frame.
7983
var @this = instances[id];
8084
@this.GetComponent<WebGLInput>().DeactivateInputField();
8185
// release
@@ -84,4 +88,3 @@ static IEnumerator ExecFocusOut(int id)
8488
}
8589
}
8690
}
87-

0 commit comments

Comments
 (0)