com.wallstop-studios.unity-helpers 2.0.0-rc74.8 → 2.0.0-rc74.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -403,16 +403,15 @@
|
|
|
403
403
|
&& srcY >= origMinY
|
|
404
404
|
&& srcY <= origMaxY;
|
|
405
405
|
|
|
406
|
-
if (
|
|
406
|
+
if (
|
|
407
|
+
insideOriginal
|
|
408
|
+
&& 0 <= srcX
|
|
409
|
+
&& srcX < width
|
|
410
|
+
&& 0 <= srcY
|
|
411
|
+
&& srcY < height
|
|
412
|
+
)
|
|
407
413
|
{
|
|
408
|
-
|
|
409
|
-
{
|
|
410
|
-
croppedPixels[destRow + x] = pixels[srcY * width + srcX];
|
|
411
|
-
}
|
|
412
|
-
else
|
|
413
|
-
{
|
|
414
|
-
croppedPixels[destRow + x] = Color.clear;
|
|
415
|
-
}
|
|
414
|
+
croppedPixels[destRow + x] = pixels[srcY * width + srcX];
|
|
416
415
|
}
|
|
417
416
|
else
|
|
418
417
|
{
|
|
@@ -16,6 +16,22 @@
|
|
|
16
16
|
|
|
17
17
|
public static class SceneHelper
|
|
18
18
|
{
|
|
19
|
+
public static bool IsSceneLoaded(string sceneNameOrPath)
|
|
20
|
+
{
|
|
21
|
+
for (int i = 0; i < SceneManager.sceneCount; ++i)
|
|
22
|
+
{
|
|
23
|
+
Scene scene = SceneManager.GetSceneAt(i);
|
|
24
|
+
if (
|
|
25
|
+
string.Equals(scene.name, sceneNameOrPath, StringComparison.Ordinal)
|
|
26
|
+
|| string.Equals(scene.path, sceneNameOrPath, StringComparison.Ordinal)
|
|
27
|
+
)
|
|
28
|
+
{
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
19
35
|
public static string[] GetAllScenePaths(string[] searchFolders = null)
|
|
20
36
|
{
|
|
21
37
|
#if UNITY_EDITOR
|
|
@@ -68,11 +84,10 @@
|
|
|
68
84
|
async () =>
|
|
69
85
|
{
|
|
70
86
|
TaskCompletionSource<bool> disposalComplete = new();
|
|
71
|
-
UnityMainThreadDispatcher.Instance.RunOnMainThread(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.WithContinuation(() => disposalComplete.SetResult(true))
|
|
87
|
+
UnityMainThreadDispatcher.Instance.RunOnMainThread(() =>
|
|
88
|
+
_ = sceneScope
|
|
89
|
+
.DisposeAsync()
|
|
90
|
+
.WithContinuation(() => disposalComplete.SetResult(true))
|
|
76
91
|
);
|
|
77
92
|
|
|
78
93
|
await disposalComplete.Task;
|
package/package.json
CHANGED