akaaafk commited on
Commit
efddf39
·
verified ·
1 Parent(s): 66f2d7e

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.psdimporter@4.0.2/Editor/PSDImportPostProcessor.cs +85 -0
  2. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.psdimporter@4.0.2/Editor/PSDImporterEditor.cs +1126 -0
  3. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.psdimporter@4.0.2/Editor/PSDImporterEditor.cs.meta +11 -0
  4. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/Shaders/Sprites-Inspector.shader +83 -0
  5. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Textures/Sprite Shape Corner.png.meta +130 -0
  6. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Textures/Sprite Shape Fill.png.meta +130 -0
  7. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet.meta +8 -0
  8. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Dict.cs +107 -0
  9. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Dict.cs.meta +11 -0
  10. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Geom.cs +301 -0
  11. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Geom.cs.meta +11 -0
  12. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/LICENSE.txt +25 -0
  13. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/ArraySlice.cs +165 -0
  14. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/ArraySlice.cs.meta +11 -0
  15. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/Tessellator.cs +1117 -0
  16. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/Tessellator.cs.meta +11 -0
  17. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/Colliders.unity.meta +7 -0
  18. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/ConformingSplineScene.unity +528 -0
  19. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/ConformingSplineScene.unity.meta +7 -0
  20. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimpleDrawScene.unity +326 -0
  21. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimpleDrawScene.unity.meta +7 -0
  22. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimplifiedSpriteShape.unity +382 -0
  23. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimplifiedSpriteShape.unity.meta +7 -0
  24. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SprinklePrefabs.unity +373 -0
  25. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SprinklePrefabs.unity.meta +7 -0
  26. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Clipper.cs +0 -0
  27. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Clipper.cs.meta +11 -0
  28. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/ConformingSpline.cs +58 -0
  29. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/ConformingSpline.cs.meta +11 -0
  30. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GenerateSpriteShapes.cs +43 -0
  31. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GenerateSpriteShapes.cs.meta +11 -0
  32. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GeometryCollider.cs +171 -0
  33. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GeometryCollider.cs.meta +11 -0
  34. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/LegacyCollider.cs +159 -0
  35. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/LegacyCollider.cs.meta +11 -0
  36. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/SimpleDraw.cs +59 -0
  37. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/SimpleDraw.cs.meta +11 -0
  38. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Sprinkler.cs +53 -0
  39. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Sprinkler.cs.meta +11 -0
  40. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Branch.asset +48 -0
  41. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Branch.asset.meta +8 -0
  42. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Castle Wall.asset +64 -0
  43. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Castle Wall.asset.meta +10 -0
  44. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple1.asset +48 -0
  45. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple1.asset.meta +8 -0
  46. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple2.asset +49 -0
  47. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple2.asset.meta +8 -0
  48. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple3.asset +48 -0
  49. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple3.asset.meta +8 -0
  50. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Tree A.asset +43 -0
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.psdimporter@4.0.2/Editor/PSDImportPostProcessor.cs ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections.Generic;
2
+ using System.Linq;
3
+ using UnityEditor.U2D;
4
+ using UnityEditor.U2D.Sprites;
5
+ using UnityEngine;
6
+
7
+ namespace UnityEditor.U2D.PSD
8
+ {
9
+ internal class PSDImportPostProcessor : AssetPostprocessor
10
+ {
11
+ private static string s_CurrentApplyAssetPath = null;
12
+
13
+ void OnPostprocessSprites(Texture2D texture, Sprite[] sprites)
14
+ {
15
+ var dataProviderFactories = new SpriteDataProviderFactories();
16
+ dataProviderFactories.Init();
17
+ PSDImporter psd = AssetImporter.GetAtPath(assetPath) as PSDImporter;
18
+ if (psd == null)
19
+ return;
20
+ ISpriteEditorDataProvider importer = dataProviderFactories.GetSpriteEditorDataProviderFromObject(psd);
21
+ if (importer != null)
22
+ {
23
+ importer.InitSpriteEditorDataProvider();
24
+ var physicsOutlineDataProvider = importer.GetDataProvider<ISpritePhysicsOutlineDataProvider>();
25
+ var textureDataProvider = importer.GetDataProvider<ITextureDataProvider>();
26
+ int actualWidth = 0, actualHeight = 0;
27
+ textureDataProvider.GetTextureActualWidthAndHeight(out actualWidth, out actualHeight);
28
+ float definitionScaleW = (float)texture.width / actualWidth;
29
+ float definitionScaleH = (float)texture.height / actualHeight;
30
+ float definitionScale = Mathf.Min(definitionScaleW, definitionScaleH);
31
+ foreach (var sprite in sprites)
32
+ {
33
+ var guid = sprite.GetSpriteID();
34
+ var outline = physicsOutlineDataProvider.GetOutlines(guid);
35
+ var outlineOffset = sprite.rect.size / 2;
36
+ if (outline != null && outline.Count > 0)
37
+ {
38
+ // Ensure that outlines are all valid.
39
+ int validOutlineCount = 0;
40
+ for (int i = 0; i < outline.Count; ++i)
41
+ validOutlineCount = validOutlineCount + ( (outline[i].Length > 2) ? 1 : 0 );
42
+
43
+ int index = 0;
44
+ var convertedOutline = new Vector2[validOutlineCount][];
45
+ for (int i = 0; i < outline.Count; ++i)
46
+ {
47
+ if (outline[i].Length > 2)
48
+ {
49
+ convertedOutline[index] = new Vector2[outline[i].Length];
50
+ for (int j = 0; j < outline[i].Length; ++j)
51
+ {
52
+ convertedOutline[index][j] = outline[i][j] * definitionScale + outlineOffset;
53
+ }
54
+ index++;
55
+ }
56
+ }
57
+ sprite.OverridePhysicsShape(convertedOutline);
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ public static string currentApplyAssetPath
64
+ {
65
+ set { s_CurrentApplyAssetPath = value; }
66
+ }
67
+ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
68
+ {
69
+ if (!string.IsNullOrEmpty(s_CurrentApplyAssetPath))
70
+ {
71
+ foreach (var asset in importedAssets)
72
+ {
73
+ if (asset == s_CurrentApplyAssetPath)
74
+ {
75
+ var obj = AssetDatabase.LoadMainAssetAtPath(asset);
76
+ Selection.activeObject = obj;
77
+ Unsupported.SceneTrackerFlushDirty();
78
+ s_CurrentApplyAssetPath = null;
79
+ break;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.psdimporter@4.0.2/Editor/PSDImporterEditor.cs ADDED
@@ -0,0 +1,1126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.IO;
4
+ using PhotoshopFile;
5
+ using UnityEditor.AssetImporters;
6
+ using UnityEditor.U2D.Animation;
7
+ using UnityEditor.U2D.Common;
8
+ using UnityEditor.U2D.Sprites;
9
+ using UnityEngine;
10
+ using UnityEngine.Scripting.APIUpdating;
11
+
12
+ namespace UnityEditor.U2D.PSD
13
+ {
14
+ /// <summary>
15
+ /// Inspector for PSDImporter
16
+ /// </summary>
17
+ [CustomEditor(typeof(PSDImporter))]
18
+ [MovedFrom("UnityEditor.Experimental.AssetImporters")]
19
+ public class PSDImporterEditor : ScriptedImporterEditor, ITexturePlatformSettingsDataProvider
20
+ {
21
+ SerializedProperty m_TextureType;
22
+ SerializedProperty m_TextureShape;
23
+ SerializedProperty m_SpriteMode;
24
+ SerializedProperty m_SpritePixelsToUnits;
25
+ SerializedProperty m_SpriteMeshType;
26
+ SerializedProperty m_SpriteExtrude;
27
+ SerializedProperty m_Alignment;
28
+ SerializedProperty m_SpritePivot;
29
+ SerializedProperty m_NPOTScale;
30
+ SerializedProperty m_IsReadable;
31
+ SerializedProperty m_sRGBTexture;
32
+ SerializedProperty m_AlphaSource;
33
+ SerializedProperty m_MipMapMode;
34
+ SerializedProperty m_EnableMipMap;
35
+ SerializedProperty m_FadeOut;
36
+ SerializedProperty m_BorderMipMap;
37
+ SerializedProperty m_MipMapsPreserveCoverage;
38
+ SerializedProperty m_AlphaTestReferenceValue;
39
+ SerializedProperty m_MipMapFadeDistanceStart;
40
+ SerializedProperty m_MipMapFadeDistanceEnd;
41
+ SerializedProperty m_AlphaIsTransparency;
42
+ SerializedProperty m_FilterMode;
43
+ SerializedProperty m_Aniso;
44
+
45
+ SerializedProperty m_WrapU;
46
+ SerializedProperty m_WrapV;
47
+ SerializedProperty m_WrapW;
48
+ SerializedProperty m_ConvertToNormalMap;
49
+ SerializedProperty m_MosaicLayers;
50
+ SerializedProperty m_ImportHiddenLayers;
51
+ SerializedProperty m_ResliceFromLayer;
52
+ SerializedProperty m_CharacterMode;
53
+ SerializedProperty m_DocumentPivot;
54
+ SerializedProperty m_DocumentAlignment;
55
+ SerializedProperty m_GenerateGOHierarchy;
56
+ SerializedProperty m_PaperDollMode;
57
+ SerializedProperty m_KeepDupilcateSpriteName;
58
+
59
+ readonly int[] m_FilterModeOptions = (int[])(Enum.GetValues(typeof(FilterMode)));
60
+
61
+ bool m_IsPOT = false;
62
+ bool m_ShowAdvanced = false;
63
+ bool m_ShowExperimental = false;
64
+ Dictionary<TextureImporterType, Action[]> m_AdvanceInspectorGUI = new Dictionary<TextureImporterType, Action[]>();
65
+ int m_PlatformSettingsIndex;
66
+ bool m_ShowPerAxisWrapModes = false;
67
+
68
+ TexturePlatformSettingsHelper m_TexturePlatformSettingsHelper;
69
+
70
+ TexturePlatformSettingsView m_TexturePlatformSettingsView = new TexturePlatformSettingsView();
71
+ TexturePlatformSettingsController m_TexturePlatformSettingsController = new TexturePlatformSettingsController();
72
+
73
+ /// <summary>
74
+ /// Implementation of AssetImporterEditor.OnEnable
75
+ /// </summary>
76
+ public override void OnEnable()
77
+ {
78
+ base.OnEnable();
79
+ m_MosaicLayers = serializedObject.FindProperty("m_MosaicLayers");
80
+ m_ImportHiddenLayers = serializedObject.FindProperty("m_ImportHiddenLayers");
81
+ m_ResliceFromLayer = serializedObject.FindProperty("m_ResliceFromLayer");
82
+ m_CharacterMode = serializedObject.FindProperty("m_CharacterMode");
83
+ m_DocumentPivot = serializedObject.FindProperty("m_DocumentPivot");
84
+ m_DocumentAlignment = serializedObject.FindProperty("m_DocumentAlignment");
85
+ m_GenerateGOHierarchy = serializedObject.FindProperty("m_GenerateGOHierarchy");
86
+ m_PaperDollMode = serializedObject.FindProperty("m_PaperDollMode");
87
+ m_KeepDupilcateSpriteName = serializedObject.FindProperty("m_KeepDupilcateSpriteName");
88
+
89
+ var textureImporterSettingsSP = serializedObject.FindProperty("m_TextureImporterSettings");
90
+ m_TextureType = textureImporterSettingsSP.FindPropertyRelative("m_TextureType");
91
+ m_TextureShape = textureImporterSettingsSP.FindPropertyRelative("m_TextureShape");
92
+ m_ConvertToNormalMap = textureImporterSettingsSP.FindPropertyRelative("m_ConvertToNormalMap");
93
+ m_SpriteMode = textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode");
94
+ m_SpritePixelsToUnits = textureImporterSettingsSP.FindPropertyRelative("m_SpritePixelsToUnits");
95
+ m_SpriteMeshType = textureImporterSettingsSP.FindPropertyRelative("m_SpriteMeshType");
96
+ m_SpriteExtrude = textureImporterSettingsSP.FindPropertyRelative("m_SpriteExtrude");
97
+ m_Alignment = textureImporterSettingsSP.FindPropertyRelative("m_Alignment");
98
+ m_SpritePivot = textureImporterSettingsSP.FindPropertyRelative("m_SpritePivot");
99
+ m_NPOTScale = textureImporterSettingsSP.FindPropertyRelative("m_NPOTScale");
100
+ m_IsReadable = textureImporterSettingsSP.FindPropertyRelative("m_IsReadable");
101
+ m_sRGBTexture = textureImporterSettingsSP.FindPropertyRelative("m_sRGBTexture");
102
+ m_AlphaSource = textureImporterSettingsSP.FindPropertyRelative("m_AlphaSource");
103
+ m_MipMapMode = textureImporterSettingsSP.FindPropertyRelative("m_MipMapMode");
104
+ m_EnableMipMap = textureImporterSettingsSP.FindPropertyRelative("m_EnableMipMap");
105
+ m_FadeOut = textureImporterSettingsSP.FindPropertyRelative("m_FadeOut");
106
+ m_BorderMipMap = textureImporterSettingsSP.FindPropertyRelative("m_BorderMipMap");
107
+ m_MipMapsPreserveCoverage = textureImporterSettingsSP.FindPropertyRelative("m_MipMapsPreserveCoverage");
108
+ m_AlphaTestReferenceValue = textureImporterSettingsSP.FindPropertyRelative("m_AlphaTestReferenceValue");
109
+ m_MipMapFadeDistanceStart = textureImporterSettingsSP.FindPropertyRelative("m_MipMapFadeDistanceStart");
110
+ m_MipMapFadeDistanceEnd = textureImporterSettingsSP.FindPropertyRelative("m_MipMapFadeDistanceEnd");
111
+ m_AlphaIsTransparency = textureImporterSettingsSP.FindPropertyRelative("m_AlphaIsTransparency");
112
+ m_FilterMode = textureImporterSettingsSP.FindPropertyRelative("m_FilterMode");
113
+ m_Aniso = textureImporterSettingsSP.FindPropertyRelative("m_Aniso");
114
+ m_WrapU = textureImporterSettingsSP.FindPropertyRelative("m_WrapU");
115
+ m_WrapV = textureImporterSettingsSP.FindPropertyRelative("m_WrapV");
116
+ m_WrapW = textureImporterSettingsSP.FindPropertyRelative("m_WrapW");
117
+
118
+ var textureWidth = serializedObject.FindProperty("m_TextureActualWidth");
119
+ var textureHeight = serializedObject.FindProperty("m_TextureActualHeight");
120
+ m_IsPOT = Mathf.IsPowerOfTwo(textureWidth.intValue) && Mathf.IsPowerOfTwo(textureHeight.intValue);
121
+
122
+
123
+ var advanceGUIAction = new Action[]
124
+ {
125
+ ColorSpaceGUI,
126
+ AlphaHandlingGUI,
127
+ POTScaleGUI,
128
+ ReadableGUI,
129
+ MipMapGUI
130
+ };
131
+ m_AdvanceInspectorGUI.Add(TextureImporterType.Sprite, advanceGUIAction);
132
+
133
+ advanceGUIAction = new Action[]
134
+ {
135
+ POTScaleGUI,
136
+ ReadableGUI,
137
+ MipMapGUI
138
+ };
139
+ m_AdvanceInspectorGUI.Add(TextureImporterType.Default, advanceGUIAction);
140
+ LoadPlatformSettings();
141
+ m_TexturePlatformSettingsHelper = new TexturePlatformSettingsHelper(this);
142
+ }
143
+
144
+ /// <summary>
145
+ /// Implementation of AssetImporterEditor.OnInspectorGUI
146
+ /// </summary>
147
+ public override void OnInspectorGUI()
148
+ {
149
+ serializedObject.Update();
150
+ if (s_Styles == null)
151
+ s_Styles = new Styles();
152
+
153
+ EditorGUI.showMixedValue = m_TextureType.hasMultipleDifferentValues;
154
+ m_TextureType.intValue = EditorGUILayout.IntPopup(s_Styles.textureTypeTitle, m_TextureType.intValue, s_Styles.textureTypeOptions, s_Styles.textureTypeValues);
155
+ EditorGUI.showMixedValue = false;
156
+
157
+ switch ((TextureImporterType)m_TextureType.intValue)
158
+ {
159
+ case TextureImporterType.Sprite:
160
+ DoSpriteInspector();
161
+ break;
162
+ case TextureImporterType.Default:
163
+ DoTextureDefaultInspector();
164
+ break;
165
+ default:
166
+ Debug.LogWarning("We only support Default or Sprite texture type for now. Texture type is set to default.");
167
+ m_TextureType.intValue = (int)TextureImporterType.Default;
168
+ break;
169
+ }
170
+
171
+ DoAdvanceInspector();
172
+ CommonTextureSettingsGUI();
173
+ GUILayout.Space(10);
174
+ DoPlatformSettings();
175
+ serializedObject.ApplyModifiedProperties();
176
+ ApplyRevertGUI();
177
+ }
178
+
179
+ /// <summary>
180
+ /// Implementation of AssetImporterEditor.Apply
181
+ /// </summary>
182
+ protected override void Apply()
183
+ {
184
+ FileStream fileStream = new FileStream(((AssetImporter)target).assetPath, FileMode.Open, FileAccess.Read);
185
+ var doc = PaintDotNet.Data.PhotoshopFileType.PsdLoad.Load(fileStream, ELoadFlag.Header | ELoadFlag.ColorMode);
186
+
187
+ PSDApplyEvent evt = new PSDApplyEvent()
188
+ {
189
+ instance_id = target.GetInstanceID(),
190
+ texture_type = m_TextureType.intValue,
191
+ sprite_mode = m_SpriteMode.intValue,
192
+ mosaic_layer = m_MosaicLayers.boolValue,
193
+ import_hidden_layer = m_ImportHiddenLayers.boolValue,
194
+ character_mode = m_CharacterMode.boolValue,
195
+ generate_go_hierarchy = m_GenerateGOHierarchy.boolValue,
196
+ reslice_from_layer = m_ResliceFromLayer.boolValue,
197
+ is_character_rigged = IsCharacterRigged(),
198
+ is_psd = IsPSD(doc),
199
+ color_mode = FileColorMode(doc)
200
+ };
201
+ doc.Cleanup();
202
+ AnalyticFactory.analytics.SendApplyEvent(evt);
203
+ m_TexturePlatformSettingsHelper.Apply();
204
+ base.Apply();
205
+ Selection.activeObject = null;
206
+ Unsupported.SceneTrackerFlushDirty();
207
+ PSDImportPostProcessor.currentApplyAssetPath = ((PSDImporter) target).assetPath;
208
+ }
209
+
210
+ static bool IsPSD(PsdFile doc)
211
+ {
212
+ return !doc.IsLargeDocument;
213
+ }
214
+
215
+ static PsdColorMode FileColorMode(PsdFile doc)
216
+ {
217
+ return doc.ColorMode;
218
+ }
219
+
220
+ bool IsCharacterRigged()
221
+ {
222
+ var importer = target as PSDImporter;
223
+ if (importer != null)
224
+ {
225
+ var characterProvider = importer.GetDataProvider<ICharacterDataProvider>();
226
+ var meshDataProvider = importer.GetDataProvider<ISpriteMeshDataProvider>();
227
+ if (characterProvider != null && meshDataProvider != null)
228
+ {
229
+ var character = characterProvider.GetCharacterData();
230
+ foreach (var parts in character.parts)
231
+ {
232
+ var vert = meshDataProvider.GetVertices(new GUID(parts.spriteId));
233
+ var indices = meshDataProvider.GetIndices(new GUID(parts.spriteId));
234
+ if (parts.bones != null && parts.bones.Length > 0 &&
235
+ vert != null && vert.Length > 0 &&
236
+ indices != null && indices.Length > 0)
237
+ return true;
238
+ }
239
+ }
240
+ }
241
+ return false;
242
+ }
243
+
244
+ Dictionary<string, List<TextureImporterPlatformSettings>> m_PlatfromSettings = new Dictionary<string, List<TextureImporterPlatformSettings>>();
245
+ void LoadPlatformSettings()
246
+ {
247
+ foreach (var t in targets)
248
+ {
249
+ var importer = ((PSDImporter)t);
250
+ var importerPlatformSettings = importer.GetAllPlatformSettings();
251
+ for (int i = 0; i < importerPlatformSettings.Length; ++i)
252
+ {
253
+ var tip = importerPlatformSettings[i];
254
+ List<TextureImporterPlatformSettings> platformSettings = null;
255
+ m_PlatfromSettings.TryGetValue(tip.name, out platformSettings);
256
+ if (platformSettings == null)
257
+ {
258
+ platformSettings = new List<TextureImporterPlatformSettings>();
259
+ m_PlatfromSettings.Add(tip.name, platformSettings);
260
+ }
261
+ platformSettings.Add(tip);
262
+ }
263
+ }
264
+ }
265
+
266
+ void StorePlatformSettings()
267
+ {
268
+ var platformSettingsSP = serializedObject.FindProperty("m_PlatformSettings");
269
+ platformSettingsSP.ClearArray();
270
+ foreach (var keyValue in m_PlatfromSettings)
271
+ {
272
+ if (!keyValue.Value[0].overridden)
273
+ continue;
274
+
275
+ SerializedProperty platformSettingSP = null;
276
+ for (int i = 0; i < platformSettingsSP.arraySize; ++i)
277
+ {
278
+ var sp = platformSettingsSP.GetArrayElementAtIndex(i);
279
+ if (sp.FindPropertyRelative("m_Name").stringValue == keyValue.Key)
280
+ platformSettingSP = sp;
281
+ }
282
+ if (platformSettingSP == null)
283
+ {
284
+ platformSettingsSP.InsertArrayElementAtIndex(platformSettingsSP.arraySize);
285
+ platformSettingSP = platformSettingsSP.GetArrayElementAtIndex(platformSettingsSP.arraySize - 1);
286
+ }
287
+
288
+ var tip = keyValue.Value[0];
289
+ platformSettingSP.FindPropertyRelative("m_Name").stringValue = tip.name;
290
+ platformSettingSP.FindPropertyRelative("m_Overridden").intValue = tip.overridden ? 1 : 0;
291
+ platformSettingSP.FindPropertyRelative("m_MaxTextureSize").intValue = tip.maxTextureSize;
292
+ platformSettingSP.FindPropertyRelative("m_ResizeAlgorithm").intValue = (int)tip.resizeAlgorithm;
293
+ platformSettingSP.FindPropertyRelative("m_TextureFormat").intValue = (int)tip.format;
294
+ platformSettingSP.FindPropertyRelative("m_TextureCompression").intValue = (int)tip.textureCompression;
295
+ platformSettingSP.FindPropertyRelative("m_CompressionQuality").intValue = tip.compressionQuality;
296
+ platformSettingSP.FindPropertyRelative("m_CrunchedCompression").intValue = tip.crunchedCompression ? 1 : 0;
297
+ platformSettingSP.FindPropertyRelative("m_AllowsAlphaSplitting").intValue = tip.allowsAlphaSplitting ? 1 : 0;
298
+ }
299
+ }
300
+
301
+ void DoPlatformSettings()
302
+ {
303
+ m_TexturePlatformSettingsHelper.ShowPlatformSpecificSettings();
304
+ }
305
+
306
+ void DoAdvanceInspector()
307
+ {
308
+ if (!m_TextureType.hasMultipleDifferentValues)
309
+ {
310
+ if (m_AdvanceInspectorGUI.ContainsKey((TextureImporterType)m_TextureType.intValue))
311
+ {
312
+ EditorGUILayout.Space();
313
+
314
+ m_ShowAdvanced = EditorGUILayout.Foldout(m_ShowAdvanced, s_Styles.showAdvanced, true);
315
+ if (m_ShowAdvanced)
316
+ {
317
+ foreach (var action in m_AdvanceInspectorGUI[(TextureImporterType)m_TextureType.intValue])
318
+ {
319
+ action();
320
+ }
321
+ }
322
+ }
323
+ }
324
+ EditorGUILayout.Space();
325
+ }
326
+
327
+ void CommonTextureSettingsGUI()
328
+ {
329
+ EditorGUI.BeginChangeCheck();
330
+
331
+ // Wrap mode
332
+ bool isVolume = false;
333
+ WrapModePopup(m_WrapU, m_WrapV, m_WrapW, isVolume, ref m_ShowPerAxisWrapModes);
334
+
335
+
336
+ // Display warning about repeat wrap mode on restricted npot emulation
337
+ if (m_NPOTScale.intValue == (int)TextureImporterNPOTScale.None &&
338
+ (m_WrapU.intValue == (int)TextureWrapMode.Repeat || m_WrapV.intValue == (int)TextureWrapMode.Repeat) &&
339
+ !InternalEditorBridge.DoesHardwareSupportsFullNPOT())
340
+ {
341
+ bool displayWarning = false;
342
+ foreach (var target in targets)
343
+ {
344
+ var imp = (PSDImporter)target;
345
+ int w = imp.textureActualWidth;
346
+ int h = imp.textureActualHeight;
347
+ if (!Mathf.IsPowerOfTwo(w) || !Mathf.IsPowerOfTwo(h))
348
+ {
349
+ displayWarning = true;
350
+ break;
351
+ }
352
+ }
353
+
354
+ if (displayWarning)
355
+ {
356
+ EditorGUILayout.HelpBox(s_Styles.warpNotSupportWarning.text, MessageType.Warning, true);
357
+ }
358
+ }
359
+
360
+ // Filter mode
361
+ EditorGUI.showMixedValue = m_FilterMode.hasMultipleDifferentValues;
362
+ FilterMode filter = (FilterMode)m_FilterMode.intValue;
363
+ if ((int)filter == -1)
364
+ {
365
+ if (m_FadeOut.intValue > 0 || m_ConvertToNormalMap.intValue > 0)
366
+ filter = FilterMode.Trilinear;
367
+ else
368
+ filter = FilterMode.Bilinear;
369
+ }
370
+ filter = (FilterMode)EditorGUILayout.IntPopup(s_Styles.filterMode, (int)filter, s_Styles.filterModeOptions, m_FilterModeOptions);
371
+ EditorGUI.showMixedValue = false;
372
+ if (EditorGUI.EndChangeCheck())
373
+ m_FilterMode.intValue = (int)filter;
374
+
375
+ // Aniso
376
+ bool showAniso = (FilterMode)m_FilterMode.intValue != FilterMode.Point
377
+ && m_EnableMipMap.intValue > 0
378
+ && (TextureImporterShape)m_TextureShape.intValue != TextureImporterShape.TextureCube;
379
+ using (new EditorGUI.DisabledScope(!showAniso))
380
+ {
381
+ EditorGUI.BeginChangeCheck();
382
+ EditorGUI.showMixedValue = m_Aniso.hasMultipleDifferentValues;
383
+ int aniso = m_Aniso.intValue;
384
+ if (aniso == -1)
385
+ aniso = 1;
386
+ aniso = EditorGUILayout.IntSlider(s_Styles.anisoLevelLabel, aniso, 0, 16);
387
+ EditorGUI.showMixedValue = false;
388
+ if (EditorGUI.EndChangeCheck())
389
+ m_Aniso.intValue = aniso;
390
+
391
+ if (aniso > 1)
392
+ {
393
+ if (QualitySettings.anisotropicFiltering == AnisotropicFiltering.Disable)
394
+ EditorGUILayout.HelpBox(s_Styles.anisotropicDisableInfo.text, MessageType.Info);
395
+ else if (QualitySettings.anisotropicFiltering == AnisotropicFiltering.ForceEnable)
396
+ EditorGUILayout.HelpBox(s_Styles.anisotropicForceEnableInfo.text, MessageType.Info);
397
+ }
398
+ }
399
+ }
400
+
401
+ private static bool IsAnyTextureObjectUsingPerAxisWrapMode(UnityEngine.Object[] objects, bool isVolumeTexture)
402
+ {
403
+ foreach (var o in objects)
404
+ {
405
+ int u = 0, v = 0, w = 0;
406
+ // the objects can be Textures themselves, or texture-related importers
407
+ if (o is Texture)
408
+ {
409
+ var ti = (Texture)o;
410
+ u = (int)ti.wrapModeU;
411
+ v = (int)ti.wrapModeV;
412
+ w = (int)ti.wrapModeW;
413
+ }
414
+ if (o is TextureImporter)
415
+ {
416
+ var ti = (TextureImporter)o;
417
+ u = (int)ti.wrapModeU;
418
+ v = (int)ti.wrapModeV;
419
+ w = (int)ti.wrapModeW;
420
+ }
421
+ if (o is IHVImageFormatImporter)
422
+ {
423
+ var ti = (IHVImageFormatImporter)o;
424
+ u = (int)ti.wrapModeU;
425
+ v = (int)ti.wrapModeV;
426
+ w = (int)ti.wrapModeW;
427
+ }
428
+ u = Mathf.Max(0, u);
429
+ v = Mathf.Max(0, v);
430
+ w = Mathf.Max(0, w);
431
+ if (u != v)
432
+ {
433
+ return true;
434
+ }
435
+ if (isVolumeTexture)
436
+ {
437
+ if (u != w || v != w)
438
+ {
439
+ return true;
440
+ }
441
+ }
442
+ }
443
+ return false;
444
+ }
445
+
446
+ // showPerAxisWrapModes is state of whether "Per-Axis" mode should be active in the main dropdown.
447
+ // It is set automatically if wrap modes in UVW are different, or if user explicitly picks "Per-Axis" option -- when that one is picked,
448
+ // then it should stay true even if UVW wrap modes will initially be the same.
449
+ //
450
+ // Note: W wrapping mode is only shown when isVolumeTexture is true.
451
+ internal static void WrapModePopup(SerializedProperty wrapU, SerializedProperty wrapV, SerializedProperty wrapW, bool isVolumeTexture, ref bool showPerAxisWrapModes)
452
+ {
453
+ if (s_Styles == null)
454
+ s_Styles = new Styles();
455
+
456
+ // In texture importer settings, serialized properties for things like wrap modes can contain -1;
457
+ // that seems to indicate "use defaults, user has not changed them to anything" but not totally sure.
458
+ // Show them as Repeat wrap modes in the popups.
459
+ var wu = (TextureWrapMode)Mathf.Max(wrapU.intValue, 0);
460
+ var wv = (TextureWrapMode)Mathf.Max(wrapV.intValue, 0);
461
+ var ww = (TextureWrapMode)Mathf.Max(wrapW.intValue, 0);
462
+
463
+ // automatically go into per-axis mode if values are already different
464
+ if (wu != wv)
465
+ showPerAxisWrapModes = true;
466
+ if (isVolumeTexture)
467
+ {
468
+ if (wu != ww || wv != ww)
469
+ showPerAxisWrapModes = true;
470
+ }
471
+
472
+ // It's not possible to determine whether any single texture in the whole selection is using per-axis wrap modes
473
+ // just from SerializedProperty values. They can only tell if "some values in whole selection are different" (e.g.
474
+ // wrap value on U axis is not the same among all textures), and can return value of "some" object in the selection
475
+ // (typically based on object loading order). So in order for more intuitive behavior with multi-selection,
476
+ // we go over the actual objects when there's >1 object selected and some wrap modes are different.
477
+ if (!showPerAxisWrapModes)
478
+ {
479
+ if (wrapU.hasMultipleDifferentValues || wrapV.hasMultipleDifferentValues || (isVolumeTexture && wrapW.hasMultipleDifferentValues))
480
+ {
481
+ if (IsAnyTextureObjectUsingPerAxisWrapMode(wrapU.serializedObject.targetObjects, isVolumeTexture))
482
+ {
483
+ showPerAxisWrapModes = true;
484
+ }
485
+ }
486
+ }
487
+
488
+ int value = showPerAxisWrapModes ? -1 : (int)wu;
489
+
490
+ // main wrap mode popup
491
+ EditorGUI.BeginChangeCheck();
492
+ EditorGUI.showMixedValue = !showPerAxisWrapModes && (wrapU.hasMultipleDifferentValues || wrapV.hasMultipleDifferentValues || (isVolumeTexture && wrapW.hasMultipleDifferentValues));
493
+ value = EditorGUILayout.IntPopup(s_Styles.wrapModeLabel, value, s_Styles.wrapModeContents, s_Styles.wrapModeValues);
494
+ if (EditorGUI.EndChangeCheck() && value != -1)
495
+ {
496
+ // assign the same wrap mode to all axes, and hide per-axis popups
497
+ wrapU.intValue = value;
498
+ wrapV.intValue = value;
499
+ wrapW.intValue = value;
500
+ showPerAxisWrapModes = false;
501
+ }
502
+
503
+ // show per-axis popups if needed
504
+ if (value == -1)
505
+ {
506
+ showPerAxisWrapModes = true;
507
+ EditorGUI.indentLevel++;
508
+ WrapModeAxisPopup(s_Styles.wrapU, wrapU);
509
+ WrapModeAxisPopup(s_Styles.wrapV, wrapV);
510
+ if (isVolumeTexture)
511
+ {
512
+ WrapModeAxisPopup(s_Styles.wrapW, wrapW);
513
+ }
514
+ EditorGUI.indentLevel--;
515
+ }
516
+ EditorGUI.showMixedValue = false;
517
+ }
518
+
519
+ static void WrapModeAxisPopup(GUIContent label, SerializedProperty wrapProperty)
520
+ {
521
+ // In texture importer settings, serialized properties for wrap modes can contain -1, which means "use default".
522
+ var wrap = (TextureWrapMode)Mathf.Max(wrapProperty.intValue, 0);
523
+ Rect rect = EditorGUILayout.GetControlRect();
524
+ EditorGUI.BeginChangeCheck();
525
+ EditorGUI.BeginProperty(rect, label, wrapProperty);
526
+ wrap = (TextureWrapMode)EditorGUI.EnumPopup(rect, label, wrap);
527
+ EditorGUI.EndProperty();
528
+ if (EditorGUI.EndChangeCheck())
529
+ {
530
+ wrapProperty.intValue = (int)wrap;
531
+ }
532
+ }
533
+
534
+ void DoWrapModePopup()
535
+ {
536
+ WrapModePopup(m_WrapU, m_WrapV, m_WrapW, IsVolume(), ref m_ShowPerAxisWrapModes);
537
+ }
538
+
539
+ bool IsVolume()
540
+ {
541
+ var t = target as Texture;
542
+ return t != null && t.dimension == UnityEngine.Rendering.TextureDimension.Tex3D;
543
+ }
544
+
545
+ void DoSpriteInspector()
546
+ {
547
+ EditorGUI.BeginChangeCheck();
548
+ EditorGUILayout.IntPopup(m_SpriteMode, s_Styles.spriteModeOptions, new[] { 1, 2, 3 }, s_Styles.spriteMode);
549
+
550
+ // Ensure that PropertyField focus will be cleared when we change spriteMode.
551
+ if (EditorGUI.EndChangeCheck())
552
+ {
553
+ GUIUtility.keyboardControl = 0;
554
+ }
555
+
556
+ EditorGUI.indentLevel++;
557
+
558
+ // Show generic attributes
559
+ if (m_SpriteMode.intValue != 0)
560
+ {
561
+ EditorGUILayout.PropertyField(m_SpritePixelsToUnits, s_Styles.spritePixelsPerUnit);
562
+
563
+ if (m_SpriteMode.intValue != (int)SpriteImportMode.Polygon && !m_SpriteMode.hasMultipleDifferentValues)
564
+ {
565
+ EditorGUILayout.IntPopup(m_SpriteMeshType, s_Styles.spriteMeshTypeOptions, new[] { 0, 1 }, s_Styles.spriteMeshType);
566
+ }
567
+
568
+ EditorGUILayout.IntSlider(m_SpriteExtrude, 0, 32, s_Styles.spriteExtrude);
569
+
570
+ if (m_SpriteMode.intValue == 1)
571
+ {
572
+ EditorGUILayout.IntPopup(m_Alignment, s_Styles.spriteAlignmentOptions, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s_Styles.spriteAlignment);
573
+
574
+ if (m_Alignment.intValue == (int)SpriteAlignment.Custom)
575
+ {
576
+ GUILayout.BeginHorizontal();
577
+ EditorGUILayout.PropertyField(m_SpritePivot, new GUIContent());
578
+ GUILayout.EndHorizontal();
579
+ }
580
+ }
581
+ }
582
+
583
+ EditorGUILayout.PropertyField(m_ImportHiddenLayers, s_Styles.importHiddenLayer);
584
+ if (m_SpriteMode.intValue == (int)SpriteImportMode.Multiple && !m_SpriteMode.hasMultipleDifferentValues)
585
+ {
586
+ EditorGUILayout.PropertyField(m_MosaicLayers, s_Styles.mosaicLayers);
587
+ using (new EditorGUI.DisabledScope(!m_MosaicLayers.boolValue))
588
+ {
589
+ EditorGUILayout.PropertyField(m_CharacterMode, s_Styles.characterMode);
590
+ using (new EditorGUI.DisabledScope(!m_CharacterMode.boolValue))
591
+ {
592
+ EditorGUILayout.PropertyField(m_GenerateGOHierarchy, s_Styles.generateGOHierarchy);
593
+ EditorGUILayout.IntPopup(m_DocumentAlignment, s_Styles.spriteAlignmentOptions, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s_Styles.characterAlignment);
594
+ if (m_DocumentAlignment.intValue == (int)SpriteAlignment.Custom)
595
+ {
596
+ GUILayout.BeginHorizontal();
597
+ GUILayout.Space(EditorGUIUtility.labelWidth);
598
+ EditorGUILayout.PropertyField(m_DocumentPivot, new GUIContent());
599
+ GUILayout.EndHorizontal();
600
+ }
601
+ //EditorGUILayout.PropertyField(m_PaperDollMode, s_Styles.paperDollMode);
602
+ }
603
+
604
+
605
+ EditorGUILayout.PropertyField(m_ResliceFromLayer, s_Styles.resliceFromLayer);
606
+ if (m_ResliceFromLayer.boolValue)
607
+ {
608
+ EditorGUILayout.HelpBox(s_Styles.resliceFromLayerWarning.text, MessageType.Info, true);
609
+ }
610
+ }
611
+ m_ShowExperimental = EditorGUILayout.Foldout(m_ShowExperimental, s_Styles.experimental, true);
612
+ if (m_ShowExperimental)
613
+ {
614
+ EditorGUI.indentLevel++;
615
+ EditorGUILayout.PropertyField(m_KeepDupilcateSpriteName, s_Styles.keepDuplicateSpriteName);
616
+ EditorGUI.indentLevel--;
617
+ }
618
+ }
619
+
620
+ using (new EditorGUI.DisabledScope(targets.Length != 1))
621
+ {
622
+ GUILayout.BeginHorizontal();
623
+
624
+ GUILayout.FlexibleSpace();
625
+ if (GUILayout.Button(s_Styles.spriteEditorButtonLabel))
626
+ {
627
+ if (HasModified())
628
+ {
629
+ // To ensure Sprite Editor Window to have the latest texture import setting,
630
+ // We must applied those modified values first.
631
+ string dialogText = string.Format(s_Styles.unappliedSettingsDialogContent.text, ((AssetImporter)target).assetPath);
632
+ if (EditorUtility.DisplayDialog(s_Styles.unappliedSettingsDialogTitle.text,
633
+ dialogText, s_Styles.applyButtonLabel.text, s_Styles.revertButtonLabel.text))
634
+ {
635
+ ApplyAndImport();
636
+ InternalEditorBridge.ShowSpriteEditorWindow(this.assetTarget);
637
+
638
+ // We reimported the asset which destroyed the editor, so we can't keep running the UI here.
639
+ GUIUtility.ExitGUI();
640
+ }
641
+ }
642
+ else
643
+ {
644
+ InternalEditorBridge.ShowSpriteEditorWindow(this.assetTarget);
645
+ }
646
+ }
647
+ GUILayout.EndHorizontal();
648
+ }
649
+ EditorGUI.indentLevel--;
650
+ }
651
+
652
+ void DoTextureDefaultInspector()
653
+ {
654
+ ColorSpaceGUI();
655
+ AlphaHandlingGUI();
656
+ }
657
+
658
+ void ColorSpaceGUI()
659
+ {
660
+ ToggleFromInt(m_sRGBTexture, s_Styles.sRGBTexture);
661
+ }
662
+
663
+ void POTScaleGUI()
664
+ {
665
+ using (new EditorGUI.DisabledScope(m_IsPOT || m_TextureType.intValue == (int)TextureImporterType.Sprite))
666
+ {
667
+ EnumPopup(m_NPOTScale, typeof(TextureImporterNPOTScale), s_Styles.npot);
668
+ }
669
+ }
670
+
671
+ void ReadableGUI()
672
+ {
673
+ ToggleFromInt(m_IsReadable, s_Styles.readWrite);
674
+ }
675
+
676
+ void AlphaHandlingGUI()
677
+ {
678
+ EditorGUI.showMixedValue = m_AlphaSource.hasMultipleDifferentValues;
679
+ EditorGUI.BeginChangeCheck();
680
+ int newAlphaUsage = EditorGUILayout.IntPopup(s_Styles.alphaSource, m_AlphaSource.intValue, s_Styles.alphaSourceOptions, s_Styles.alphaSourceValues);
681
+
682
+ EditorGUI.showMixedValue = false;
683
+ if (EditorGUI.EndChangeCheck())
684
+ {
685
+ m_AlphaSource.intValue = newAlphaUsage;
686
+ }
687
+
688
+ bool showAlphaIsTransparency = (TextureImporterAlphaSource)m_AlphaSource.intValue != TextureImporterAlphaSource.None;
689
+ using (new EditorGUI.DisabledScope(!showAlphaIsTransparency))
690
+ {
691
+ ToggleFromInt(m_AlphaIsTransparency, s_Styles.alphaIsTransparency);
692
+ }
693
+ }
694
+
695
+ void MipMapGUI()
696
+ {
697
+ ToggleFromInt(m_EnableMipMap, s_Styles.generateMipMaps);
698
+
699
+ if (m_EnableMipMap.boolValue && !m_EnableMipMap.hasMultipleDifferentValues)
700
+ {
701
+ EditorGUI.indentLevel++;
702
+ ToggleFromInt(m_BorderMipMap, s_Styles.borderMipMaps);
703
+ EditorGUILayout.Popup(s_Styles.mipMapFilter, m_MipMapMode.intValue, s_Styles.mipMapFilterOptions);
704
+
705
+ ToggleFromInt(m_MipMapsPreserveCoverage, s_Styles.mipMapsPreserveCoverage);
706
+ if (m_MipMapsPreserveCoverage.intValue != 0 && !m_MipMapsPreserveCoverage.hasMultipleDifferentValues)
707
+ {
708
+ EditorGUI.indentLevel++;
709
+ EditorGUILayout.PropertyField(m_AlphaTestReferenceValue, s_Styles.alphaTestReferenceValue);
710
+ EditorGUI.indentLevel--;
711
+ }
712
+
713
+ // Mipmap fadeout
714
+ ToggleFromInt(m_FadeOut, s_Styles.mipmapFadeOutToggle);
715
+ if (m_FadeOut.intValue > 0)
716
+ {
717
+ EditorGUI.indentLevel++;
718
+ EditorGUI.BeginChangeCheck();
719
+ float min = m_MipMapFadeDistanceStart.intValue;
720
+ float max = m_MipMapFadeDistanceEnd.intValue;
721
+ EditorGUILayout.MinMaxSlider(s_Styles.mipmapFadeOut, ref min, ref max, 0, 10);
722
+ if (EditorGUI.EndChangeCheck())
723
+ {
724
+ m_MipMapFadeDistanceStart.intValue = Mathf.RoundToInt(min);
725
+ m_MipMapFadeDistanceEnd.intValue = Mathf.RoundToInt(max);
726
+ }
727
+ EditorGUI.indentLevel--;
728
+ }
729
+ EditorGUI.indentLevel--;
730
+ }
731
+ }
732
+
733
+ void ToggleFromInt(SerializedProperty property, GUIContent label)
734
+ {
735
+ EditorGUI.BeginChangeCheck();
736
+ EditorGUI.showMixedValue = property.hasMultipleDifferentValues;
737
+ int value = EditorGUILayout.Toggle(label, property.intValue > 0) ? 1 : 0;
738
+ EditorGUI.showMixedValue = false;
739
+ if (EditorGUI.EndChangeCheck())
740
+ property.intValue = value;
741
+ }
742
+
743
+ void EnumPopup(SerializedProperty property, System.Type type, GUIContent label)
744
+ {
745
+ EditorGUILayout.IntPopup(label.text, property.intValue,
746
+ System.Enum.GetNames(type),
747
+ System.Enum.GetValues(type) as int[]);
748
+ }
749
+
750
+ void ExportMosaicTexture()
751
+ {
752
+ var assetPath = ((AssetImporter)target).assetPath;
753
+ var texture2D = AssetDatabase.LoadAssetAtPath<Texture2D>(assetPath);
754
+ if (texture2D == null)
755
+ return;
756
+ if (!texture2D.isReadable)
757
+ texture2D = InternalEditorBridge.CreateTemporaryDuplicate(texture2D, texture2D.width, texture2D.height);
758
+ var pixelData = texture2D.GetPixels();
759
+ texture2D = new Texture2D(texture2D.width, texture2D.height);
760
+ texture2D.SetPixels(pixelData);
761
+ texture2D.Apply();
762
+ byte[] bytes = texture2D.EncodeToPNG();
763
+ var fileName = Path.GetFileNameWithoutExtension(assetPath);
764
+ var filePath = Path.GetDirectoryName(assetPath);
765
+ var savePath = Path.Combine(filePath, fileName + ".png");
766
+ File.WriteAllBytes(savePath, bytes);
767
+ AssetDatabase.Refresh();
768
+ }
769
+
770
+ protected override void ResetValues()
771
+ {
772
+ base.ResetValues();
773
+ LoadPlatformSettings();
774
+ m_TexturePlatformSettingsHelper = new TexturePlatformSettingsHelper(this);
775
+ }
776
+
777
+ public int GetTargetCount()
778
+ {
779
+ return targets.Length;
780
+ }
781
+
782
+ public TextureImporterPlatformSettings GetPlatformTextureSettings(int i, string name)
783
+ {
784
+ if(m_PlatfromSettings.ContainsKey(name))
785
+ if(m_PlatfromSettings[name].Count > i)
786
+ return m_PlatfromSettings[name][i];
787
+ return new TextureImporterPlatformSettings()
788
+ {
789
+ name = name,
790
+ overridden = false
791
+ };
792
+ }
793
+
794
+ public bool ShowPresetSettings()
795
+ {
796
+ return assetTarget == null;
797
+ }
798
+
799
+ public bool DoesSourceTextureHaveAlpha(int v)
800
+ {
801
+ return true;
802
+ }
803
+
804
+ public bool IsSourceTextureHDR(int v)
805
+ {
806
+ return false;
807
+ }
808
+
809
+ public void SetPlatformTextureSettings(int i, TextureImporterPlatformSettings platformSettings)
810
+ {
811
+ var psdImporter = ((PSDImporter)targets[i]);
812
+ psdImporter.SetPlatformTextureSettings(platformSettings);
813
+ psdImporter.Apply();
814
+ }
815
+
816
+ public void GetImporterSettings(int i, TextureImporterSettings settings)
817
+ {
818
+ ((PSDImporter)targets[i]).ReadTextureSettings(settings);
819
+ // Get settings that have been changed in the inspector
820
+ GetSerializedPropertySettings(settings);
821
+ }
822
+
823
+ internal TextureImporterSettings GetSerializedPropertySettings(TextureImporterSettings settings)
824
+ {
825
+ if (!m_AlphaSource.hasMultipleDifferentValues)
826
+ settings.alphaSource = (TextureImporterAlphaSource)m_AlphaSource.intValue;
827
+
828
+ if (!m_ConvertToNormalMap.hasMultipleDifferentValues)
829
+ settings.convertToNormalMap = m_ConvertToNormalMap.intValue > 0;
830
+
831
+ if (!m_BorderMipMap.hasMultipleDifferentValues)
832
+ settings.borderMipmap = m_BorderMipMap.intValue > 0;
833
+
834
+ if (!m_MipMapsPreserveCoverage.hasMultipleDifferentValues)
835
+ settings.mipMapsPreserveCoverage = m_MipMapsPreserveCoverage.intValue > 0;
836
+
837
+ if (!m_AlphaTestReferenceValue.hasMultipleDifferentValues)
838
+ settings.alphaTestReferenceValue = m_AlphaTestReferenceValue.floatValue;
839
+
840
+ if (!m_NPOTScale.hasMultipleDifferentValues)
841
+ settings.npotScale = (TextureImporterNPOTScale)m_NPOTScale.intValue;
842
+
843
+ if (!m_IsReadable.hasMultipleDifferentValues)
844
+ settings.readable = m_IsReadable.intValue > 0;
845
+
846
+ if (!m_sRGBTexture.hasMultipleDifferentValues)
847
+ settings.sRGBTexture = m_sRGBTexture.intValue > 0;
848
+
849
+ if (!m_EnableMipMap.hasMultipleDifferentValues)
850
+ settings.mipmapEnabled = m_EnableMipMap.intValue > 0;
851
+
852
+ if (!m_MipMapMode.hasMultipleDifferentValues)
853
+ settings.mipmapFilter = (TextureImporterMipFilter)m_MipMapMode.intValue;
854
+
855
+ if (!m_FadeOut.hasMultipleDifferentValues)
856
+ settings.fadeOut = m_FadeOut.intValue > 0;
857
+
858
+ if (!m_MipMapFadeDistanceStart.hasMultipleDifferentValues)
859
+ settings.mipmapFadeDistanceStart = m_MipMapFadeDistanceStart.intValue;
860
+
861
+ if (!m_MipMapFadeDistanceEnd.hasMultipleDifferentValues)
862
+ settings.mipmapFadeDistanceEnd = m_MipMapFadeDistanceEnd.intValue;
863
+
864
+ if (!m_SpriteMode.hasMultipleDifferentValues)
865
+ settings.spriteMode = m_SpriteMode.intValue;
866
+
867
+ if (!m_SpritePixelsToUnits.hasMultipleDifferentValues)
868
+ settings.spritePixelsPerUnit = m_SpritePixelsToUnits.floatValue;
869
+
870
+ if (!m_SpriteExtrude.hasMultipleDifferentValues)
871
+ settings.spriteExtrude = (uint)m_SpriteExtrude.intValue;
872
+
873
+ if (!m_SpriteMeshType.hasMultipleDifferentValues)
874
+ settings.spriteMeshType = (SpriteMeshType)m_SpriteMeshType.intValue;
875
+
876
+ if (!m_Alignment.hasMultipleDifferentValues)
877
+ settings.spriteAlignment = m_Alignment.intValue;
878
+
879
+ if (!m_SpritePivot.hasMultipleDifferentValues)
880
+ settings.spritePivot = m_SpritePivot.vector2Value;
881
+
882
+ if (!m_WrapU.hasMultipleDifferentValues)
883
+ settings.wrapModeU = (TextureWrapMode)m_WrapU.intValue;
884
+ if (!m_WrapV.hasMultipleDifferentValues)
885
+ settings.wrapModeU = (TextureWrapMode)m_WrapV.intValue;
886
+ if (!m_WrapW.hasMultipleDifferentValues)
887
+ settings.wrapModeU = (TextureWrapMode)m_WrapW.intValue;
888
+
889
+ if (!m_FilterMode.hasMultipleDifferentValues)
890
+ settings.filterMode = (FilterMode)m_FilterMode.intValue;
891
+
892
+ if (!m_Aniso.hasMultipleDifferentValues)
893
+ settings.aniso = m_Aniso.intValue;
894
+
895
+
896
+ if (!m_AlphaIsTransparency.hasMultipleDifferentValues)
897
+ settings.alphaIsTransparency = m_AlphaIsTransparency.intValue > 0;
898
+
899
+ if (!m_TextureType.hasMultipleDifferentValues)
900
+ settings.textureType = (TextureImporterType)m_TextureType.intValue;
901
+
902
+ if (!m_TextureShape.hasMultipleDifferentValues)
903
+ settings.textureShape = (TextureImporterShape)m_TextureShape.intValue;
904
+
905
+ return settings;
906
+ }
907
+ /// <summary>
908
+ /// Override of AssetImporterEditor.showImportedObject
909
+ /// The property always returns false so that imported objects does not show up in the Inspector.
910
+ /// </summary>
911
+ /// <returns>false</returns>
912
+ public override bool showImportedObject
913
+ {
914
+ get { return false; }
915
+ }
916
+
917
+ public bool textureTypeHasMultipleDifferentValues
918
+ {
919
+ get { return m_TextureType.hasMultipleDifferentValues; }
920
+ }
921
+
922
+ public TextureImporterType textureType
923
+ {
924
+ get { return (TextureImporterType)m_TextureType.intValue; }
925
+ }
926
+
927
+ public SpriteImportMode spriteImportMode
928
+ {
929
+ get { return (SpriteImportMode)m_SpriteMode.intValue; }
930
+ }
931
+
932
+ public override bool HasModified()
933
+ {
934
+ if (base.HasModified())
935
+ return true;
936
+
937
+ return m_TexturePlatformSettingsHelper.HasModified();
938
+ }
939
+
940
+ internal class Styles
941
+ {
942
+ public readonly GUIContent textureTypeTitle = new GUIContent("Texture Type", "What will this texture be used for?");
943
+ public readonly GUIContent[] textureTypeOptions =
944
+ {
945
+ new GUIContent("Default", "Texture is a normal image such as a diffuse texture or other."),
946
+ new GUIContent("Sprite (2D and UI)", "Texture is used for a sprite."),
947
+ };
948
+ public readonly int[] textureTypeValues =
949
+ {
950
+ (int)TextureImporterType.Default,
951
+ (int)TextureImporterType.Sprite,
952
+ };
953
+
954
+ public readonly GUIContent textureShape = new GUIContent("Texture Shape", "What shape is this texture?");
955
+ private readonly GUIContent textureShape2D = new GUIContent("2D, Texture is 2D.");
956
+ private readonly GUIContent textureShapeCube = new GUIContent("Cube", "Texture is a Cubemap.");
957
+ public readonly Dictionary<TextureImporterShape, GUIContent[]> textureShapeOptionsDictionnary = new Dictionary<TextureImporterShape, GUIContent[]>();
958
+ public readonly Dictionary<TextureImporterShape, int[]> textureShapeValuesDictionnary = new Dictionary<TextureImporterShape, int[]>();
959
+
960
+
961
+ public readonly GUIContent filterMode = new GUIContent("Filter Mode");
962
+ public readonly GUIContent[] filterModeOptions =
963
+ {
964
+ new GUIContent("Point (no filter)"),
965
+ new GUIContent("Bilinear"),
966
+ new GUIContent("Trilinear")
967
+ };
968
+
969
+ public readonly GUIContent textureFormat = new GUIContent("Format");
970
+
971
+ public readonly GUIContent defaultPlatform = new GUIContent("Default");
972
+ public readonly GUIContent mipmapFadeOutToggle = new GUIContent("Fadeout Mip Maps");
973
+ public readonly GUIContent mipmapFadeOut = new GUIContent("Fade Range");
974
+ public readonly GUIContent readWrite = new GUIContent("Read/Write Enabled", "Enable to be able to access the raw pixel data from code.");
975
+
976
+ public readonly GUIContent alphaSource = new GUIContent("Alpha Source", "How is the alpha generated for the imported texture.");
977
+ public readonly GUIContent[] alphaSourceOptions =
978
+ {
979
+ new GUIContent("None", "No Alpha will be used."),
980
+ new GUIContent("Input Texture Alpha", "Use Alpha from the input texture if one is provided."),
981
+ new GUIContent("From Gray Scale", "Generate Alpha from image gray scale."),
982
+ };
983
+ public readonly int[] alphaSourceValues =
984
+ {
985
+ (int)TextureImporterAlphaSource.None,
986
+ (int)TextureImporterAlphaSource.FromInput,
987
+ (int)TextureImporterAlphaSource.FromGrayScale,
988
+ };
989
+
990
+ public readonly GUIContent generateMipMaps = new GUIContent("Generate Mip Maps");
991
+ public readonly GUIContent sRGBTexture = new GUIContent("sRGB (Color Texture)", "Texture content is stored in gamma space. Non-HDR color textures should enable this flag (except if used for IMGUI).");
992
+ public readonly GUIContent borderMipMaps = new GUIContent("Border Mip Maps");
993
+ public readonly GUIContent mipMapsPreserveCoverage = new GUIContent("Mip Maps Preserve Coverage", "The alpha channel of generated Mip Maps will preserve coverage during the alpha test.");
994
+ public readonly GUIContent alphaTestReferenceValue = new GUIContent("Alpha Cutoff Value", "The reference value used during the alpha test. Controls Mip Map coverage.");
995
+ public readonly GUIContent mipMapFilter = new GUIContent("Mip Map Filtering");
996
+ public readonly GUIContent[] mipMapFilterOptions =
997
+ {
998
+ new GUIContent("Box"),
999
+ new GUIContent("Kaiser"),
1000
+ };
1001
+ public readonly GUIContent npot = new GUIContent("Non Power of 2", "How non-power-of-two textures are scaled on import.");
1002
+
1003
+ public readonly GUIContent compressionQuality = new GUIContent("Compressor Quality");
1004
+ public readonly GUIContent compressionQualitySlider = new GUIContent("Compressor Quality", "Use the slider to adjust compression quality from 0 (Fastest) to 100 (Best)");
1005
+ public readonly GUIContent[] mobileCompressionQualityOptions =
1006
+ {
1007
+ new GUIContent("Fast"),
1008
+ new GUIContent("Normal"),
1009
+ new GUIContent("Best")
1010
+ };
1011
+
1012
+ public readonly GUIContent spriteMode = new GUIContent("Sprite Mode");
1013
+ public readonly GUIContent[] spriteModeOptions =
1014
+ {
1015
+ new GUIContent("Single"),
1016
+ new GUIContent("Multiple"),
1017
+ new GUIContent("Polygon"),
1018
+ };
1019
+ public readonly GUIContent[] spriteMeshTypeOptions =
1020
+ {
1021
+ new GUIContent("Full Rect"),
1022
+ new GUIContent("Tight"),
1023
+ };
1024
+
1025
+ public readonly GUIContent spritePackingTag = new GUIContent("Packing Tag", "Tag for the Sprite Packing system.");
1026
+ public readonly GUIContent spritePixelsPerUnit = new GUIContent("Pixels Per Unit", "How many pixels in the sprite correspond to one unit in the world.");
1027
+ public readonly GUIContent spriteExtrude = new GUIContent("Extrude Edges", "How much empty area to leave around the sprite in the generated mesh.");
1028
+ public readonly GUIContent spriteMeshType = new GUIContent("Mesh Type", "Type of sprite mesh to generate.");
1029
+ public readonly GUIContent spriteAlignment = new GUIContent("Pivot", "Sprite pivot point in its local space. May be used for syncing animation frames of different sizes.");
1030
+ public readonly GUIContent characterAlignment = new GUIContent("Pivot", "Character pivot point in its local space using normalized value i.e. 0 - 1");
1031
+
1032
+ public readonly GUIContent[] spriteAlignmentOptions =
1033
+ {
1034
+ new GUIContent("Center"),
1035
+ new GUIContent("Top Left"),
1036
+ new GUIContent("Top"),
1037
+ new GUIContent("Top Right"),
1038
+ new GUIContent("Left"),
1039
+ new GUIContent("Right"),
1040
+ new GUIContent("Bottom Left"),
1041
+ new GUIContent("Bottom"),
1042
+ new GUIContent("Bottom Right"),
1043
+ new GUIContent("Custom"),
1044
+ };
1045
+
1046
+ public readonly GUIContent warpNotSupportWarning = new GUIContent("Graphics device doesn't support Repeat wrap mode on NPOT textures. Falling back to Clamp.");
1047
+ public readonly GUIContent anisoLevelLabel = new GUIContent("Aniso Level");
1048
+ public readonly GUIContent anisotropicDisableInfo = new GUIContent("Anisotropic filtering is disabled for all textures in Quality Settings.");
1049
+ public readonly GUIContent anisotropicForceEnableInfo = new GUIContent("Anisotropic filtering is enabled for all textures in Quality Settings.");
1050
+ public readonly GUIContent unappliedSettingsDialogTitle = new GUIContent("Unapplied import settings");
1051
+ public readonly GUIContent unappliedSettingsDialogContent = new GUIContent("Unapplied import settings for \'{0}\'.\nApply and continue to sprite editor or cancel.");
1052
+ public readonly GUIContent applyButtonLabel = new GUIContent("Apply");
1053
+ public readonly GUIContent revertButtonLabel = new GUIContent("Revert");
1054
+ public readonly GUIContent spriteEditorButtonLabel = new GUIContent("Sprite Editor");
1055
+ public readonly GUIContent resliceFromLayerWarning = new GUIContent("This will reinitialize and recreate all Sprites based on the file’s layer data. Existing Sprite metadata from previously generated Sprites are copied over.");
1056
+ public readonly GUIContent alphaIsTransparency = new GUIContent("Alpha Is Transparency", "If the provided alpha channel is transparency, enable this to pre-filter the color to avoid texture filtering artifacts. This is not supported for HDR textures.");
1057
+ public readonly GUIContent etc1Compression = new GUIContent("Compress using ETC1 (split alpha channel)|Alpha for this texture will be preserved by splitting the alpha channel to another texture, and both resulting textures will be compressed using ETC1.");
1058
+ public readonly GUIContent crunchedCompression = new GUIContent("Use Crunch Compression", "Texture is crunch-compressed to save space on disk when applicable.");
1059
+
1060
+ public readonly GUIContent showAdvanced = new GUIContent("Advanced", "Show advanced settings.");
1061
+
1062
+ public readonly GUIContent platformSettingsLabel = new GUIContent("Platform Setttings");
1063
+
1064
+ public readonly GUIContent[] platformSettingsSelection;
1065
+
1066
+ public readonly GUIContent wrapModeLabel = new GUIContent("Wrap Mode");
1067
+ public readonly GUIContent wrapU = new GUIContent("U axis");
1068
+ public readonly GUIContent wrapV = new GUIContent("V axis");
1069
+ public readonly GUIContent wrapW = new GUIContent("W axis");
1070
+
1071
+
1072
+ public readonly GUIContent[] wrapModeContents =
1073
+ {
1074
+ new GUIContent("Repeat"),
1075
+ new GUIContent("Clamp"),
1076
+ new GUIContent("Mirror"),
1077
+ new GUIContent("Mirror Once"),
1078
+ new GUIContent("Per-axis")
1079
+ };
1080
+ public readonly int[] wrapModeValues =
1081
+ {
1082
+ (int)TextureWrapMode.Repeat,
1083
+ (int)TextureWrapMode.Clamp,
1084
+ (int)TextureWrapMode.Mirror,
1085
+ (int)TextureWrapMode.MirrorOnce,
1086
+ -1
1087
+ };
1088
+
1089
+ public readonly GUIContent importHiddenLayer = new GUIContent(L10n.Tr("Import Hidden"), L10n.Tr("Import hidden layers"));
1090
+ public readonly GUIContent mosaicLayers = new GUIContent(L10n.Tr("Mosaic"), L10n.Tr("Layers will be imported as individual Sprites"));
1091
+ public readonly GUIContent characterMode = new GUIContent(L10n.Tr("Character Rig"), L10n.Tr("Enable to support 2D Animation character rigging"));
1092
+ public readonly GUIContent generateGOHierarchy = new GUIContent(L10n.Tr("Use Layer Grouping"), L10n.Tr("GameObjects are grouped according to source file layer grouping"));
1093
+ public readonly GUIContent resliceFromLayer = new GUIContent(L10n.Tr("Reslice"), L10n.Tr("Recreate Sprite rects from file"));
1094
+ public readonly GUIContent paperDollMode = new GUIContent(L10n.Tr("Paper Doll Mode"), L10n.Tr("Special mode to generate a Prefab for Paper Doll use case"));
1095
+ public readonly GUIContent experimental = new GUIContent(L10n.Tr("Experimental"));
1096
+ public readonly GUIContent keepDuplicateSpriteName = new GUIContent(L10n.Tr("Keep Duplicate Name"), L10n.Tr("Keep Sprite name same as Layer Name even if there are duplicated Layer Name"));
1097
+
1098
+ public Styles()
1099
+ {
1100
+ // This is far from ideal, but it's better than having tons of logic in the GUI code itself.
1101
+ // The combination should not grow too much anyway since only Texture3D will be added later.
1102
+ GUIContent[] s2D_Options = { textureShape2D };
1103
+ GUIContent[] sCube_Options = { textureShapeCube };
1104
+ GUIContent[] s2D_Cube_Options = { textureShape2D, textureShapeCube };
1105
+ textureShapeOptionsDictionnary.Add(TextureImporterShape.Texture2D, s2D_Options);
1106
+ textureShapeOptionsDictionnary.Add(TextureImporterShape.TextureCube, sCube_Options);
1107
+ textureShapeOptionsDictionnary.Add(TextureImporterShape.Texture2D | TextureImporterShape.TextureCube, s2D_Cube_Options);
1108
+
1109
+ int[] s2D_Values = { (int)TextureImporterShape.Texture2D };
1110
+ int[] sCube_Values = { (int)TextureImporterShape.TextureCube };
1111
+ int[] s2D_Cube_Values = { (int)TextureImporterShape.Texture2D, (int)TextureImporterShape.TextureCube };
1112
+ textureShapeValuesDictionnary.Add(TextureImporterShape.Texture2D, s2D_Values);
1113
+ textureShapeValuesDictionnary.Add(TextureImporterShape.TextureCube, sCube_Values);
1114
+ textureShapeValuesDictionnary.Add(TextureImporterShape.Texture2D | TextureImporterShape.TextureCube, s2D_Cube_Values);
1115
+
1116
+ platformSettingsSelection = new GUIContent[TexturePlatformSettingsModal.kValidBuildPlatform.Length];
1117
+ for (int i = 0; i < TexturePlatformSettingsModal.kValidBuildPlatform.Length; ++i)
1118
+ {
1119
+ platformSettingsSelection[i] = new GUIContent(TexturePlatformSettingsModal.kValidBuildPlatform[i].buildTargetName);
1120
+ }
1121
+ }
1122
+ }
1123
+
1124
+ internal static Styles s_Styles;
1125
+ }
1126
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.psdimporter@4.0.2/Editor/PSDImporterEditor.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 18bf2b24e4cf52b4db1d73f71d4bd76b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/Shaders/Sprites-Inspector.shader ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Texture is forced to be in Gamma space regardless of the active ColorSpace.
2
+ Shader "Hidden/InternalSpritesInspector"
3
+ {
4
+ Properties
5
+ {
6
+ [PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
7
+ _Color("Tint", Color) = (1, 1, 1, 1)
8
+ [MaterialToggle] PixelSnap("Pixel snap", Float) = 0
9
+ }
10
+
11
+ SubShader
12
+ {
13
+ Tags
14
+ {
15
+ "Queue" = "Transparent"
16
+ "IgnoreProjector" = "True"
17
+ "RenderType" = "Transparent"
18
+ "PreviewType" = "Plane"
19
+ "CanUseSpriteAtlas" = "True"
20
+ }
21
+
22
+ Cull Off
23
+ Lighting Off
24
+ ZWrite Off
25
+ Fog{ Mode Off }
26
+ Blend SrcAlpha OneMinusSrcAlpha
27
+
28
+ Pass
29
+ {
30
+
31
+ CGPROGRAM
32
+ #pragma vertex vert
33
+ #pragma fragment frag
34
+ #pragma multi_compile DUMMY PIXELSNAP_ON
35
+ #include "UnityCG.cginc"
36
+
37
+ uniform bool _AdjustLinearForGamma;
38
+
39
+ struct appdata_t
40
+ {
41
+ float4 vertex : POSITION;
42
+ float4 color : COLOR;
43
+ float2 texcoord : TEXCOORD0;
44
+ };
45
+
46
+ struct v2f
47
+ {
48
+ float4 vertex : SV_POSITION;
49
+ fixed4 color : COLOR;
50
+ half2 texcoord : TEXCOORD0;
51
+ float2 clipUV : TEXCOORD1;
52
+ };
53
+
54
+ fixed4 _Color;
55
+ uniform float4x4 unity_GUIClipTextureMatrix;
56
+
57
+ v2f vert(appdata_t IN)
58
+ {
59
+ float3 screenUV = UnityObjectToViewPos(IN.vertex);
60
+ v2f OUT;
61
+ OUT.vertex = UnityObjectToClipPos(IN.vertex);
62
+ OUT.texcoord = IN.texcoord;
63
+ OUT.color = IN.color * _Color;
64
+ OUT.clipUV = mul(unity_GUIClipTextureMatrix, float4(screenUV.xy, 0, 1.0));
65
+ return OUT;
66
+ }
67
+
68
+ sampler2D _MainTex;
69
+ sampler2D _GUIClipTexture;
70
+
71
+ fixed4 frag(v2f IN) : COLOR
72
+ {
73
+ fixed4 col = tex2D(_MainTex, IN.texcoord);
74
+ fixed alpha = col.a;
75
+ if (_AdjustLinearForGamma)
76
+ col.rgb = LinearToGammaSpace(col.rgb);
77
+ col.a = alpha * tex2D(_GUIClipTexture, IN.clipUV).a;
78
+ return col * IN.color;
79
+ }
80
+ ENDCG
81
+ }
82
+ }
83
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Textures/Sprite Shape Corner.png.meta ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 608e61deb05c54660bebf5a4dd2ee02d
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 11
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ vTOnly: 0
27
+ grayScaleToAlpha: 0
28
+ generateCubemap: 6
29
+ cubemapConvolution: 0
30
+ seamlessCubemap: 0
31
+ textureFormat: 1
32
+ maxTextureSize: 2048
33
+ textureSettings:
34
+ serializedVersion: 2
35
+ filterMode: -1
36
+ aniso: -1
37
+ mipBias: -100
38
+ wrapU: 1
39
+ wrapV: 1
40
+ wrapW: 1
41
+ nPOTScale: 0
42
+ lightmap: 0
43
+ compressionQuality: 50
44
+ spriteMode: 1
45
+ spriteExtrude: 1
46
+ spriteMeshType: 0
47
+ alignment: 0
48
+ spritePivot: {x: 0.5, y: 0.5}
49
+ spritePixelsToUnits: 256
50
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
51
+ spriteGenerateFallbackPhysicsShape: 1
52
+ alphaUsage: 1
53
+ alphaIsTransparency: 1
54
+ spriteTessellationDetail: -1
55
+ textureType: 8
56
+ textureShape: 1
57
+ singleChannelComponent: 0
58
+ maxTextureSizeSet: 0
59
+ compressionQualitySet: 0
60
+ textureFormatSet: 0
61
+ ignorePngGamma: 0
62
+ applyGammaDecoding: 0
63
+ platformSettings:
64
+ - serializedVersion: 3
65
+ buildTarget: DefaultTexturePlatform
66
+ maxTextureSize: 2048
67
+ resizeAlgorithm: 0
68
+ textureFormat: -1
69
+ textureCompression: 1
70
+ compressionQuality: 50
71
+ crunchedCompression: 0
72
+ allowsAlphaSplitting: 0
73
+ overridden: 0
74
+ androidETC2FallbackOverride: 0
75
+ forceMaximumCompressionQuality_BC6H_BC7: 0
76
+ - serializedVersion: 3
77
+ buildTarget: Standalone
78
+ maxTextureSize: 2048
79
+ resizeAlgorithm: 0
80
+ textureFormat: -1
81
+ textureCompression: 1
82
+ compressionQuality: 50
83
+ crunchedCompression: 0
84
+ allowsAlphaSplitting: 0
85
+ overridden: 0
86
+ androidETC2FallbackOverride: 0
87
+ forceMaximumCompressionQuality_BC6H_BC7: 0
88
+ - serializedVersion: 3
89
+ buildTarget: iPhone
90
+ maxTextureSize: 2048
91
+ resizeAlgorithm: 0
92
+ textureFormat: -1
93
+ textureCompression: 1
94
+ compressionQuality: 50
95
+ crunchedCompression: 0
96
+ allowsAlphaSplitting: 0
97
+ overridden: 0
98
+ androidETC2FallbackOverride: 0
99
+ forceMaximumCompressionQuality_BC6H_BC7: 0
100
+ - serializedVersion: 3
101
+ buildTarget: Android
102
+ maxTextureSize: 2048
103
+ resizeAlgorithm: 0
104
+ textureFormat: -1
105
+ textureCompression: 1
106
+ compressionQuality: 50
107
+ crunchedCompression: 0
108
+ allowsAlphaSplitting: 0
109
+ overridden: 0
110
+ androidETC2FallbackOverride: 0
111
+ forceMaximumCompressionQuality_BC6H_BC7: 0
112
+ spriteSheet:
113
+ serializedVersion: 2
114
+ sprites: []
115
+ outline: []
116
+ physicsShape: []
117
+ bones: []
118
+ spriteID: 5e97eb03825dee720800000000000000
119
+ internalID: 0
120
+ vertices: []
121
+ indices:
122
+ edges: []
123
+ weights: []
124
+ secondaryTextures: []
125
+ spritePackingTag:
126
+ pSDRemoveMatte: 0
127
+ pSDShowRemoveMatteOption: 0
128
+ userData:
129
+ assetBundleName:
130
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Textures/Sprite Shape Fill.png.meta ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: b281b91a70a624a0da1c43adc1c30c7b
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 11
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ vTOnly: 0
27
+ grayScaleToAlpha: 0
28
+ generateCubemap: 6
29
+ cubemapConvolution: 0
30
+ seamlessCubemap: 0
31
+ textureFormat: 1
32
+ maxTextureSize: 2048
33
+ textureSettings:
34
+ serializedVersion: 2
35
+ filterMode: -1
36
+ aniso: -1
37
+ mipBias: -100
38
+ wrapU: 0
39
+ wrapV: 0
40
+ wrapW: 0
41
+ nPOTScale: 0
42
+ lightmap: 0
43
+ compressionQuality: 50
44
+ spriteMode: 1
45
+ spriteExtrude: 1
46
+ spriteMeshType: 0
47
+ alignment: 0
48
+ spritePivot: {x: 0.5, y: 0.5}
49
+ spritePixelsToUnits: 256
50
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
51
+ spriteGenerateFallbackPhysicsShape: 1
52
+ alphaUsage: 1
53
+ alphaIsTransparency: 1
54
+ spriteTessellationDetail: -1
55
+ textureType: 8
56
+ textureShape: 1
57
+ singleChannelComponent: 0
58
+ maxTextureSizeSet: 0
59
+ compressionQualitySet: 0
60
+ textureFormatSet: 0
61
+ ignorePngGamma: 0
62
+ applyGammaDecoding: 0
63
+ platformSettings:
64
+ - serializedVersion: 3
65
+ buildTarget: DefaultTexturePlatform
66
+ maxTextureSize: 2048
67
+ resizeAlgorithm: 0
68
+ textureFormat: -1
69
+ textureCompression: 1
70
+ compressionQuality: 50
71
+ crunchedCompression: 0
72
+ allowsAlphaSplitting: 0
73
+ overridden: 0
74
+ androidETC2FallbackOverride: 0
75
+ forceMaximumCompressionQuality_BC6H_BC7: 0
76
+ - serializedVersion: 3
77
+ buildTarget: Standalone
78
+ maxTextureSize: 2048
79
+ resizeAlgorithm: 0
80
+ textureFormat: -1
81
+ textureCompression: 1
82
+ compressionQuality: 50
83
+ crunchedCompression: 0
84
+ allowsAlphaSplitting: 0
85
+ overridden: 0
86
+ androidETC2FallbackOverride: 0
87
+ forceMaximumCompressionQuality_BC6H_BC7: 0
88
+ - serializedVersion: 3
89
+ buildTarget: iPhone
90
+ maxTextureSize: 2048
91
+ resizeAlgorithm: 0
92
+ textureFormat: -1
93
+ textureCompression: 1
94
+ compressionQuality: 50
95
+ crunchedCompression: 0
96
+ allowsAlphaSplitting: 0
97
+ overridden: 0
98
+ androidETC2FallbackOverride: 0
99
+ forceMaximumCompressionQuality_BC6H_BC7: 0
100
+ - serializedVersion: 3
101
+ buildTarget: Android
102
+ maxTextureSize: 2048
103
+ resizeAlgorithm: 0
104
+ textureFormat: -1
105
+ textureCompression: 1
106
+ compressionQuality: 50
107
+ crunchedCompression: 0
108
+ allowsAlphaSplitting: 0
109
+ overridden: 0
110
+ androidETC2FallbackOverride: 0
111
+ forceMaximumCompressionQuality_BC6H_BC7: 0
112
+ spriteSheet:
113
+ serializedVersion: 2
114
+ sprites: []
115
+ outline: []
116
+ physicsShape: []
117
+ bones: []
118
+ spriteID: 5e97eb03825dee720800000000000000
119
+ internalID: 0
120
+ vertices: []
121
+ indices:
122
+ edges: []
123
+ weights: []
124
+ secondaryTextures: []
125
+ spritePackingTag:
126
+ pSDRemoveMatte: 0
127
+ pSDShowRemoveMatteOption: 0
128
+ userData:
129
+ assetBundleName:
130
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9214d94ab547c5447a11c7a7c6a59482
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Dict.cs ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3
+ ** Copyright (C) 2011 Silicon Graphics, Inc.
4
+ ** All Rights Reserved.
5
+ **
6
+ ** Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ ** of this software and associated documentation files (the "Software"), to deal
8
+ ** in the Software without restriction, including without limitation the rights
9
+ ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10
+ ** of the Software, and to permit persons to whom the Software is furnished to do so,
11
+ ** subject to the following conditions:
12
+ **
13
+ ** The above copyright notice including the dates of first publication and either this
14
+ ** permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be
15
+ ** included in all copies or substantial portions of the Software.
16
+ **
17
+ ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
+ ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19
+ ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC.
20
+ ** BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22
+ ** OR OTHER DEALINGS IN THE SOFTWARE.
23
+ **
24
+ ** Except as contained in this notice, the name of Silicon Graphics, Inc. shall not
25
+ ** be used in advertising or otherwise to promote the sale, use or other dealings in
26
+ ** this Software without prior written authorization from Silicon Graphics, Inc.
27
+ */
28
+ /*
29
+ ** Original Author: Eric Veach, July 1994.
30
+ ** libtess2: Mikko Mononen, http://code.google.com/p/libtess2/.
31
+ ** LibTessDotNet: Remi Gillig, https://github.com/speps/LibTessDotNet
32
+ */
33
+
34
+ namespace Unity.SpriteShape.External
35
+ {
36
+
37
+ namespace LibTessDotNet
38
+ {
39
+ internal class Dict<TValue> where TValue : class
40
+ {
41
+ public class Node
42
+ {
43
+ internal TValue _key;
44
+ internal Node _prev, _next;
45
+
46
+ public TValue Key { get { return _key; } }
47
+ public Node Prev { get { return _prev; } }
48
+ public Node Next { get { return _next; } }
49
+ }
50
+
51
+ public delegate bool LessOrEqual(TValue lhs, TValue rhs);
52
+
53
+ private LessOrEqual _leq;
54
+ Node _head;
55
+
56
+ public Dict(LessOrEqual leq)
57
+ {
58
+ _leq = leq;
59
+
60
+ _head = new Node { _key = null };
61
+ _head._prev = _head;
62
+ _head._next = _head;
63
+ }
64
+
65
+ public Node Insert(TValue key)
66
+ {
67
+ return InsertBefore(_head, key);
68
+ }
69
+
70
+ public Node InsertBefore(Node node, TValue key)
71
+ {
72
+ do {
73
+ node = node._prev;
74
+ } while (node._key != null && !_leq(node._key, key));
75
+
76
+ var newNode = new Node { _key = key };
77
+ newNode._next = node._next;
78
+ node._next._prev = newNode;
79
+ newNode._prev = node;
80
+ node._next = newNode;
81
+
82
+ return newNode;
83
+ }
84
+
85
+ public Node Find(TValue key)
86
+ {
87
+ var node = _head;
88
+ do {
89
+ node = node._next;
90
+ } while (node._key != null && !_leq(key, node._key));
91
+ return node;
92
+ }
93
+
94
+ public Node Min()
95
+ {
96
+ return _head._next;
97
+ }
98
+
99
+ public void Remove(Node node)
100
+ {
101
+ node._next._prev = node._prev;
102
+ node._prev._next = node._next;
103
+ }
104
+ }
105
+ }
106
+
107
+ } // namespace Unity.VectorGraphics.External
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Dict.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: d1f51a5b71c3ce943b689d3664e4d5fd
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Geom.cs ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3
+ ** Copyright (C) 2011 Silicon Graphics, Inc.
4
+ ** All Rights Reserved.
5
+ **
6
+ ** Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ ** of this software and associated documentation files (the "Software"), to deal
8
+ ** in the Software without restriction, including without limitation the rights
9
+ ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10
+ ** of the Software, and to permit persons to whom the Software is furnished to do so,
11
+ ** subject to the following conditions:
12
+ **
13
+ ** The above copyright notice including the dates of first publication and either this
14
+ ** permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be
15
+ ** included in all copies or substantial portions of the Software.
16
+ **
17
+ ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
+ ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19
+ ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC.
20
+ ** BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22
+ ** OR OTHER DEALINGS IN THE SOFTWARE.
23
+ **
24
+ ** Except as contained in this notice, the name of Silicon Graphics, Inc. shall not
25
+ ** be used in advertising or otherwise to promote the sale, use or other dealings in
26
+ ** this Software without prior written authorization from Silicon Graphics, Inc.
27
+ */
28
+ /*
29
+ ** Original Author: Eric Veach, July 1994.
30
+ ** libtess2: Mikko Mononen, http://code.google.com/p/libtess2/.
31
+ ** LibTessDotNet: Remi Gillig, https://github.com/speps/LibTessDotNet
32
+ */
33
+
34
+ using System;
35
+ using System.Diagnostics;
36
+
37
+ namespace Unity.SpriteShape.External
38
+ {
39
+
40
+ using Real = System.Single;
41
+ namespace LibTessDotNet
42
+ {
43
+ internal static class Geom
44
+ {
45
+ public static bool IsWindingInside(WindingRule rule, int n)
46
+ {
47
+ switch (rule)
48
+ {
49
+ case WindingRule.EvenOdd:
50
+ return (n & 1) == 1;
51
+ case WindingRule.NonZero:
52
+ return n != 0;
53
+ case WindingRule.Positive:
54
+ return n > 0;
55
+ case WindingRule.Negative:
56
+ return n < 0;
57
+ case WindingRule.AbsGeqTwo:
58
+ return n >= 2 || n <= -2;
59
+ }
60
+ throw new Exception("Wrong winding rule");
61
+ }
62
+
63
+ public static bool VertCCW(MeshUtils.Vertex u, MeshUtils.Vertex v, MeshUtils.Vertex w)
64
+ {
65
+ return (u._s * (v._t - w._t) + v._s * (w._t - u._t) + w._s * (u._t - v._t)) >= 0.0f;
66
+ }
67
+ public static bool VertEq(MeshUtils.Vertex lhs, MeshUtils.Vertex rhs)
68
+ {
69
+ return lhs._s == rhs._s && lhs._t == rhs._t;
70
+ }
71
+ public static bool VertLeq(MeshUtils.Vertex lhs, MeshUtils.Vertex rhs)
72
+ {
73
+ return (lhs._s < rhs._s) || (lhs._s == rhs._s && lhs._t <= rhs._t);
74
+ }
75
+
76
+ /// <summary>
77
+ /// Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w),
78
+ /// evaluates the t-coord of the edge uw at the s-coord of the vertex v.
79
+ /// Returns v->t - (uw)(v->s), ie. the signed distance from uw to v.
80
+ /// If uw is vertical (and thus passes thru v), the result is zero.
81
+ ///
82
+ /// The calculation is extremely accurate and stable, even when v
83
+ /// is very close to u or w. In particular if we set v->t = 0 and
84
+ /// let r be the negated result (this evaluates (uw)(v->s)), then
85
+ /// r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t).
86
+ /// </summary>
87
+ public static Real EdgeEval(MeshUtils.Vertex u, MeshUtils.Vertex v, MeshUtils.Vertex w)
88
+ {
89
+ Debug.Assert(VertLeq(u, v) && VertLeq(v, w));
90
+
91
+ var gapL = v._s - u._s;
92
+ var gapR = w._s - v._s;
93
+
94
+ if (gapL + gapR > 0.0f)
95
+ {
96
+ if (gapL < gapR)
97
+ {
98
+ return (v._t - u._t) + (u._t - w._t) * (gapL / (gapL + gapR));
99
+ }
100
+ else
101
+ {
102
+ return (v._t - w._t) + (w._t - u._t) * (gapR / (gapL + gapR));
103
+ }
104
+ }
105
+ /* vertical line */
106
+ return 0;
107
+ }
108
+
109
+ /// <summary>
110
+ /// Returns a number whose sign matches EdgeEval(u,v,w) but which
111
+ /// is cheaper to evaluate. Returns > 0, == 0 , or < 0
112
+ /// as v is above, on, or below the edge uw.
113
+ /// </summary>
114
+ public static Real EdgeSign(MeshUtils.Vertex u, MeshUtils.Vertex v, MeshUtils.Vertex w)
115
+ {
116
+ Debug.Assert(VertLeq(u, v) && VertLeq(v, w));
117
+
118
+ var gapL = v._s - u._s;
119
+ var gapR = w._s - v._s;
120
+
121
+ if (gapL + gapR > 0.0f)
122
+ {
123
+ return (v._t - w._t) * gapL + (v._t - u._t) * gapR;
124
+ }
125
+ /* vertical line */
126
+ return 0;
127
+ }
128
+
129
+ public static bool TransLeq(MeshUtils.Vertex lhs, MeshUtils.Vertex rhs)
130
+ {
131
+ return (lhs._t < rhs._t) || (lhs._t == rhs._t && lhs._s <= rhs._s);
132
+ }
133
+
134
+ public static Real TransEval(MeshUtils.Vertex u, MeshUtils.Vertex v, MeshUtils.Vertex w)
135
+ {
136
+ Debug.Assert(TransLeq(u, v) && TransLeq(v, w));
137
+
138
+ var gapL = v._t - u._t;
139
+ var gapR = w._t - v._t;
140
+
141
+ if (gapL + gapR > 0.0f)
142
+ {
143
+ if (gapL < gapR)
144
+ {
145
+ return (v._s - u._s) + (u._s - w._s) * (gapL / (gapL + gapR));
146
+ }
147
+ else
148
+ {
149
+ return (v._s - w._s) + (w._s - u._s) * (gapR / (gapL + gapR));
150
+ }
151
+ }
152
+ /* vertical line */
153
+ return 0;
154
+ }
155
+
156
+ public static Real TransSign(MeshUtils.Vertex u, MeshUtils.Vertex v, MeshUtils.Vertex w)
157
+ {
158
+ Debug.Assert(TransLeq(u, v) && TransLeq(v, w));
159
+
160
+ var gapL = v._t - u._t;
161
+ var gapR = w._t - v._t;
162
+
163
+ if (gapL + gapR > 0.0f)
164
+ {
165
+ return (v._s - w._s) * gapL + (v._s - u._s) * gapR;
166
+ }
167
+ /* vertical line */
168
+ return 0;
169
+ }
170
+
171
+ public static bool EdgeGoesLeft(MeshUtils.Edge e)
172
+ {
173
+ return VertLeq(e._Dst, e._Org);
174
+ }
175
+
176
+ public static bool EdgeGoesRight(MeshUtils.Edge e)
177
+ {
178
+ return VertLeq(e._Org, e._Dst);
179
+ }
180
+
181
+ public static Real VertL1dist(MeshUtils.Vertex u, MeshUtils.Vertex v)
182
+ {
183
+ return Math.Abs(u._s - v._s) + Math.Abs(u._t - v._t);
184
+ }
185
+
186
+ public static void AddWinding(MeshUtils.Edge eDst, MeshUtils.Edge eSrc)
187
+ {
188
+ eDst._winding += eSrc._winding;
189
+ eDst._Sym._winding += eSrc._Sym._winding;
190
+ }
191
+
192
+ public static Real Interpolate(Real a, Real x, Real b, Real y)
193
+ {
194
+ if (a < 0.0f)
195
+ {
196
+ a = 0.0f;
197
+ }
198
+ if (b < 0.0f)
199
+ {
200
+ b = 0.0f;
201
+ }
202
+ return ((a <= b) ? ((b == 0.0f) ? ((x+y) / 2.0f)
203
+ : (x + (y-x) * (a/(a+b))))
204
+ : (y + (x-y) * (b/(a+b))));
205
+ }
206
+
207
+ static void Swap(ref MeshUtils.Vertex a, ref MeshUtils.Vertex b)
208
+ {
209
+ var tmp = a;
210
+ a = b;
211
+ b = tmp;
212
+ }
213
+
214
+ /// <summary>
215
+ /// Given edges (o1,d1) and (o2,d2), compute their point of intersection.
216
+ /// The computed point is guaranteed to lie in the intersection of the
217
+ /// bounding rectangles defined by each edge.
218
+ /// </summary>
219
+ public static void EdgeIntersect(MeshUtils.Vertex o1, MeshUtils.Vertex d1, MeshUtils.Vertex o2, MeshUtils.Vertex d2, MeshUtils.Vertex v)
220
+ {
221
+ // This is certainly not the most efficient way to find the intersection
222
+ // of two line segments, but it is very numerically stable.
223
+ //
224
+ // Strategy: find the two middle vertices in the VertLeq ordering,
225
+ // and interpolate the intersection s-value from these. Then repeat
226
+ // using the TransLeq ordering to find the intersection t-value.
227
+
228
+ if (!VertLeq(o1, d1)) { Swap(ref o1, ref d1); }
229
+ if (!VertLeq(o2, d2)) { Swap(ref o2, ref d2); }
230
+ if (!VertLeq(o1, o2)) { Swap(ref o1, ref o2); Swap(ref d1, ref d2); }
231
+
232
+ if (!VertLeq(o2, d1))
233
+ {
234
+ // Technically, no intersection -- do our best
235
+ v._s = (o2._s + d1._s) / 2.0f;
236
+ }
237
+ else if (VertLeq(d1, d2))
238
+ {
239
+ // Interpolate between o2 and d1
240
+ var z1 = EdgeEval(o1, o2, d1);
241
+ var z2 = EdgeEval(o2, d1, d2);
242
+ if (z1 + z2 < 0.0f)
243
+ {
244
+ z1 = -z1;
245
+ z2 = -z2;
246
+ }
247
+ v._s = Interpolate(z1, o2._s, z2, d1._s);
248
+ }
249
+ else
250
+ {
251
+ // Interpolate between o2 and d2
252
+ var z1 = EdgeSign(o1, o2, d1);
253
+ var z2 = -EdgeSign(o1, d2, d1);
254
+ if (z1 + z2 < 0.0f)
255
+ {
256
+ z1 = -z1;
257
+ z2 = -z2;
258
+ }
259
+ v._s = Interpolate(z1, o2._s, z2, d2._s);
260
+ }
261
+
262
+ // Now repeat the process for t
263
+
264
+ if (!TransLeq(o1, d1)) { Swap(ref o1, ref d1); }
265
+ if (!TransLeq(o2, d2)) { Swap(ref o2, ref d2); }
266
+ if (!TransLeq(o1, o2)) { Swap(ref o1, ref o2); Swap(ref d1, ref d2); }
267
+
268
+ if (!TransLeq(o2, d1))
269
+ {
270
+ // Technically, no intersection -- do our best
271
+ v._t = (o2._t + d1._t) / 2.0f;
272
+ }
273
+ else if (TransLeq(d1, d2))
274
+ {
275
+ // Interpolate between o2 and d1
276
+ var z1 = TransEval(o1, o2, d1);
277
+ var z2 = TransEval(o2, d1, d2);
278
+ if (z1 + z2 < 0.0f)
279
+ {
280
+ z1 = -z1;
281
+ z2 = -z2;
282
+ }
283
+ v._t = Interpolate(z1, o2._t, z2, d1._t);
284
+ }
285
+ else
286
+ {
287
+ // Interpolate between o2 and d2
288
+ var z1 = TransSign(o1, o2, d1);
289
+ var z2 = -TransSign(o1, d2, d1);
290
+ if (z1 + z2 < 0.0f)
291
+ {
292
+ z1 = -z1;
293
+ z2 = -z2;
294
+ }
295
+ v._t = Interpolate(z1, o2._t, z2, d2._t);
296
+ }
297
+ }
298
+ }
299
+ }
300
+
301
+ } // namespace Unity.VectorGraphics.External
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Geom.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 8eb4e2609b653584b88dc0ee64a2ba24
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/LICENSE.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
2
+ ** Copyright (C) 2011 Silicon Graphics, Inc.
3
+ ** All Rights Reserved.
4
+ **
5
+ ** Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ ** of this software and associated documentation files (the "Software"), to deal
7
+ ** in the Software without restriction, including without limitation the rights
8
+ ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ ** of the Software, and to permit persons to whom the Software is furnished to do so,
10
+ ** subject to the following conditions:
11
+ **
12
+ ** The above copyright notice including the dates of first publication and either this
13
+ ** permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be
14
+ ** included in all copies or substantial portions of the Software.
15
+ **
16
+ ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
17
+ ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
18
+ ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC.
19
+ ** BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
21
+ ** OR OTHER DEALINGS IN THE SOFTWARE.
22
+ **
23
+ ** Except as contained in this notice, the name of Silicon Graphics, Inc. shall not
24
+ ** be used in advertising or otherwise to promote the sale, use or other dealings in
25
+ ** this Software without prior written authorization from Silicon Graphics, Inc.
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/ArraySlice.cs ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Diagnostics;
3
+ using System.Runtime.InteropServices;
4
+ using Unity.Collections;
5
+ using Unity.Collections.LowLevel.Unsafe;
6
+
7
+ namespace UnityEngine.U2D
8
+ {
9
+
10
+ namespace UTess
11
+ {
12
+
13
+ [StructLayout(LayoutKind.Sequential)]
14
+ [DebuggerDisplay("Length = {Length}")]
15
+ internal unsafe struct ArraySlice<T> : System.IEquatable<ArraySlice<T>> where T : struct
16
+ {
17
+ [NativeDisableUnsafePtrRestriction] internal byte* m_Buffer;
18
+ internal int m_Stride;
19
+ internal int m_Length;
20
+
21
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
22
+ internal int m_MinIndex;
23
+ internal int m_MaxIndex;
24
+ internal AtomicSafetyHandle m_Safety;
25
+ #endif
26
+
27
+ public ArraySlice(NativeArray<T> array, int start, int length)
28
+ {
29
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
30
+ if (start < 0)
31
+ throw new ArgumentOutOfRangeException(nameof(start), $"Slice start {start} < 0.");
32
+ if (length < 0)
33
+ throw new ArgumentOutOfRangeException(nameof(length), $"Slice length {length} < 0.");
34
+ if (start + length > array.Length)
35
+ throw new ArgumentException(
36
+ $"Slice start + length ({start + length}) range must be <= array.Length ({array.Length})");
37
+ m_MinIndex = 0;
38
+ m_MaxIndex = length - 1;
39
+ m_Safety = Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility.GetAtomicSafetyHandle(array);
40
+ #endif
41
+
42
+ m_Stride = UnsafeUtility.SizeOf<T>();
43
+ var ptr = (byte*) array.GetUnsafePtr() + m_Stride * start;
44
+ m_Buffer = ptr;
45
+ m_Length = length;
46
+ }
47
+
48
+ public bool Equals(ArraySlice<T> other)
49
+ {
50
+ return m_Buffer == other.m_Buffer && m_Stride == other.m_Stride && m_Length == other.m_Length;
51
+ }
52
+
53
+ public override bool Equals(object obj)
54
+ {
55
+ if (ReferenceEquals(null, obj)) return false;
56
+ return obj is ArraySlice<T> && Equals((ArraySlice<T>) obj);
57
+ }
58
+
59
+ public override int GetHashCode()
60
+ {
61
+ unchecked
62
+ {
63
+ var hashCode = (int) m_Buffer;
64
+ hashCode = (hashCode * 397) ^ m_Stride;
65
+ hashCode = (hashCode * 397) ^ m_Length;
66
+ return hashCode;
67
+ }
68
+ }
69
+
70
+ public static bool operator ==(ArraySlice<T> left, ArraySlice<T> right)
71
+ {
72
+ return left.Equals(right);
73
+ }
74
+
75
+ public static bool operator !=(ArraySlice<T> left, ArraySlice<T> right)
76
+ {
77
+ return !left.Equals(right);
78
+ }
79
+
80
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
81
+ // These are double-whammy excluded to we can elide bounds checks in the Burst disassembly view
82
+ [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
83
+ void CheckReadIndex(int index)
84
+ {
85
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
86
+ if (index < m_MinIndex || index > m_MaxIndex)
87
+ FailOutOfRangeError(index);
88
+ #endif
89
+ }
90
+
91
+ [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
92
+ void CheckWriteIndex(int index)
93
+ {
94
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
95
+ if (index < m_MinIndex || index > m_MaxIndex)
96
+ FailOutOfRangeError(index);
97
+ #endif
98
+ }
99
+
100
+ [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
101
+ private void FailOutOfRangeError(int index)
102
+ {
103
+ if (index < Length && (m_MinIndex != 0 || m_MaxIndex != Length - 1))
104
+ throw new System.IndexOutOfRangeException(
105
+ $"Index {index} is out of restricted IJobParallelFor range [{m_MinIndex}...{m_MaxIndex}] in ReadWriteBuffer.\n" +
106
+ "ReadWriteBuffers are restricted to only read & write the element at the job index. " +
107
+ "You can use double buffering strategies to avoid race conditions due to " +
108
+ "reading & writing in parallel to the same elements from a job.");
109
+
110
+ throw new System.IndexOutOfRangeException($"Index {index} is out of range of '{Length}' Length.");
111
+ }
112
+
113
+ #endif
114
+
115
+ public static unsafe ArraySlice<T> ConvertExistingDataToArraySlice(void* dataPointer, int stride, int length)
116
+ {
117
+ if (length < 0)
118
+ throw new System.ArgumentException($"Invalid length of '{length}'. It must be greater than 0.",
119
+ nameof(length));
120
+ if (stride < 0)
121
+ throw new System.ArgumentException($"Invalid stride '{stride}'. It must be greater than 0.",
122
+ nameof(stride));
123
+
124
+ var newSlice = new ArraySlice<T>
125
+ {
126
+ m_Stride = stride,
127
+ m_Buffer = (byte*) dataPointer,
128
+ m_Length = length,
129
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
130
+ m_MinIndex = 0,
131
+ m_MaxIndex = length - 1,
132
+ #endif
133
+ };
134
+
135
+ return newSlice;
136
+ }
137
+
138
+ public T this[int index]
139
+ {
140
+ get
141
+ {
142
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
143
+ CheckReadIndex(index);
144
+ #endif
145
+ return UnsafeUtility.ReadArrayElementWithStride<T>(m_Buffer, index, m_Stride);
146
+ }
147
+
148
+ [WriteAccessRequired]
149
+ set
150
+ {
151
+ #if ENABLE_UNITY_COLLECTIONS_CHECKS
152
+ CheckWriteIndex(index);
153
+ #endif
154
+ UnsafeUtility.WriteArrayElementWithStride(m_Buffer, index, m_Stride, value);
155
+ }
156
+ }
157
+
158
+ public int Stride => m_Stride;
159
+ public int Length => m_Length;
160
+
161
+ }
162
+
163
+ }
164
+
165
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/ArraySlice.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 39b2d71389cf61842bdac5523826301a
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/Tessellator.cs ADDED
@@ -0,0 +1,1117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using Unity.Collections;
4
+ using Unity.Mathematics;
5
+ using Unity.Collections.LowLevel.Unsafe;
6
+
7
+ namespace UnityEngine.U2D
8
+ {
9
+
10
+ namespace UTess
11
+ {
12
+
13
+ enum TessEventType
14
+ {
15
+ EVENT_POINT = 0,
16
+ EVENT_END = 1,
17
+ EVENT_START = 2,
18
+ };
19
+
20
+ struct TessEdge
21
+ {
22
+ public int a;
23
+ public int b;
24
+ };
25
+
26
+ struct TessEvent
27
+ {
28
+ public float2 a;
29
+ public float2 b;
30
+ public int idx;
31
+ public int type;
32
+ };
33
+
34
+ struct TessHull
35
+ {
36
+ public float2 a;
37
+ public float2 b;
38
+ public int idx;
39
+
40
+ public ArraySlice<int> ilarray;
41
+ public int ilcount;
42
+ public ArraySlice<int> iuarray;
43
+ public int iucount;
44
+ };
45
+
46
+ struct TessCell
47
+ {
48
+ public int a;
49
+ public int b;
50
+ public int c;
51
+ };
52
+
53
+ struct TessStar
54
+ {
55
+ public ArraySlice<int> points;
56
+ public int pointCount;
57
+ };
58
+
59
+ internal struct TessUtils
60
+ {
61
+
62
+ // From https://www.cs.cmu.edu/afs/cs/project/quake/public/code/predicates.c and is public domain. Can't find one within Unity.
63
+ public static float OrientFast(float2 a, float2 b, float2 c)
64
+ {
65
+ float epsilon = 1.1102230246251565e-16f;
66
+ float errbound3 = (3.0f + 16.0f * epsilon) * epsilon;
67
+ float l = (a.y - c.y) * (b.x - c.x);
68
+ float r = (a.x - c.x) * (b.y - c.y);
69
+ float det = l - r;
70
+ float s = 0;
71
+ if (l > 0)
72
+ {
73
+ if (r <= 0)
74
+ {
75
+ return det;
76
+ }
77
+ else
78
+ {
79
+ s = l + r;
80
+ }
81
+ }
82
+ else if (l < 0)
83
+ {
84
+ if (r >= 0)
85
+ {
86
+ return det;
87
+ }
88
+ else
89
+ {
90
+ s = -(l + r);
91
+ }
92
+ }
93
+ else
94
+ {
95
+ return det;
96
+ }
97
+
98
+ float tol = errbound3 * s;
99
+ if (det >= tol || det <= -tol)
100
+ {
101
+ return det;
102
+ }
103
+
104
+ return epsilon;
105
+ }
106
+
107
+ public static float Norm(float2 cV)
108
+ {
109
+ return cV.x * cV.x + cV.y * cV.y;
110
+ }
111
+
112
+ public static float Dist(float2 cV1, float2 cV2)
113
+ {
114
+ return (cV1.x - cV2.x) * (cV1.x - cV2.x) + (cV1.y - cV2.y) * (cV1.y - cV2.y);
115
+ }
116
+ public static bool IsInsideCircle(float2 a, float2 b, float2 c, float2 p)
117
+ {
118
+ float ab = Norm(a);
119
+ float cd = Norm(b);
120
+ float ef = Norm(c);
121
+
122
+ float ax = a.x;
123
+ float ay = a.y;
124
+ float bx = b.x;
125
+ float by = b.y;
126
+ float cx = c.x;
127
+ float cy = c.y;
128
+
129
+ float circum_x = (ab * (cy - by) + cd * (ay - cy) + ef * (by - ay)) /
130
+ (ax * (cy - by) + bx * (ay - cy) + cx * (by - ay));
131
+ float circum_y = (ab * (cx - bx) + cd * (ax - cx) + ef * (bx - ax)) /
132
+ (ay * (cx - bx) + by * (ax - cx) + cy * (bx - ax));
133
+
134
+ float2 circum = new float2();
135
+ circum.x = circum_x / 2;
136
+ circum.y = circum_y / 2;
137
+ float circum_radius = Dist(a, circum);
138
+ float dist = Dist(p, circum);
139
+ return circum_radius - dist > 0.00001f;
140
+ }
141
+
142
+ public unsafe static void InsertionSort<T, U>(void* array, int lo, int hi, U comp)
143
+ where T : struct where U : IComparer<T>
144
+ {
145
+ int i, j;
146
+ T t;
147
+ for (i = lo; i < hi; i++)
148
+ {
149
+ j = i;
150
+ t = UnsafeUtility.ReadArrayElement<T>(array, i + 1);
151
+ while (j >= lo && comp.Compare(t, UnsafeUtility.ReadArrayElement<T>(array, j)) < 0)
152
+ {
153
+ UnsafeUtility.WriteArrayElement<T>(array, j + 1, UnsafeUtility.ReadArrayElement<T>(array, j));
154
+ j--;
155
+ }
156
+
157
+ UnsafeUtility.WriteArrayElement<T>(array, j + 1, t);
158
+ }
159
+ }
160
+
161
+ }
162
+
163
+ struct TessEventCompare : IComparer<TessEvent>
164
+ {
165
+ public int Compare(TessEvent a, TessEvent b)
166
+ {
167
+ float f = (a.a.x - b.a.x);
168
+ if (0 != f)
169
+ return (f > 0) ? 1 : -1;
170
+
171
+ f = (a.a.y - b.a.y);
172
+ if (0 != f)
173
+ return (f > 0) ? 1 : -1;
174
+
175
+ int i = a.type - b.type;
176
+ if (0 != i)
177
+ return i;
178
+
179
+ if (a.type != (int) TessEventType.EVENT_POINT)
180
+ {
181
+ float o = TessUtils.OrientFast(a.a, a.b, b.b);
182
+ if (0 != o)
183
+ {
184
+ return (o > 0) ? 1 : -1;
185
+ }
186
+ }
187
+
188
+ return a.idx - b.idx;
189
+ }
190
+ }
191
+
192
+ struct TessEdgeCompare : IComparer<TessEdge>
193
+ {
194
+ public int Compare(TessEdge a, TessEdge b)
195
+ {
196
+ int i = a.a - b.a;
197
+ if (0 != i)
198
+ return i;
199
+ i = a.b - b.b;
200
+ return i;
201
+ }
202
+ }
203
+
204
+ struct TessCellCompare : IComparer<TessCell>
205
+ {
206
+ public int Compare(TessCell a, TessCell b)
207
+ {
208
+ int i = a.a - b.a;
209
+ if (0 != i)
210
+ return i;
211
+ i = a.b - b.b;
212
+ if (0 != i)
213
+ return i;
214
+ i = a.c - b.c;
215
+ return i;
216
+ }
217
+ }
218
+
219
+ internal struct Tessellator
220
+ {
221
+ // For Processing.
222
+ NativeArray<TessEdge> m_Edges;
223
+ NativeArray<TessStar> m_Stars;
224
+ NativeArray<TessCell> m_Cells;
225
+ int m_CellCount;
226
+
227
+ // For Storage.
228
+ NativeArray<int> m_ILArray;
229
+ NativeArray<int> m_IUArray;
230
+ NativeArray<int> m_SPArray;
231
+ int m_NumPoints;
232
+ int m_StarCount;
233
+
234
+ // Intermediates.
235
+ NativeArray<int> m_Flags;
236
+ NativeArray<int> m_Neighbors;
237
+ NativeArray<int> m_Constraints;
238
+
239
+ static float TestPoint(TessHull hull, float2 point)
240
+ {
241
+ return TessUtils.OrientFast(hull.a, hull.b, point);
242
+ }
243
+
244
+ static int GetLowerHullForVector(NativeArray<TessHull> hulls, int hullCount, float2 p)
245
+ {
246
+ int i;
247
+ int l = 0;
248
+ int h = hullCount - 1;
249
+ i = l - 1;
250
+ while (l <= h)
251
+ {
252
+ int m;
253
+ m = ((int) (l + h)) >> 1;
254
+ if (TestPoint(hulls[m], p) < 0)
255
+ {
256
+ i = m;
257
+ l = m + 1;
258
+ }
259
+ else
260
+ h = m - 1;
261
+ }
262
+
263
+ return i;
264
+ }
265
+
266
+ static int GetUpperHullForVector(NativeArray<TessHull> hulls, int hullCount, float2 p)
267
+ {
268
+ int i;
269
+ int l = 0;
270
+ int h = hullCount - 1;
271
+ i = h + 1;
272
+ while (l <= h)
273
+ {
274
+ int m;
275
+ m = ((int) (l + h)) >> 1;
276
+ if (TestPoint(hulls[m], p) > 0)
277
+ {
278
+ i = m;
279
+ h = m - 1;
280
+ }
281
+ else
282
+ l = m + 1;
283
+ }
284
+
285
+ return i;
286
+ }
287
+
288
+ static float FindSplit(TessHull hull, TessEvent edge)
289
+ {
290
+ float d = 0;
291
+ if (hull.a.x < edge.a.x)
292
+ {
293
+ d = TessUtils.OrientFast(hull.a, hull.b, edge.a);
294
+ }
295
+ else
296
+ {
297
+ d = TessUtils.OrientFast(edge.b, edge.a, hull.a);
298
+ }
299
+
300
+ if (0 != d)
301
+ {
302
+ return d;
303
+ }
304
+
305
+ if (edge.b.x < hull.b.x)
306
+ {
307
+ d = TessUtils.OrientFast(hull.a, hull.b, edge.b);
308
+ }
309
+ else
310
+ {
311
+ d = TessUtils.OrientFast(edge.b, edge.a, hull.b);
312
+ }
313
+
314
+ if (0 != d)
315
+ {
316
+ return d;
317
+ }
318
+
319
+ return hull.idx - edge.idx;
320
+ }
321
+
322
+ static int GetLowerEqualHullForEvent(NativeArray<TessHull> hulls, int hullCount, TessEvent p)
323
+ {
324
+ int i;
325
+ int l = 0;
326
+ int h = hullCount - 1;
327
+ i = l - 1;
328
+ while (l <= h)
329
+ {
330
+ int m;
331
+ m = ((int) (l + h)) >> 1;
332
+ if (FindSplit(hulls[m], p) <= 0)
333
+ {
334
+ i = m;
335
+ l = m + 1;
336
+ }
337
+ else
338
+ h = m - 1;
339
+ }
340
+
341
+ return i;
342
+ }
343
+
344
+ static int GetEqualHullForEvent(NativeArray<TessHull> hulls, int hullCount, TessEvent p)
345
+ {
346
+ int l = 0;
347
+ int h = hullCount - 1;
348
+ while (l <= h)
349
+ {
350
+ int m;
351
+ m = ((int) (l + h)) >> 1;
352
+ float f = FindSplit(hulls[m], p);
353
+ if (f == 0)
354
+ {
355
+ return m;
356
+ }
357
+ else if (f <= 0)
358
+ {
359
+ l = m + 1;
360
+ }
361
+ else
362
+ h = m - 1;
363
+ }
364
+
365
+ return -1;
366
+ }
367
+
368
+ void AddPoint(NativeArray<TessHull> hulls, int hullCount, NativeArray<float2> points, float2 p,
369
+ int idx)
370
+ {
371
+ int l = GetLowerHullForVector(hulls, hullCount, p);
372
+ int u = GetUpperHullForVector(hulls, hullCount, p);
373
+ for (int i = l; i < u; ++i)
374
+ {
375
+ TessHull hull = hulls[i];
376
+
377
+ int m = hull.ilcount;
378
+ while (m > 1 && TessUtils.OrientFast(points[hull.ilarray[m - 2]], points[hull.ilarray[m - 1]], p) >
379
+ 0)
380
+ {
381
+ TessCell c = new TessCell();
382
+ c.a = hull.ilarray[m - 1];
383
+ c.b = hull.ilarray[m - 2];
384
+ c.c = idx;
385
+ m_Cells[m_CellCount++] = c;
386
+ m -= 1;
387
+ }
388
+
389
+ hull.ilcount = m + 1;
390
+ hull.ilarray[m] = idx;
391
+
392
+ m = hull.iucount;
393
+ while (m > 1 && TessUtils.OrientFast(points[hull.iuarray[m - 2]], points[hull.iuarray[m - 1]], p) <
394
+ 0)
395
+ {
396
+ TessCell c = new TessCell();
397
+ c.a = hull.iuarray[m - 2];
398
+ c.b = hull.iuarray[m - 1];
399
+ c.c = idx;
400
+ m_Cells[m_CellCount++] = c;
401
+ m -= 1;
402
+ }
403
+
404
+ hull.iucount = m + 1;
405
+ hull.iuarray[m] = idx;
406
+
407
+ hulls[i] = hull;
408
+ }
409
+ }
410
+
411
+ static void InsertHull(NativeArray<TessHull> Hulls, int Pos, ref int Count, TessHull Value)
412
+ {
413
+ if (Count < Hulls.Length - 1)
414
+ {
415
+ for (int i = Count; i > Pos; --i)
416
+ Hulls[i] = Hulls[i - 1];
417
+ Hulls[Pos] = Value;
418
+ Count++;
419
+ }
420
+ }
421
+
422
+ static void EraseHull(NativeArray<TessHull> Hulls, int Pos, ref int Count)
423
+ {
424
+ if (Count < Hulls.Length)
425
+ {
426
+ for (int i = Pos; i < Count - 1; ++i)
427
+ Hulls[i] = Hulls[i + 1];
428
+ Count--;
429
+ }
430
+ }
431
+
432
+ void SplitHulls(NativeArray<TessHull> hulls, ref int hullCount, NativeArray<float2> points,
433
+ TessEvent evt)
434
+ {
435
+ int index = GetLowerEqualHullForEvent(hulls, hullCount, evt);
436
+ TessHull hull = hulls[index];
437
+
438
+ TessHull newHull;
439
+ newHull.a = evt.a;
440
+ newHull.b = evt.b;
441
+ newHull.idx = evt.idx;
442
+
443
+ int y = hull.iuarray[hull.iucount - 1];
444
+ newHull.iuarray = new ArraySlice<int>(m_IUArray, newHull.idx * m_NumPoints, m_NumPoints);
445
+ newHull.iucount = hull.iucount;
446
+ for (int i = 0; i < newHull.iucount; ++i)
447
+ newHull.iuarray[i] = hull.iuarray[i];
448
+ hull.iuarray[0] = y;
449
+ hull.iucount = 1;
450
+ hulls[index] = hull;
451
+
452
+ newHull.ilarray = new ArraySlice<int>(m_ILArray, newHull.idx * m_NumPoints, m_NumPoints);
453
+ newHull.ilarray[0] = y;
454
+ newHull.ilcount = 1;
455
+
456
+ InsertHull(hulls, index + 1, ref hullCount, newHull);
457
+ }
458
+
459
+ void MergeHulls(NativeArray<TessHull> hulls, ref int hullCount, NativeArray<float2> points,
460
+ TessEvent evt)
461
+ {
462
+ float2 temp = evt.a;
463
+ evt.a = evt.b;
464
+ evt.b = temp;
465
+ int index = GetEqualHullForEvent(hulls, hullCount, evt);
466
+
467
+ TessHull upper = hulls[index];
468
+ TessHull lower = hulls[index - 1];
469
+
470
+ lower.iucount = upper.iucount;
471
+ for (int i = 0; i < lower.iucount; ++i)
472
+ lower.iuarray[i] = upper.iuarray[i];
473
+
474
+ hulls[index - 1] = lower;
475
+ EraseHull(hulls, index, ref hullCount);
476
+ }
477
+
478
+ internal void Triangulate(NativeArray<float2> points, NativeArray<TessEdge> edgesIn)
479
+ {
480
+ int numEdges = edgesIn.Length;
481
+ const int kStarEdges = 16;
482
+
483
+ m_NumPoints = points.Length;
484
+ m_StarCount = m_NumPoints > kStarEdges ? m_NumPoints : kStarEdges;
485
+ m_StarCount = m_StarCount * 2;
486
+ m_CellCount = 0;
487
+ m_Cells = new NativeArray<TessCell>(m_NumPoints * (m_NumPoints + 1), Allocator.Temp);
488
+ m_ILArray = new NativeArray<int>(m_NumPoints * (m_NumPoints + 1), Allocator.Temp); // Make room for -1 node.
489
+ m_IUArray = new NativeArray<int>(m_NumPoints * (m_NumPoints + 1), Allocator.Temp); // Make room for -1 node.
490
+ m_SPArray = new NativeArray<int>(m_NumPoints * (m_StarCount), Allocator.Temp); // Make room for -1 node.
491
+
492
+ NativeArray<TessHull> hulls = new NativeArray<TessHull>(m_NumPoints * 8, Allocator.Temp);
493
+ int hullCount = 0;
494
+
495
+ NativeArray<TessEvent> events = new NativeArray<TessEvent>(m_NumPoints + (numEdges * 2), Allocator.Temp);
496
+ int eventCount = 0;
497
+
498
+ for (int i = 0; i < m_NumPoints; ++i)
499
+ {
500
+ TessEvent evt = new TessEvent();
501
+ evt.a = points[i];
502
+ evt.b = new float2();
503
+ evt.idx = i;
504
+ evt.type = (int) TessEventType.EVENT_POINT;
505
+ events[eventCount++] = evt;
506
+ }
507
+
508
+ for (int i = 0; i < numEdges; ++i)
509
+ {
510
+ TessEdge e = edgesIn[i];
511
+ float2 a = points[e.a];
512
+ float2 b = points[e.b];
513
+ if (a.x < b.x)
514
+ {
515
+ TessEvent _s = new TessEvent();
516
+ _s.a = a;
517
+ _s.b = b;
518
+ _s.idx = i;
519
+ _s.type = (int) TessEventType.EVENT_START;
520
+
521
+ TessEvent _e = new TessEvent();
522
+ _e.a = b;
523
+ _e.b = a;
524
+ _e.idx = i;
525
+ _e.type = (int) TessEventType.EVENT_END;
526
+
527
+ events[eventCount++] = _s;
528
+ events[eventCount++] = _e;
529
+ }
530
+ else if (a.x > b.x)
531
+ {
532
+ TessEvent _s = new TessEvent();
533
+ _s.a = b;
534
+ _s.b = a;
535
+ _s.idx = i;
536
+ _s.type = (int) TessEventType.EVENT_START;
537
+
538
+ TessEvent _e = new TessEvent();
539
+ _e.a = a;
540
+ _e.b = b;
541
+ _e.idx = i;
542
+ _e.type = (int) TessEventType.EVENT_END;
543
+
544
+ events[eventCount++] = _s;
545
+ events[eventCount++] = _e;
546
+ }
547
+ }
548
+
549
+ unsafe
550
+ {
551
+ TessUtils.InsertionSort<TessEvent, TessEventCompare>(
552
+ NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(events), 0, eventCount - 1,
553
+ new TessEventCompare());
554
+ ;
555
+ }
556
+
557
+ float minX = events[0].a.x - (1 + math.abs(events[0].a.x)) * math.pow(2.0f, -16.0f);
558
+ TessHull hull;
559
+ hull.a.x = minX;
560
+ hull.a.y = 1;
561
+ hull.b.x = minX;
562
+ hull.b.y = 0;
563
+ hull.idx = -1;
564
+ hull.ilarray = new ArraySlice<int>(m_ILArray, m_NumPoints * m_NumPoints, m_NumPoints); // Last element
565
+ hull.iuarray = new ArraySlice<int>(m_IUArray, m_NumPoints * m_NumPoints, m_NumPoints);
566
+ hull.ilcount = 0;
567
+ hull.iucount = 0;
568
+ hulls[hullCount++] = hull;
569
+
570
+ for (int i = 0, numEvents = eventCount; i < numEvents; ++i)
571
+ {
572
+ switch (events[i].type)
573
+ {
574
+ case (int) TessEventType.EVENT_POINT:
575
+ {
576
+ AddPoint(hulls, hullCount, points, events[i].a, events[i].idx);
577
+ }
578
+ break;
579
+
580
+ case (int) TessEventType.EVENT_START:
581
+ {
582
+ SplitHulls(hulls, ref hullCount, points, events[i]);
583
+ }
584
+ break;
585
+
586
+ default:
587
+ {
588
+ MergeHulls(hulls, ref hullCount, points, events[i]);
589
+ }
590
+ break;
591
+ }
592
+ }
593
+
594
+ hulls.Dispose();
595
+ events.Dispose();
596
+ }
597
+
598
+
599
+ void Prepare(NativeArray<TessEdge> edgesIn)
600
+ {
601
+ m_Stars = new NativeArray<TessStar>(edgesIn.Length, Allocator.Temp);
602
+
603
+ for (int i = 0; i < edgesIn.Length; ++i)
604
+ {
605
+ TessEdge e = edgesIn[i];
606
+ e.a = (edgesIn[i].a < edgesIn[i].b) ? edgesIn[i].a : edgesIn[i].b;
607
+ e.b = (edgesIn[i].a > edgesIn[i].b) ? edgesIn[i].a : edgesIn[i].b;
608
+ edgesIn[i] = e;
609
+ TessStar s = m_Stars[i];
610
+ s.points = new ArraySlice<int>(m_SPArray, i * m_StarCount, m_StarCount);
611
+ s.pointCount = 0;
612
+ m_Stars[i] = s;
613
+ }
614
+
615
+ unsafe
616
+ {
617
+ TessUtils.InsertionSort<TessEdge, TessEdgeCompare>(
618
+ NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(edgesIn), 0, edgesIn.Length - 1,
619
+ new TessEdgeCompare());
620
+ }
621
+
622
+ m_Edges = new NativeArray<TessEdge>(edgesIn.Length, Allocator.Temp);
623
+ m_Edges.CopyFrom(edgesIn);
624
+
625
+ // Fill stars.
626
+ for (int i = 0; i < m_CellCount; ++i)
627
+ {
628
+ int a = m_Cells[i].a;
629
+ int b = m_Cells[i].b;
630
+ int c = m_Cells[i].c;
631
+ TessStar sa = m_Stars[a];
632
+ TessStar sb = m_Stars[b];
633
+ TessStar sc = m_Stars[c];
634
+ sa.points[sa.pointCount++] = b;
635
+ sa.points[sa.pointCount++] = c;
636
+ sb.points[sb.pointCount++] = c;
637
+ sb.points[sb.pointCount++] = a;
638
+ sc.points[sc.pointCount++] = a;
639
+ sc.points[sc.pointCount++] = b;
640
+ m_Stars[a] = sa;
641
+ m_Stars[b] = sb;
642
+ m_Stars[c] = sc;
643
+ }
644
+ }
645
+
646
+ int OppositeOf(int a, int b)
647
+ {
648
+ ArraySlice<int> points = m_Stars[b].points;
649
+ for (int k = 1, n = m_Stars[b].pointCount; k < n; k += 2)
650
+ {
651
+ if (points[k] == a)
652
+ {
653
+ return points[k - 1];
654
+ }
655
+ }
656
+
657
+ return -1;
658
+ }
659
+
660
+ static int GetEqualHullForEdges(NativeArray<TessEdge> edges, TessEdge p)
661
+ {
662
+ int l = 0;
663
+ int h = edges.Length - 1;
664
+ TessEdgeCompare tec = new TessEdgeCompare();
665
+ while (l <= h)
666
+ {
667
+ int m;
668
+ m = ((int) (l + h)) >> 1;
669
+ int f = tec.Compare(edges[m], p);
670
+ if (f == 0)
671
+ {
672
+ return m;
673
+ }
674
+ else if (f <= 0)
675
+ {
676
+ l = m + 1;
677
+ }
678
+ else
679
+ h = m - 1;
680
+ }
681
+
682
+ return -1;
683
+ }
684
+
685
+ int FindConstraint(int a, int b)
686
+ {
687
+ TessEdge e;
688
+ e.a = a < b ? a : b;
689
+ e.b = a > b ? a : b;
690
+ return GetEqualHullForEdges(m_Edges, e);
691
+ }
692
+
693
+ void AddTriangle(int i, int j, int k)
694
+ {
695
+ TessStar si = m_Stars[i];
696
+ TessStar sj = m_Stars[j];
697
+ TessStar sk = m_Stars[k];
698
+ si.points[si.pointCount++] = j;
699
+ si.points[si.pointCount++] = k;
700
+ sj.points[sj.pointCount++] = k;
701
+ sj.points[sj.pointCount++] = i;
702
+ sk.points[sk.pointCount++] = i;
703
+ sk.points[sk.pointCount++] = j;
704
+ m_Stars[i] = si;
705
+ m_Stars[j] = sj;
706
+ m_Stars[k] = sk;
707
+ }
708
+
709
+ void RemovePair(int r, int j, int k)
710
+ {
711
+ TessStar s = m_Stars[r];
712
+ ArraySlice<int> points = s.points;
713
+ for (int i = 1, n = s.pointCount; i < n; i += 2)
714
+ {
715
+ if (points[i - 1] == j && points[i] == k)
716
+ {
717
+ points[i - 1] = points[n - 2];
718
+ points[i] = points[n - 1];
719
+ s.points = points;
720
+ s.pointCount = s.pointCount - 2;
721
+ m_Stars[r] = s;
722
+ return;
723
+ }
724
+ }
725
+ }
726
+
727
+ void RemoveTriangle(int i, int j, int k)
728
+ {
729
+ RemovePair(i, j, k);
730
+ RemovePair(j, k, i);
731
+ RemovePair(k, i, j);
732
+ }
733
+
734
+ void EdgeFlip(int i, int j)
735
+ {
736
+ int a = OppositeOf(i, j);
737
+ int b = OppositeOf(j, i);
738
+ RemoveTriangle(i, j, a);
739
+ RemoveTriangle(j, i, b);
740
+ AddTriangle(i, b, a);
741
+ AddTriangle(j, a, b);
742
+ }
743
+
744
+ void Flip(NativeArray<float2> points, ref NativeArray<int> stack, ref int stackCount,
745
+ int a, int b, int x)
746
+ {
747
+ int y = OppositeOf(a, b);
748
+
749
+ if (y < 0)
750
+ {
751
+ return;
752
+ }
753
+
754
+ if (b < a)
755
+ {
756
+ int tmp = a;
757
+ a = b;
758
+ b = tmp;
759
+ tmp = x;
760
+ x = y;
761
+ y = tmp;
762
+ }
763
+
764
+ if (FindConstraint(a, b) != -1)
765
+ {
766
+ return;
767
+ }
768
+
769
+ if (TessUtils.IsInsideCircle(points[a], points[b], points[x], points[y]))
770
+ {
771
+ stack[stackCount++] = a;
772
+ stack[stackCount++] = b;
773
+ }
774
+ }
775
+
776
+ NativeArray<TessCell> GetCells(ref int count)
777
+ {
778
+ NativeArray<TessCell> cellsOut = new NativeArray<TessCell>(m_NumPoints * (m_NumPoints + 1), Allocator.Temp);
779
+ count = 0;
780
+ for (int i = 0, n = m_Stars.Length; i < n; ++i)
781
+ {
782
+ ArraySlice<int> points = m_Stars[i].points;
783
+ for (int j = 0, m = m_Stars[i].pointCount; j < m; j += 2)
784
+ {
785
+ int s = points[j];
786
+ int t = points[j + 1];
787
+ if (i < math.min(s, t))
788
+ {
789
+ TessCell c = new TessCell();
790
+ c.a = i;
791
+ c.b = s;
792
+ c.c = t;
793
+ cellsOut[count++] = c;
794
+ }
795
+ }
796
+ }
797
+
798
+ return cellsOut;
799
+ }
800
+
801
+ internal void ApplyDelaunay(NativeArray<float2> points, NativeArray<TessEdge> edgesIn)
802
+ {
803
+
804
+ NativeArray<int> stack = new NativeArray<int>(m_NumPoints * (m_NumPoints + 1), Allocator.Temp);
805
+ int stackCount = 0;
806
+
807
+ Prepare(edgesIn);
808
+ for (int a = 0; a < m_NumPoints; ++a)
809
+ {
810
+ TessStar star = m_Stars[a];
811
+ for (int j = 1; j < star.pointCount; j += 2)
812
+ {
813
+ int b = star.points[j];
814
+
815
+ if (b < a)
816
+ {
817
+ continue;
818
+ }
819
+
820
+ if (FindConstraint(a, b) >= 0)
821
+ {
822
+ continue;
823
+ }
824
+
825
+ int x = star.points[j - 1], y = -1;
826
+ for (int k = 1; k < star.pointCount; k += 2)
827
+ {
828
+ if (star.points[k - 1] == b)
829
+ {
830
+ y = star.points[k];
831
+ break;
832
+ }
833
+ }
834
+
835
+ if (y < 0)
836
+ {
837
+ continue;
838
+ }
839
+
840
+ if (TessUtils.IsInsideCircle(points[a], points[b], points[x], points[y]))
841
+ {
842
+ stack[stackCount++] = a;
843
+ stack[stackCount++] = b;
844
+ }
845
+ }
846
+ }
847
+
848
+ while (stackCount > 0)
849
+ {
850
+ int b = stack[stackCount - 1];
851
+ stackCount--;
852
+ int a = stack[stackCount - 1];
853
+ stackCount--;
854
+
855
+ int x = -1, y = -1;
856
+ TessStar star = m_Stars[a];
857
+ for (int i = 1; i < star.pointCount; i += 2)
858
+ {
859
+ int s = star.points[i - 1];
860
+ int t = star.points[i];
861
+ if (s == b)
862
+ {
863
+ y = t;
864
+ }
865
+ else if (t == b)
866
+ {
867
+ x = s;
868
+ }
869
+ }
870
+
871
+ if (x < 0 || y < 0)
872
+ {
873
+ continue;
874
+ }
875
+
876
+ if (!TessUtils.IsInsideCircle(points[a], points[b], points[x], points[y]))
877
+ {
878
+ continue;
879
+ }
880
+
881
+ EdgeFlip(a, b);
882
+
883
+ Flip(points, ref stack, ref stackCount, x, a, y);
884
+ Flip(points, ref stack, ref stackCount, a, y, x);
885
+ Flip(points, ref stack, ref stackCount, y, b, x);
886
+ Flip(points, ref stack, ref stackCount, b, x, y);
887
+ }
888
+
889
+ stack.Dispose();
890
+ }
891
+
892
+ int GetEqualCellForCells(NativeArray<TessCell> cells, int count, TessCell p)
893
+ {
894
+ int l = 0;
895
+ int h = count - 1;
896
+ TessCellCompare tcc = new TessCellCompare();
897
+ while (l <= h)
898
+ {
899
+ int m;
900
+ m = ((int) (l + h)) >> 1;
901
+ int f = tcc.Compare(cells[m], p);
902
+ if (f == 0)
903
+ {
904
+ return m;
905
+ }
906
+ else if (f <= 0)
907
+ {
908
+ l = m + 1;
909
+ }
910
+ else
911
+ h = m - 1;
912
+ }
913
+
914
+ return -1;
915
+ }
916
+
917
+ int FindNeighbor(NativeArray<TessCell> cells, int count, int a, int b, int c)
918
+ {
919
+ int x = a, y = b, z = c;
920
+ if (b < c)
921
+ {
922
+ if (b < a)
923
+ {
924
+ x = b;
925
+ y = c;
926
+ z = a;
927
+ }
928
+ }
929
+ else if (c < a)
930
+ {
931
+ x = c;
932
+ y = a;
933
+ z = b;
934
+ }
935
+
936
+ if (x < 0)
937
+ {
938
+ return -1;
939
+ }
940
+
941
+ TessCell key;
942
+ key.a = x;
943
+ key.b = y;
944
+ key.c = z;
945
+ return GetEqualCellForCells(cells, count, key);
946
+ }
947
+
948
+ NativeArray<TessCell> Constrain(ref int count)
949
+ {
950
+ var cells = GetCells(ref count);
951
+ int nc = count;
952
+ for (int i = 0; i < nc; ++i)
953
+ {
954
+ TessCell c = cells[i];
955
+ int x = c.a, y = c.b, z = c.c;
956
+ if (y < z)
957
+ {
958
+ if (y < x)
959
+ {
960
+ c.a = y;
961
+ c.b = z;
962
+ c.c = x;
963
+ }
964
+ }
965
+ else if (z < x)
966
+ {
967
+ c.a = z;
968
+ c.b = x;
969
+ c.c = y;
970
+ }
971
+
972
+ cells[i] = c;
973
+ }
974
+
975
+ unsafe
976
+ {
977
+ TessUtils.InsertionSort<TessCell, TessCellCompare>(
978
+ NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(cells), 0, m_CellCount - 1,
979
+ new TessCellCompare());
980
+ }
981
+
982
+ // Out
983
+ m_Flags = new NativeArray<int>(nc, Allocator.Temp);
984
+ m_Neighbors = new NativeArray<int>(nc * 3, Allocator.Temp);
985
+ m_Constraints = new NativeArray<int>(nc * 3, Allocator.Temp);
986
+ var next = new NativeArray<int>(nc * 3, Allocator.Temp);
987
+ var active = new NativeArray<int>(nc * 3, Allocator.Temp);
988
+
989
+ int side = 1, nextCount = 0, activeCount = 0;
990
+
991
+ for (int i = 0; i < nc; ++i)
992
+ {
993
+ TessCell c = cells[i];
994
+ for (int j = 0; j < 3; ++j)
995
+ {
996
+ int x = j, y = (j + 1) % 3;
997
+ x = (x == 0) ? c.a : (j == 1) ? c.b : c.c;
998
+ y = (y == 0) ? c.a : (y == 1) ? c.b : c.c;
999
+
1000
+ int o = OppositeOf(y, x);
1001
+ int a = m_Neighbors[3 * i + j] = FindNeighbor(cells, count, y, x, o);
1002
+ int b = m_Constraints[3 * i + j] = (-1 != FindConstraint(x, y)) ? 1 : 0;
1003
+ if (a < 0)
1004
+ {
1005
+ if (0 != b)
1006
+ {
1007
+ next[nextCount++] = i;
1008
+ }
1009
+ else
1010
+ {
1011
+ active[activeCount++] = i;
1012
+ m_Flags[i] = 1;
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+
1018
+ while (activeCount > 0 || nextCount > 0)
1019
+ {
1020
+ while (activeCount > 0)
1021
+ {
1022
+ int t = active[activeCount - 1];
1023
+ activeCount--;
1024
+ if (m_Flags[t] == -side)
1025
+ {
1026
+ continue;
1027
+ }
1028
+
1029
+ m_Flags[t] = side;
1030
+ TessCell c = cells[t];
1031
+ for (int j = 0; j < 3; ++j)
1032
+ {
1033
+ int f = m_Neighbors[3 * t + j];
1034
+ if (f >= 0 && m_Flags[f] == 0)
1035
+ {
1036
+ if (0 != m_Constraints[3 * t + j])
1037
+ {
1038
+ next[nextCount++] = f;
1039
+ }
1040
+ else
1041
+ {
1042
+ active[activeCount++] = f;
1043
+ m_Flags[f] = side;
1044
+ }
1045
+ }
1046
+ }
1047
+ }
1048
+
1049
+ for (int e = 0; e < nextCount; e++)
1050
+ active[e] = next[e];
1051
+ activeCount = nextCount;
1052
+ nextCount = 0;
1053
+ side = -side;
1054
+ }
1055
+
1056
+ active.Dispose();
1057
+ next.Dispose();
1058
+ return cells;
1059
+ }
1060
+
1061
+ internal NativeArray<TessCell> RemoveExterior(ref int cellCount)
1062
+ {
1063
+ int constrainedCount = 0;
1064
+ NativeArray<TessCell> constrained = Constrain(ref constrainedCount);
1065
+
1066
+ NativeArray<TessCell> cellsOut = new NativeArray<TessCell>(constrainedCount, Allocator.Temp);
1067
+ cellCount = 0;
1068
+ for (int i = 0; i < constrainedCount; ++i)
1069
+ {
1070
+ if (m_Flags[i] == -1)
1071
+ {
1072
+ cellsOut[cellCount++] = constrained[i];
1073
+ }
1074
+ }
1075
+
1076
+ constrained.Dispose();
1077
+ return cellsOut;
1078
+ }
1079
+
1080
+ internal NativeArray<TessCell> RemoveInterior(int cellCount)
1081
+ {
1082
+ int constrainedCount = 0;
1083
+ NativeArray<TessCell> constrained = Constrain(ref constrainedCount);
1084
+
1085
+ NativeArray<TessCell> cellsOut = new NativeArray<TessCell>(constrainedCount, Allocator.Temp);
1086
+ cellCount = 0;
1087
+ for (int i = 0; i < constrainedCount; ++i)
1088
+ {
1089
+ if (m_Flags[i] == 1)
1090
+ {
1091
+ cellsOut[cellCount++] = constrained[i];
1092
+ }
1093
+ }
1094
+
1095
+ constrained.Dispose();
1096
+ return cellsOut;
1097
+ }
1098
+
1099
+ internal void Cleanup()
1100
+ {
1101
+ m_Edges.Dispose();
1102
+ m_Stars.Dispose();
1103
+ m_ILArray.Dispose();
1104
+ m_IUArray.Dispose();
1105
+ m_SPArray.Dispose();
1106
+ m_Cells.Dispose();
1107
+
1108
+ m_Flags.Dispose();
1109
+ m_Neighbors.Dispose();
1110
+ m_Constraints.Dispose();
1111
+ }
1112
+
1113
+ }
1114
+
1115
+ }
1116
+
1117
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/UTess2D/Tessellator.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: d8287b2baa933c3439b7138b01b09648
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/Colliders.unity.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 299e0b891b406a8409a068bd55ee5a1f
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/ConformingSplineScene.unity ADDED
@@ -0,0 +1,528 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!29 &1
4
+ OcclusionCullingSettings:
5
+ m_ObjectHideFlags: 0
6
+ serializedVersion: 2
7
+ m_OcclusionBakeSettings:
8
+ smallestOccluder: 5
9
+ smallestHole: 0.25
10
+ backfaceThreshold: 100
11
+ m_SceneGUID: 00000000000000000000000000000000
12
+ m_OcclusionCullingData: {fileID: 0}
13
+ --- !u!104 &2
14
+ RenderSettings:
15
+ m_ObjectHideFlags: 0
16
+ serializedVersion: 9
17
+ m_Fog: 0
18
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19
+ m_FogMode: 3
20
+ m_FogDensity: 0.01
21
+ m_LinearFogStart: 0
22
+ m_LinearFogEnd: 300
23
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26
+ m_AmbientIntensity: 1
27
+ m_AmbientMode: 0
28
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29
+ m_SkyboxMaterial: {fileID: 0}
30
+ m_HaloStrength: 0.5
31
+ m_FlareStrength: 1
32
+ m_FlareFadeSpeed: 3
33
+ m_HaloTexture: {fileID: 0}
34
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35
+ m_DefaultReflectionMode: 0
36
+ m_DefaultReflectionResolution: 128
37
+ m_ReflectionBounces: 1
38
+ m_ReflectionIntensity: 1
39
+ m_CustomReflection: {fileID: 0}
40
+ m_Sun: {fileID: 0}
41
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42
+ m_UseRadianceAmbientProbe: 0
43
+ --- !u!157 &3
44
+ LightmapSettings:
45
+ m_ObjectHideFlags: 0
46
+ serializedVersion: 11
47
+ m_GIWorkflowMode: 0
48
+ m_GISettings:
49
+ serializedVersion: 2
50
+ m_BounceScale: 1
51
+ m_IndirectOutputScale: 1
52
+ m_AlbedoBoost: 1
53
+ m_EnvironmentLightingMode: 0
54
+ m_EnableBakedLightmaps: 1
55
+ m_EnableRealtimeLightmaps: 1
56
+ m_LightmapEditorSettings:
57
+ serializedVersion: 12
58
+ m_Resolution: 2
59
+ m_BakeResolution: 40
60
+ m_AtlasSize: 1024
61
+ m_AO: 0
62
+ m_AOMaxDistance: 1
63
+ m_CompAOExponent: 1
64
+ m_CompAOExponentDirect: 0
65
+ m_ExtractAmbientOcclusion: 0
66
+ m_Padding: 2
67
+ m_LightmapParameters: {fileID: 0}
68
+ m_LightmapsBakeMode: 1
69
+ m_TextureCompression: 1
70
+ m_FinalGather: 0
71
+ m_FinalGatherFiltering: 1
72
+ m_FinalGatherRayCount: 256
73
+ m_ReflectionCompression: 2
74
+ m_MixedBakeMode: 2
75
+ m_BakeBackend: 0
76
+ m_PVRSampling: 1
77
+ m_PVRDirectSampleCount: 32
78
+ m_PVRSampleCount: 500
79
+ m_PVRBounces: 2
80
+ m_PVREnvironmentSampleCount: 500
81
+ m_PVREnvironmentReferencePointCount: 2048
82
+ m_PVRFilteringMode: 2
83
+ m_PVRDenoiserTypeDirect: 0
84
+ m_PVRDenoiserTypeIndirect: 0
85
+ m_PVRDenoiserTypeAO: 0
86
+ m_PVRFilterTypeDirect: 0
87
+ m_PVRFilterTypeIndirect: 0
88
+ m_PVRFilterTypeAO: 0
89
+ m_PVREnvironmentMIS: 0
90
+ m_PVRCulling: 1
91
+ m_PVRFilteringGaussRadiusDirect: 1
92
+ m_PVRFilteringGaussRadiusIndirect: 5
93
+ m_PVRFilteringGaussRadiusAO: 2
94
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
96
+ m_PVRFilteringAtrousPositionSigmaAO: 1
97
+ m_ShowResolutionOverlay: 1
98
+ m_ExportTrainingData: 0
99
+ m_LightingDataAsset: {fileID: 0}
100
+ m_UseShadowmask: 1
101
+ --- !u!196 &4
102
+ NavMeshSettings:
103
+ serializedVersion: 2
104
+ m_ObjectHideFlags: 0
105
+ m_BuildSettings:
106
+ serializedVersion: 2
107
+ agentTypeID: 0
108
+ agentRadius: 0.5
109
+ agentHeight: 2
110
+ agentSlope: 45
111
+ agentClimb: 0.4
112
+ ledgeDropHeight: 0
113
+ maxJumpAcrossDistance: 0
114
+ minRegionArea: 2
115
+ manualCellSize: 0
116
+ cellSize: 0.16666667
117
+ manualTileSize: 0
118
+ tileSize: 256
119
+ accuratePlacement: 0
120
+ debug:
121
+ m_Flags: 0
122
+ m_NavMeshData: {fileID: 0}
123
+ --- !u!1 &400039572
124
+ GameObject:
125
+ m_ObjectHideFlags: 0
126
+ m_CorrespondingSourceObject: {fileID: 0}
127
+ m_PrefabInstance: {fileID: 0}
128
+ m_PrefabAsset: {fileID: 0}
129
+ serializedVersion: 6
130
+ m_Component:
131
+ - component: {fileID: 400039576}
132
+ - component: {fileID: 400039575}
133
+ - component: {fileID: 400039574}
134
+ m_Layer: 0
135
+ m_Name: Top
136
+ m_TagString: Untagged
137
+ m_Icon: {fileID: 0}
138
+ m_NavMeshLayer: 0
139
+ m_StaticEditorFlags: 0
140
+ m_IsActive: 1
141
+ --- !u!114 &400039574
142
+ MonoBehaviour:
143
+ m_ObjectHideFlags: 0
144
+ m_CorrespondingSourceObject: {fileID: 0}
145
+ m_PrefabInstance: {fileID: 0}
146
+ m_PrefabAsset: {fileID: 0}
147
+ m_GameObject: {fileID: 400039572}
148
+ m_Enabled: 1
149
+ m_EditorHideFlags: 0
150
+ m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3}
151
+ m_Name:
152
+ m_EditorClassIdentifier:
153
+ m_LegacyGenerator: 0
154
+ m_Spline:
155
+ m_IsOpenEnded: 1
156
+ m_ControlPoints:
157
+ - position: {x: 0.37061024, y: 7.517852, z: 0}
158
+ leftTangent: {x: 0, y: 0, z: 0}
159
+ rightTangent: {x: 0, y: 0, z: 0}
160
+ mode: 0
161
+ height: 1
162
+ bevelCutoff: 0
163
+ bevelSize: 0
164
+ spriteIndex: 0
165
+ corner: 0
166
+ - position: {x: 0.41290092, y: -1.8726089, z: 0}
167
+ leftTangent: {x: -3.4678102, y: 1.8794639, z: 0}
168
+ rightTangent: {x: 3.4678102, y: -1.8794639, z: 0}
169
+ mode: 1
170
+ height: 1
171
+ bevelCutoff: 0
172
+ bevelSize: 0
173
+ spriteIndex: 0
174
+ corner: 0
175
+ - position: {x: 7.9664383, y: -6.63839, z: 0}
176
+ leftTangent: {x: -4.8397465, y: -0.030138493, z: 0}
177
+ rightTangent: {x: 4.8397465, y: 0.030138493, z: 0}
178
+ mode: 1
179
+ height: 1
180
+ bevelCutoff: 0
181
+ bevelSize: 0
182
+ spriteIndex: 0
183
+ corner: 0
184
+ - position: {x: 15, y: -1, z: 0}
185
+ leftTangent: {x: -3.2519875, y: -2.4569178, z: 0}
186
+ rightTangent: {x: 3.2519875, y: 2.4569178, z: 0}
187
+ mode: 1
188
+ height: 1
189
+ bevelCutoff: 0
190
+ bevelSize: 0
191
+ spriteIndex: 0
192
+ corner: 0
193
+ - position: {x: 14.186232, y: 7.786347, z: 0}
194
+ leftTangent: {x: 0, y: 0, z: 0}
195
+ rightTangent: {x: 0, y: 0, z: 0}
196
+ mode: 0
197
+ height: 1
198
+ bevelCutoff: 0
199
+ bevelSize: 0
200
+ spriteIndex: 0
201
+ corner: 0
202
+ m_SpriteShape: {fileID: 11400000, guid: 541c57e7ddb8adc46b7ca9573818a619, type: 2}
203
+ m_FillPixelPerUnit: 100
204
+ m_StretchTiling: 1
205
+ m_SplineDetail: 16
206
+ m_AdaptiveUV: 1
207
+ m_StretchUV: 0
208
+ m_WorldSpaceUV: 0
209
+ m_ColliderDetail: 4
210
+ m_ColliderOffset: 0
211
+ m_UpdateCollider: 0
212
+ m_OptimizeCollider: 1
213
+ --- !u!1971053207 &400039575
214
+ SpriteShapeRenderer:
215
+ m_ObjectHideFlags: 0
216
+ m_CorrespondingSourceObject: {fileID: 0}
217
+ m_PrefabInstance: {fileID: 0}
218
+ m_PrefabAsset: {fileID: 0}
219
+ m_GameObject: {fileID: 400039572}
220
+ m_Enabled: 1
221
+ m_CastShadows: 1
222
+ m_ReceiveShadows: 1
223
+ m_DynamicOccludee: 0
224
+ m_MotionVectors: 1
225
+ m_LightProbeUsage: 1
226
+ m_ReflectionProbeUsage: 1
227
+ m_RenderingLayerMask: 4294967295
228
+ m_RendererPriority: 0
229
+ m_Materials:
230
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
231
+ m_StaticBatchInfo:
232
+ firstSubMesh: 0
233
+ subMeshCount: 0
234
+ m_StaticBatchRoot: {fileID: 0}
235
+ m_ProbeAnchor: {fileID: 0}
236
+ m_LightProbeVolumeOverride: {fileID: 0}
237
+ m_ScaleInLightmap: 1
238
+ m_PreserveUVs: 0
239
+ m_IgnoreNormalsForChartDetection: 0
240
+ m_ImportantGI: 0
241
+ m_StitchLightmapSeams: 0
242
+ m_SelectedEditorRenderState: 0
243
+ m_MinimumChartSize: 4
244
+ m_AutoUVMaxDistance: 0.5
245
+ m_AutoUVMaxAngle: 89
246
+ m_LightmapParameters: {fileID: 0}
247
+ m_SortingLayerID: 0
248
+ m_SortingLayer: 0
249
+ m_SortingOrder: 0
250
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
251
+ m_MaskInteraction: 0
252
+ m_ShapeTexture: {fileID: 0}
253
+ m_Sprites:
254
+ - {fileID: 21300000, guid: e74b518a65bc45f4cace9a2fef6af29d, type: 3}
255
+ m_LocalAABB:
256
+ m_Center: {x: 7.558513, y: 0.5739784, z: -0.005}
257
+ m_Extent: {x: 8.697825, y: 7.2123685, z: 0.005}
258
+ --- !u!4 &400039576
259
+ Transform:
260
+ m_ObjectHideFlags: 0
261
+ m_CorrespondingSourceObject: {fileID: 0}
262
+ m_PrefabInstance: {fileID: 0}
263
+ m_PrefabAsset: {fileID: 0}
264
+ m_GameObject: {fileID: 400039572}
265
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
266
+ m_LocalPosition: {x: -7.61, y: -0.47, z: 0}
267
+ m_LocalScale: {x: 1, y: 1, z: 1}
268
+ m_Children:
269
+ - {fileID: 1865283555}
270
+ m_Father: {fileID: 0}
271
+ m_RootOrder: 1
272
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
273
+ --- !u!1 &1865283552
274
+ GameObject:
275
+ m_ObjectHideFlags: 0
276
+ m_CorrespondingSourceObject: {fileID: 0}
277
+ m_PrefabInstance: {fileID: 0}
278
+ m_PrefabAsset: {fileID: 0}
279
+ serializedVersion: 6
280
+ m_Component:
281
+ - component: {fileID: 1865283555}
282
+ - component: {fileID: 1865283554}
283
+ - component: {fileID: 1865283553}
284
+ - component: {fileID: 1865283556}
285
+ m_Layer: 0
286
+ m_Name: Bottom
287
+ m_TagString: Untagged
288
+ m_Icon: {fileID: 0}
289
+ m_NavMeshLayer: 0
290
+ m_StaticEditorFlags: 0
291
+ m_IsActive: 1
292
+ --- !u!114 &1865283553
293
+ MonoBehaviour:
294
+ m_ObjectHideFlags: 0
295
+ m_CorrespondingSourceObject: {fileID: 0}
296
+ m_PrefabInstance: {fileID: 0}
297
+ m_PrefabAsset: {fileID: 0}
298
+ m_GameObject: {fileID: 1865283552}
299
+ m_Enabled: 1
300
+ m_EditorHideFlags: 0
301
+ m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3}
302
+ m_Name:
303
+ m_EditorClassIdentifier:
304
+ m_LegacyGenerator: 0
305
+ m_Spline:
306
+ m_IsOpenEnded: 1
307
+ m_ControlPoints:
308
+ - position: {x: 0.37061024, y: 7.517852, z: 0}
309
+ leftTangent: {x: 0, y: 0, z: 0}
310
+ rightTangent: {x: 0, y: 0, z: 0}
311
+ mode: 0
312
+ height: 1
313
+ bevelCutoff: 0
314
+ bevelSize: 0
315
+ spriteIndex: 0
316
+ corner: 0
317
+ - position: {x: 0.41290092, y: -1.8726089, z: 0}
318
+ leftTangent: {x: -3.4678102, y: 1.8794639, z: 0}
319
+ rightTangent: {x: 3.4678102, y: -1.8794639, z: 0}
320
+ mode: 1
321
+ height: 1
322
+ bevelCutoff: 0
323
+ bevelSize: 0
324
+ spriteIndex: 0
325
+ corner: 0
326
+ - position: {x: 7.9664383, y: -6.63839, z: 0}
327
+ leftTangent: {x: -4.8397465, y: -0.030138493, z: 0}
328
+ rightTangent: {x: 4.8397465, y: 0.030138493, z: 0}
329
+ mode: 1
330
+ height: 1
331
+ bevelCutoff: 0
332
+ bevelSize: 0
333
+ spriteIndex: 0
334
+ corner: 0
335
+ - position: {x: 15, y: -1, z: 0}
336
+ leftTangent: {x: -3.2519875, y: -2.4569178, z: 0}
337
+ rightTangent: {x: 3.2519875, y: 2.4569178, z: 0}
338
+ mode: 1
339
+ height: 1
340
+ bevelCutoff: 0
341
+ bevelSize: 0
342
+ spriteIndex: 0
343
+ corner: 0
344
+ - position: {x: 14.186232, y: 7.786347, z: 0}
345
+ leftTangent: {x: 0, y: 0, z: 0}
346
+ rightTangent: {x: 0, y: 0, z: 0}
347
+ mode: 0
348
+ height: 1
349
+ bevelCutoff: 0
350
+ bevelSize: 0
351
+ spriteIndex: 0
352
+ corner: 0
353
+ m_SpriteShape: {fileID: 11400000, guid: e03579ec9d1b6c54ea364bd8ee0bcfd8, type: 2}
354
+ m_FillPixelPerUnit: 100
355
+ m_StretchTiling: 1
356
+ m_SplineDetail: 16
357
+ m_AdaptiveUV: 1
358
+ m_StretchUV: 0
359
+ m_WorldSpaceUV: 0
360
+ m_ColliderDetail: 4
361
+ m_ColliderOffset: 0
362
+ m_UpdateCollider: 0
363
+ m_OptimizeCollider: 1
364
+ --- !u!1971053207 &1865283554
365
+ SpriteShapeRenderer:
366
+ m_ObjectHideFlags: 0
367
+ m_CorrespondingSourceObject: {fileID: 0}
368
+ m_PrefabInstance: {fileID: 0}
369
+ m_PrefabAsset: {fileID: 0}
370
+ m_GameObject: {fileID: 1865283552}
371
+ m_Enabled: 1
372
+ m_CastShadows: 1
373
+ m_ReceiveShadows: 1
374
+ m_DynamicOccludee: 0
375
+ m_MotionVectors: 1
376
+ m_LightProbeUsage: 1
377
+ m_ReflectionProbeUsage: 1
378
+ m_RenderingLayerMask: 4294967295
379
+ m_RendererPriority: 0
380
+ m_Materials:
381
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
382
+ m_StaticBatchInfo:
383
+ firstSubMesh: 0
384
+ subMeshCount: 0
385
+ m_StaticBatchRoot: {fileID: 0}
386
+ m_ProbeAnchor: {fileID: 0}
387
+ m_LightProbeVolumeOverride: {fileID: 0}
388
+ m_ScaleInLightmap: 1
389
+ m_PreserveUVs: 0
390
+ m_IgnoreNormalsForChartDetection: 0
391
+ m_ImportantGI: 0
392
+ m_StitchLightmapSeams: 0
393
+ m_SelectedEditorRenderState: 0
394
+ m_MinimumChartSize: 4
395
+ m_AutoUVMaxDistance: 0.5
396
+ m_AutoUVMaxAngle: 89
397
+ m_LightmapParameters: {fileID: 0}
398
+ m_SortingLayerID: 0
399
+ m_SortingLayer: 0
400
+ m_SortingOrder: 0
401
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
402
+ m_MaskInteraction: 0
403
+ m_ShapeTexture: {fileID: 0}
404
+ m_Sprites:
405
+ - {fileID: 21300000, guid: 418ab5c27d3054eb89959d9c715e00c9, type: 3}
406
+ - {fileID: 21300000, guid: e74b518a65bc45f4cace9a2fef6af29d, type: 3}
407
+ m_LocalAABB:
408
+ m_Center: {x: 7.5582957, y: 0.47995615, z: -0.005}
409
+ m_Extent: {x: 9.09759, y: 7.5183325, z: 0.005}
410
+ --- !u!4 &1865283555
411
+ Transform:
412
+ m_ObjectHideFlags: 0
413
+ m_CorrespondingSourceObject: {fileID: 0}
414
+ m_PrefabInstance: {fileID: 0}
415
+ m_PrefabAsset: {fileID: 0}
416
+ m_GameObject: {fileID: 1865283552}
417
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
418
+ m_LocalPosition: {x: 0, y: 0, z: 0}
419
+ m_LocalScale: {x: 1, y: 1, z: 1}
420
+ m_Children: []
421
+ m_Father: {fileID: 400039576}
422
+ m_RootOrder: 0
423
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
424
+ --- !u!114 &1865283556
425
+ MonoBehaviour:
426
+ m_ObjectHideFlags: 0
427
+ m_CorrespondingSourceObject: {fileID: 0}
428
+ m_PrefabInstance: {fileID: 0}
429
+ m_PrefabAsset: {fileID: 0}
430
+ m_GameObject: {fileID: 1865283552}
431
+ m_Enabled: 1
432
+ m_EditorHideFlags: 0
433
+ m_Script: {fileID: 11500000, guid: db6f6067a1e6dd34ca4e2c4b7145e79b, type: 3}
434
+ m_Name:
435
+ m_EditorClassIdentifier:
436
+ m_ParentObject: {fileID: 400039572}
437
+ --- !u!1 &1990748034
438
+ GameObject:
439
+ m_ObjectHideFlags: 0
440
+ m_CorrespondingSourceObject: {fileID: 0}
441
+ m_PrefabInstance: {fileID: 0}
442
+ m_PrefabAsset: {fileID: 0}
443
+ serializedVersion: 6
444
+ m_Component:
445
+ - component: {fileID: 1990748038}
446
+ - component: {fileID: 1990748037}
447
+ - component: {fileID: 1990748036}
448
+ - component: {fileID: 1990748035}
449
+ m_Layer: 0
450
+ m_Name: Main Camera
451
+ m_TagString: MainCamera
452
+ m_Icon: {fileID: 0}
453
+ m_NavMeshLayer: 0
454
+ m_StaticEditorFlags: 0
455
+ m_IsActive: 1
456
+ --- !u!81 &1990748035
457
+ AudioListener:
458
+ m_ObjectHideFlags: 0
459
+ m_CorrespondingSourceObject: {fileID: 0}
460
+ m_PrefabInstance: {fileID: 0}
461
+ m_PrefabAsset: {fileID: 0}
462
+ m_GameObject: {fileID: 1990748034}
463
+ m_Enabled: 1
464
+ --- !u!124 &1990748036
465
+ Behaviour:
466
+ m_ObjectHideFlags: 0
467
+ m_CorrespondingSourceObject: {fileID: 0}
468
+ m_PrefabInstance: {fileID: 0}
469
+ m_PrefabAsset: {fileID: 0}
470
+ m_GameObject: {fileID: 1990748034}
471
+ m_Enabled: 1
472
+ --- !u!20 &1990748037
473
+ Camera:
474
+ m_ObjectHideFlags: 0
475
+ m_CorrespondingSourceObject: {fileID: 0}
476
+ m_PrefabInstance: {fileID: 0}
477
+ m_PrefabAsset: {fileID: 0}
478
+ m_GameObject: {fileID: 1990748034}
479
+ m_Enabled: 1
480
+ serializedVersion: 2
481
+ m_ClearFlags: 2
482
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
483
+ m_projectionMatrixMode: 1
484
+ m_GateFitMode: 2
485
+ m_FOVAxisMode: 0
486
+ m_SensorSize: {x: 36, y: 24}
487
+ m_LensShift: {x: 0, y: 0}
488
+ m_FocalLength: 50
489
+ m_NormalizedViewPortRect:
490
+ serializedVersion: 2
491
+ x: 0
492
+ y: 0
493
+ width: 1
494
+ height: 1
495
+ near clip plane: 0.3
496
+ far clip plane: 1000
497
+ field of view: 60
498
+ orthographic: 1
499
+ orthographic size: 15
500
+ m_Depth: -1
501
+ m_CullingMask:
502
+ serializedVersion: 2
503
+ m_Bits: 4294967295
504
+ m_RenderingPath: -1
505
+ m_TargetTexture: {fileID: 0}
506
+ m_TargetDisplay: 0
507
+ m_TargetEye: 3
508
+ m_HDR: 1
509
+ m_AllowMSAA: 1
510
+ m_AllowDynamicResolution: 0
511
+ m_ForceIntoRT: 0
512
+ m_OcclusionCulling: 1
513
+ m_StereoConvergence: 10
514
+ m_StereoSeparation: 0.022
515
+ --- !u!4 &1990748038
516
+ Transform:
517
+ m_ObjectHideFlags: 0
518
+ m_CorrespondingSourceObject: {fileID: 0}
519
+ m_PrefabInstance: {fileID: 0}
520
+ m_PrefabAsset: {fileID: 0}
521
+ m_GameObject: {fileID: 1990748034}
522
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
523
+ m_LocalPosition: {x: 0, y: 1, z: -10}
524
+ m_LocalScale: {x: 1, y: 1, z: 1}
525
+ m_Children: []
526
+ m_Father: {fileID: 0}
527
+ m_RootOrder: 0
528
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/ConformingSplineScene.unity.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: b8529774cb716f645b682951a7aae689
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimpleDrawScene.unity ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!29 &1
4
+ OcclusionCullingSettings:
5
+ m_ObjectHideFlags: 0
6
+ serializedVersion: 2
7
+ m_OcclusionBakeSettings:
8
+ smallestOccluder: 5
9
+ smallestHole: 0.25
10
+ backfaceThreshold: 100
11
+ m_SceneGUID: 00000000000000000000000000000000
12
+ m_OcclusionCullingData: {fileID: 0}
13
+ --- !u!104 &2
14
+ RenderSettings:
15
+ m_ObjectHideFlags: 0
16
+ serializedVersion: 9
17
+ m_Fog: 0
18
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19
+ m_FogMode: 3
20
+ m_FogDensity: 0.01
21
+ m_LinearFogStart: 0
22
+ m_LinearFogEnd: 300
23
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26
+ m_AmbientIntensity: 1
27
+ m_AmbientMode: 0
28
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29
+ m_SkyboxMaterial: {fileID: 0}
30
+ m_HaloStrength: 0.5
31
+ m_FlareStrength: 1
32
+ m_FlareFadeSpeed: 3
33
+ m_HaloTexture: {fileID: 0}
34
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35
+ m_DefaultReflectionMode: 0
36
+ m_DefaultReflectionResolution: 128
37
+ m_ReflectionBounces: 1
38
+ m_ReflectionIntensity: 1
39
+ m_CustomReflection: {fileID: 0}
40
+ m_Sun: {fileID: 0}
41
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42
+ m_UseRadianceAmbientProbe: 0
43
+ --- !u!157 &3
44
+ LightmapSettings:
45
+ m_ObjectHideFlags: 0
46
+ serializedVersion: 11
47
+ m_GIWorkflowMode: 0
48
+ m_GISettings:
49
+ serializedVersion: 2
50
+ m_BounceScale: 1
51
+ m_IndirectOutputScale: 1
52
+ m_AlbedoBoost: 1
53
+ m_TemporalCoherenceThreshold: 1
54
+ m_EnvironmentLightingMode: 0
55
+ m_EnableBakedLightmaps: 1
56
+ m_EnableRealtimeLightmaps: 1
57
+ m_LightmapEditorSettings:
58
+ serializedVersion: 10
59
+ m_Resolution: 2
60
+ m_BakeResolution: 40
61
+ m_AtlasSize: 1024
62
+ m_AO: 0
63
+ m_AOMaxDistance: 1
64
+ m_CompAOExponent: 1
65
+ m_CompAOExponentDirect: 0
66
+ m_Padding: 2
67
+ m_LightmapParameters: {fileID: 0}
68
+ m_LightmapsBakeMode: 1
69
+ m_TextureCompression: 1
70
+ m_FinalGather: 0
71
+ m_FinalGatherFiltering: 1
72
+ m_FinalGatherRayCount: 256
73
+ m_ReflectionCompression: 2
74
+ m_MixedBakeMode: 2
75
+ m_BakeBackend: 1
76
+ m_PVRSampling: 1
77
+ m_PVRDirectSampleCount: 32
78
+ m_PVRSampleCount: 500
79
+ m_PVRBounces: 2
80
+ m_PVRFilterTypeDirect: 0
81
+ m_PVRFilterTypeIndirect: 0
82
+ m_PVRFilterTypeAO: 0
83
+ m_PVRFilteringMode: 1
84
+ m_PVRCulling: 1
85
+ m_PVRFilteringGaussRadiusDirect: 1
86
+ m_PVRFilteringGaussRadiusIndirect: 5
87
+ m_PVRFilteringGaussRadiusAO: 2
88
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
89
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
90
+ m_PVRFilteringAtrousPositionSigmaAO: 1
91
+ m_ShowResolutionOverlay: 1
92
+ m_LightingDataAsset: {fileID: 0}
93
+ m_UseShadowmask: 1
94
+ --- !u!196 &4
95
+ NavMeshSettings:
96
+ serializedVersion: 2
97
+ m_ObjectHideFlags: 0
98
+ m_BuildSettings:
99
+ serializedVersion: 2
100
+ agentTypeID: 0
101
+ agentRadius: 0.5
102
+ agentHeight: 2
103
+ agentSlope: 45
104
+ agentClimb: 0.4
105
+ ledgeDropHeight: 0
106
+ maxJumpAcrossDistance: 0
107
+ minRegionArea: 2
108
+ manualCellSize: 0
109
+ cellSize: 0.16666667
110
+ manualTileSize: 0
111
+ tileSize: 256
112
+ accuratePlacement: 0
113
+ debug:
114
+ m_Flags: 0
115
+ m_NavMeshData: {fileID: 0}
116
+ --- !u!1 &1048079211
117
+ GameObject:
118
+ m_ObjectHideFlags: 0
119
+ m_CorrespondingSourceObject: {fileID: 0}
120
+ m_PrefabInternal: {fileID: 0}
121
+ serializedVersion: 6
122
+ m_Component:
123
+ - component: {fileID: 1048079214}
124
+ - component: {fileID: 1048079213}
125
+ - component: {fileID: 1048079212}
126
+ m_Layer: 0
127
+ m_Name: Main Camera
128
+ m_TagString: MainCamera
129
+ m_Icon: {fileID: 0}
130
+ m_NavMeshLayer: 0
131
+ m_StaticEditorFlags: 0
132
+ m_IsActive: 1
133
+ --- !u!81 &1048079212
134
+ AudioListener:
135
+ m_ObjectHideFlags: 0
136
+ m_CorrespondingSourceObject: {fileID: 0}
137
+ m_PrefabInternal: {fileID: 0}
138
+ m_GameObject: {fileID: 1048079211}
139
+ m_Enabled: 1
140
+ --- !u!20 &1048079213
141
+ Camera:
142
+ m_ObjectHideFlags: 0
143
+ m_CorrespondingSourceObject: {fileID: 0}
144
+ m_PrefabInternal: {fileID: 0}
145
+ m_GameObject: {fileID: 1048079211}
146
+ m_Enabled: 1
147
+ serializedVersion: 2
148
+ m_ClearFlags: 2
149
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
150
+ m_projectionMatrixMode: 1
151
+ m_SensorSize: {x: 36, y: 24}
152
+ m_LensShift: {x: 0, y: 0}
153
+ m_FocalLength: 50
154
+ m_NormalizedViewPortRect:
155
+ serializedVersion: 2
156
+ x: 0
157
+ y: 0
158
+ width: 1
159
+ height: 1
160
+ near clip plane: 0.3
161
+ far clip plane: 1000
162
+ field of view: 60
163
+ orthographic: 1
164
+ orthographic size: 5
165
+ m_Depth: -1
166
+ m_CullingMask:
167
+ serializedVersion: 2
168
+ m_Bits: 4294967295
169
+ m_RenderingPath: -1
170
+ m_TargetTexture: {fileID: 0}
171
+ m_TargetDisplay: 0
172
+ m_TargetEye: 3
173
+ m_HDR: 1
174
+ m_AllowMSAA: 1
175
+ m_AllowDynamicResolution: 0
176
+ m_ForceIntoRT: 0
177
+ m_OcclusionCulling: 1
178
+ m_StereoConvergence: 10
179
+ m_StereoSeparation: 0.022
180
+ --- !u!4 &1048079214
181
+ Transform:
182
+ m_ObjectHideFlags: 0
183
+ m_CorrespondingSourceObject: {fileID: 0}
184
+ m_PrefabInternal: {fileID: 0}
185
+ m_GameObject: {fileID: 1048079211}
186
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
187
+ m_LocalPosition: {x: 0, y: 1, z: -10}
188
+ m_LocalScale: {x: 1, y: 1, z: 1}
189
+ m_Children: []
190
+ m_Father: {fileID: 0}
191
+ m_RootOrder: 0
192
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
193
+ --- !u!1 &1480543089
194
+ GameObject:
195
+ m_ObjectHideFlags: 0
196
+ m_CorrespondingSourceObject: {fileID: 0}
197
+ m_PrefabInternal: {fileID: 0}
198
+ serializedVersion: 6
199
+ m_Component:
200
+ - component: {fileID: 1480543093}
201
+ - component: {fileID: 1480543092}
202
+ - component: {fileID: 1480543091}
203
+ - component: {fileID: 1480543090}
204
+ m_Layer: 0
205
+ m_Name: SpriteShape
206
+ m_TagString: Untagged
207
+ m_Icon: {fileID: 0}
208
+ m_NavMeshLayer: 0
209
+ m_StaticEditorFlags: 0
210
+ m_IsActive: 1
211
+ --- !u!114 &1480543090
212
+ MonoBehaviour:
213
+ m_ObjectHideFlags: 0
214
+ m_CorrespondingSourceObject: {fileID: 0}
215
+ m_PrefabInternal: {fileID: 0}
216
+ m_GameObject: {fileID: 1480543089}
217
+ m_Enabled: 1
218
+ m_EditorHideFlags: 0
219
+ m_Script: {fileID: 11500000, guid: 922bb1bbfeaeb9a4c9204b7d0bc3d8c8, type: 3}
220
+ m_Name:
221
+ m_EditorClassIdentifier:
222
+ minimumDistance: 1
223
+ --- !u!114 &1480543091
224
+ MonoBehaviour:
225
+ m_ObjectHideFlags: 0
226
+ m_CorrespondingSourceObject: {fileID: 0}
227
+ m_PrefabInternal: {fileID: 0}
228
+ m_GameObject: {fileID: 1480543089}
229
+ m_Enabled: 1
230
+ m_EditorHideFlags: 0
231
+ m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3}
232
+ m_Name:
233
+ m_EditorClassIdentifier:
234
+ m_Spline:
235
+ m_IsOpenEnded: 1
236
+ m_ControlPoints:
237
+ - position: {x: -1, y: 0, z: 0}
238
+ leftTangent: {x: 0, y: 0, z: 0}
239
+ rightTangent: {x: 0, y: 0, z: 0}
240
+ mode: 0
241
+ height: 1
242
+ bevelCutoff: 0
243
+ bevelSize: 0
244
+ spriteIndex: 1
245
+ corner: 0
246
+ - position: {x: 1, y: 0, z: 0}
247
+ leftTangent: {x: 0, y: 0, z: 0}
248
+ rightTangent: {x: 0, y: 0, z: 0}
249
+ mode: 0
250
+ height: 1
251
+ bevelCutoff: 0
252
+ bevelSize: 0.216
253
+ spriteIndex: 0
254
+ corner: 0
255
+ m_SpriteShape: {fileID: 11400000, guid: e03579ec9d1b6c54ea364bd8ee0bcfd8, type: 2}
256
+ m_SplineDetail: 16
257
+ m_AdaptiveUV: 1
258
+ m_UpdateCollider: 0
259
+ m_ColliderDetail: 4
260
+ m_ColliderOffset: 0
261
+ m_ColliderCornerType: 0
262
+ --- !u!1971053207 &1480543092
263
+ SpriteShapeRenderer:
264
+ m_ObjectHideFlags: 0
265
+ m_CorrespondingSourceObject: {fileID: 0}
266
+ m_PrefabInternal: {fileID: 0}
267
+ m_GameObject: {fileID: 1480543089}
268
+ m_Enabled: 1
269
+ m_CastShadows: 1
270
+ m_ReceiveShadows: 1
271
+ m_DynamicOccludee: 0
272
+ m_MotionVectors: 1
273
+ m_LightProbeUsage: 1
274
+ m_ReflectionProbeUsage: 1
275
+ m_RenderingLayerMask: 4294967295
276
+ m_Materials:
277
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
278
+ m_StaticBatchInfo:
279
+ firstSubMesh: 0
280
+ subMeshCount: 0
281
+ m_StaticBatchRoot: {fileID: 0}
282
+ m_ProbeAnchor: {fileID: 0}
283
+ m_LightProbeVolumeOverride: {fileID: 0}
284
+ m_ScaleInLightmap: 1
285
+ m_PreserveUVs: 0
286
+ m_IgnoreNormalsForChartDetection: 0
287
+ m_ImportantGI: 0
288
+ m_StitchLightmapSeams: 0
289
+ m_SelectedEditorRenderState: 0
290
+ m_MinimumChartSize: 4
291
+ m_AutoUVMaxDistance: 0.5
292
+ m_AutoUVMaxAngle: 89
293
+ m_LightmapParameters: {fileID: 0}
294
+ m_SortingLayerID: 0
295
+ m_SortingLayer: 0
296
+ m_SortingOrder: 0
297
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
298
+ m_MaskInteraction: 0
299
+ m_ShapeTexture: {fileID: 0}
300
+ m_Sprites:
301
+ - {fileID: 21300000, guid: 418ab5c27d3054eb89959d9c715e00c9, type: 3}
302
+ - {fileID: 21300000, guid: e74b518a65bc45f4cace9a2fef6af29d, type: 3}
303
+ - {fileID: 0}
304
+ - {fileID: 0}
305
+ - {fileID: 0}
306
+ - {fileID: 0}
307
+ - {fileID: 0}
308
+ - {fileID: 0}
309
+ - {fileID: 0}
310
+ - {fileID: 0}
311
+ m_LocalAABB:
312
+ m_Center: {x: 0, y: 0.20000002, z: 0}
313
+ m_Extent: {x: 1, y: 0.20000002, z: 0}
314
+ --- !u!4 &1480543093
315
+ Transform:
316
+ m_ObjectHideFlags: 0
317
+ m_CorrespondingSourceObject: {fileID: 0}
318
+ m_PrefabInternal: {fileID: 0}
319
+ m_GameObject: {fileID: 1480543089}
320
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
321
+ m_LocalPosition: {x: 0, y: 0, z: 0}
322
+ m_LocalScale: {x: 1, y: 1, z: 1}
323
+ m_Children: []
324
+ m_Father: {fileID: 0}
325
+ m_RootOrder: 1
326
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimpleDrawScene.unity.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: e182160e1c8c64844872387ebf59c6e9
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimplifiedSpriteShape.unity ADDED
@@ -0,0 +1,382 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!29 &1
4
+ OcclusionCullingSettings:
5
+ m_ObjectHideFlags: 0
6
+ serializedVersion: 2
7
+ m_OcclusionBakeSettings:
8
+ smallestOccluder: 5
9
+ smallestHole: 0.25
10
+ backfaceThreshold: 100
11
+ m_SceneGUID: 00000000000000000000000000000000
12
+ m_OcclusionCullingData: {fileID: 0}
13
+ --- !u!104 &2
14
+ RenderSettings:
15
+ m_ObjectHideFlags: 0
16
+ serializedVersion: 9
17
+ m_Fog: 0
18
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19
+ m_FogMode: 3
20
+ m_FogDensity: 0.01
21
+ m_LinearFogStart: 0
22
+ m_LinearFogEnd: 300
23
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26
+ m_AmbientIntensity: 1
27
+ m_AmbientMode: 0
28
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29
+ m_SkyboxMaterial: {fileID: 0}
30
+ m_HaloStrength: 0.5
31
+ m_FlareStrength: 1
32
+ m_FlareFadeSpeed: 3
33
+ m_HaloTexture: {fileID: 0}
34
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35
+ m_DefaultReflectionMode: 0
36
+ m_DefaultReflectionResolution: 128
37
+ m_ReflectionBounces: 1
38
+ m_ReflectionIntensity: 1
39
+ m_CustomReflection: {fileID: 0}
40
+ m_Sun: {fileID: 0}
41
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42
+ m_UseRadianceAmbientProbe: 0
43
+ --- !u!157 &3
44
+ LightmapSettings:
45
+ m_ObjectHideFlags: 0
46
+ serializedVersion: 11
47
+ m_GIWorkflowMode: 0
48
+ m_GISettings:
49
+ serializedVersion: 2
50
+ m_BounceScale: 1
51
+ m_IndirectOutputScale: 1
52
+ m_AlbedoBoost: 1
53
+ m_EnvironmentLightingMode: 0
54
+ m_EnableBakedLightmaps: 1
55
+ m_EnableRealtimeLightmaps: 1
56
+ m_LightmapEditorSettings:
57
+ serializedVersion: 12
58
+ m_Resolution: 2
59
+ m_BakeResolution: 40
60
+ m_AtlasSize: 1024
61
+ m_AO: 0
62
+ m_AOMaxDistance: 1
63
+ m_CompAOExponent: 1
64
+ m_CompAOExponentDirect: 0
65
+ m_ExtractAmbientOcclusion: 0
66
+ m_Padding: 2
67
+ m_LightmapParameters: {fileID: 0}
68
+ m_LightmapsBakeMode: 1
69
+ m_TextureCompression: 1
70
+ m_FinalGather: 0
71
+ m_FinalGatherFiltering: 1
72
+ m_FinalGatherRayCount: 256
73
+ m_ReflectionCompression: 2
74
+ m_MixedBakeMode: 2
75
+ m_BakeBackend: 1
76
+ m_PVRSampling: 1
77
+ m_PVRDirectSampleCount: 32
78
+ m_PVRSampleCount: 500
79
+ m_PVRBounces: 2
80
+ m_PVREnvironmentSampleCount: 500
81
+ m_PVREnvironmentReferencePointCount: 2048
82
+ m_PVRFilteringMode: 2
83
+ m_PVRDenoiserTypeDirect: 0
84
+ m_PVRDenoiserTypeIndirect: 0
85
+ m_PVRDenoiserTypeAO: 0
86
+ m_PVRFilterTypeDirect: 0
87
+ m_PVRFilterTypeIndirect: 0
88
+ m_PVRFilterTypeAO: 0
89
+ m_PVREnvironmentMIS: 0
90
+ m_PVRCulling: 1
91
+ m_PVRFilteringGaussRadiusDirect: 1
92
+ m_PVRFilteringGaussRadiusIndirect: 5
93
+ m_PVRFilteringGaussRadiusAO: 2
94
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
96
+ m_PVRFilteringAtrousPositionSigmaAO: 1
97
+ m_ExportTrainingData: 0
98
+ m_TrainingDataDestination: TrainingData
99
+ m_LightingDataAsset: {fileID: 0}
100
+ m_UseShadowmask: 1
101
+ --- !u!196 &4
102
+ NavMeshSettings:
103
+ serializedVersion: 2
104
+ m_ObjectHideFlags: 0
105
+ m_BuildSettings:
106
+ serializedVersion: 2
107
+ agentTypeID: 0
108
+ agentRadius: 0.5
109
+ agentHeight: 2
110
+ agentSlope: 45
111
+ agentClimb: 0.4
112
+ ledgeDropHeight: 0
113
+ maxJumpAcrossDistance: 0
114
+ minRegionArea: 2
115
+ manualCellSize: 0
116
+ cellSize: 0.16666667
117
+ manualTileSize: 0
118
+ tileSize: 256
119
+ accuratePlacement: 0
120
+ debug:
121
+ m_Flags: 0
122
+ m_NavMeshData: {fileID: 0}
123
+ --- !u!1 &53845803
124
+ GameObject:
125
+ m_ObjectHideFlags: 0
126
+ m_CorrespondingSourceObject: {fileID: 0}
127
+ m_PrefabInstance: {fileID: 0}
128
+ m_PrefabAsset: {fileID: 0}
129
+ serializedVersion: 6
130
+ m_Component:
131
+ - component: {fileID: 53845806}
132
+ - component: {fileID: 53845805}
133
+ - component: {fileID: 53845804}
134
+ m_Layer: 0
135
+ m_Name: SpriteShape
136
+ m_TagString: Untagged
137
+ m_Icon: {fileID: 0}
138
+ m_NavMeshLayer: 0
139
+ m_StaticEditorFlags: 0
140
+ m_IsActive: 1
141
+ --- !u!114 &53845804
142
+ MonoBehaviour:
143
+ m_ObjectHideFlags: 0
144
+ m_CorrespondingSourceObject: {fileID: 0}
145
+ m_PrefabInstance: {fileID: 0}
146
+ m_PrefabAsset: {fileID: 0}
147
+ m_GameObject: {fileID: 53845803}
148
+ m_Enabled: 1
149
+ m_EditorHideFlags: 0
150
+ m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3}
151
+ m_Name:
152
+ m_EditorClassIdentifier:
153
+ m_LegacyGenerator: 0
154
+ m_Spline:
155
+ m_IsOpenEnded: 0
156
+ m_ControlPoints:
157
+ - position: {x: 0.12956464, y: 1.8859321, z: 0}
158
+ leftTangent: {x: 0.87607896, y: -0.028361678, z: 0}
159
+ rightTangent: {x: -0.876079, y: 0.028361678, z: 0}
160
+ mode: 1
161
+ height: 1
162
+ bevelCutoff: 180
163
+ bevelSize: 0.5
164
+ spriteIndex: 0
165
+ corner: 0
166
+ - position: {x: -2, y: 0, z: 0}
167
+ leftTangent: {x: 0.7276257, y: 0.5038886, z: 0}
168
+ rightTangent: {x: -0.72762585, y: -0.5038886, z: 0}
169
+ mode: 1
170
+ height: 1
171
+ bevelCutoff: 0
172
+ bevelSize: 0
173
+ spriteIndex: 0
174
+ corner: 0
175
+ - position: {x: -4.370756, y: -1.2540917, z: 0}
176
+ leftTangent: {x: 0.27876043, y: 0.84002125, z: 0}
177
+ rightTangent: {x: -0.27876043, y: -0.84002113, z: 0}
178
+ mode: 1
179
+ height: 1
180
+ bevelCutoff: 180
181
+ bevelSize: 0.424
182
+ spriteIndex: 0
183
+ corner: 0
184
+ - position: {x: -2.9905427, y: -4.1601443, z: 0}
185
+ leftTangent: {x: -1.0090494, y: 0.19818997, z: 0}
186
+ rightTangent: {x: 1.0090494, y: -0.19819021, z: 0}
187
+ mode: 1
188
+ height: 1
189
+ bevelCutoff: 175
190
+ bevelSize: 0.473
191
+ spriteIndex: 0
192
+ corner: 0
193
+ - position: {x: -0.68832755, y: -2.0601013, z: 0}
194
+ leftTangent: {x: -1.020073, y: -0.13004279, z: 0}
195
+ rightTangent: {x: 1.020073, y: 0.13004267, z: 0}
196
+ mode: 1
197
+ height: 1
198
+ bevelCutoff: 0
199
+ bevelSize: 0
200
+ spriteIndex: 0
201
+ corner: 0
202
+ - position: {x: 2.4391866, y: -3.7118704, z: 0}
203
+ leftTangent: {x: -1.0588536, y: -0.24282193, z: 0}
204
+ rightTangent: {x: 1.0588536, y: 0.24282193, z: 0}
205
+ mode: 1
206
+ height: 1
207
+ bevelCutoff: 0
208
+ bevelSize: 0
209
+ spriteIndex: 0
210
+ corner: 0
211
+ - position: {x: 4.389332, y: -1.0597417, z: 0}
212
+ leftTangent: {x: 0.22145462, y: -0.83364165, z: 0}
213
+ rightTangent: {x: -0.22145462, y: 0.83364165, z: 0}
214
+ mode: 1
215
+ height: 1
216
+ bevelCutoff: 180
217
+ bevelSize: 0.407
218
+ spriteIndex: 0
219
+ corner: 0
220
+ - position: {x: 2, y: 0, z: 0}
221
+ leftTangent: {x: 0.71019197, y: -0.4895181, z: 0}
222
+ rightTangent: {x: -0.71019197, y: 0.4895181, z: 0}
223
+ mode: 1
224
+ height: 1
225
+ bevelCutoff: 0
226
+ bevelSize: 0
227
+ spriteIndex: 0
228
+ corner: 0
229
+ m_SpriteShape: {fileID: 11400000, guid: 19b9cf308de41834c9968d12bec673b1, type: 2}
230
+ m_FillPixelPerUnit: 100
231
+ m_StretchTiling: 1
232
+ m_SplineDetail: 16
233
+ m_AdaptiveUV: 1
234
+ m_StretchUV: 0
235
+ m_WorldSpaceUV: 0
236
+ m_ColliderDetail: 4
237
+ m_ColliderOffset: 0
238
+ m_UpdateCollider: 0
239
+ m_OptimizeCollider: 1
240
+ --- !u!1971053207 &53845805
241
+ SpriteShapeRenderer:
242
+ m_ObjectHideFlags: 0
243
+ m_CorrespondingSourceObject: {fileID: 0}
244
+ m_PrefabInstance: {fileID: 0}
245
+ m_PrefabAsset: {fileID: 0}
246
+ m_GameObject: {fileID: 53845803}
247
+ m_Enabled: 1
248
+ m_CastShadows: 1
249
+ m_ReceiveShadows: 1
250
+ m_DynamicOccludee: 1
251
+ m_MotionVectors: 1
252
+ m_LightProbeUsage: 1
253
+ m_ReflectionProbeUsage: 1
254
+ m_RenderingLayerMask: 4294967295
255
+ m_RendererPriority: 0
256
+ m_Materials:
257
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
258
+ m_StaticBatchInfo:
259
+ firstSubMesh: 0
260
+ subMeshCount: 0
261
+ m_StaticBatchRoot: {fileID: 0}
262
+ m_ProbeAnchor: {fileID: 0}
263
+ m_LightProbeVolumeOverride: {fileID: 0}
264
+ m_ScaleInLightmap: 1
265
+ m_ReceiveGI: 1
266
+ m_PreserveUVs: 0
267
+ m_IgnoreNormalsForChartDetection: 0
268
+ m_ImportantGI: 0
269
+ m_StitchLightmapSeams: 0
270
+ m_SelectedEditorRenderState: 0
271
+ m_MinimumChartSize: 4
272
+ m_AutoUVMaxDistance: 0.5
273
+ m_AutoUVMaxAngle: 89
274
+ m_LightmapParameters: {fileID: 0}
275
+ m_SortingLayerID: 0
276
+ m_SortingLayer: 0
277
+ m_SortingOrder: 0
278
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
279
+ m_MaskInteraction: 0
280
+ m_ShapeTexture: {fileID: 0}
281
+ m_Sprites:
282
+ - {fileID: 21300000, guid: c6dabd295b8ab514fa47b5d4e2b0266e, type: 3}
283
+ m_LocalAABB:
284
+ m_Center: {x: -0.009027481, y: -1.1412225, z: -0.005}
285
+ m_Extent: {x: 4.6648436, y: 3.2670288, z: 0.005}
286
+ --- !u!4 &53845806
287
+ Transform:
288
+ m_ObjectHideFlags: 0
289
+ m_CorrespondingSourceObject: {fileID: 0}
290
+ m_PrefabInstance: {fileID: 0}
291
+ m_PrefabAsset: {fileID: 0}
292
+ m_GameObject: {fileID: 53845803}
293
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
294
+ m_LocalPosition: {x: 0, y: 0, z: 0}
295
+ m_LocalScale: {x: 1, y: 1, z: 1}
296
+ m_Children: []
297
+ m_Father: {fileID: 0}
298
+ m_RootOrder: 1
299
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
300
+ --- !u!1 &408902805
301
+ GameObject:
302
+ m_ObjectHideFlags: 0
303
+ m_CorrespondingSourceObject: {fileID: 0}
304
+ m_PrefabInstance: {fileID: 0}
305
+ m_PrefabAsset: {fileID: 0}
306
+ serializedVersion: 6
307
+ m_Component:
308
+ - component: {fileID: 408902808}
309
+ - component: {fileID: 408902807}
310
+ - component: {fileID: 408902806}
311
+ m_Layer: 0
312
+ m_Name: Main Camera
313
+ m_TagString: MainCamera
314
+ m_Icon: {fileID: 0}
315
+ m_NavMeshLayer: 0
316
+ m_StaticEditorFlags: 0
317
+ m_IsActive: 1
318
+ --- !u!81 &408902806
319
+ AudioListener:
320
+ m_ObjectHideFlags: 0
321
+ m_CorrespondingSourceObject: {fileID: 0}
322
+ m_PrefabInstance: {fileID: 0}
323
+ m_PrefabAsset: {fileID: 0}
324
+ m_GameObject: {fileID: 408902805}
325
+ m_Enabled: 1
326
+ --- !u!20 &408902807
327
+ Camera:
328
+ m_ObjectHideFlags: 0
329
+ m_CorrespondingSourceObject: {fileID: 0}
330
+ m_PrefabInstance: {fileID: 0}
331
+ m_PrefabAsset: {fileID: 0}
332
+ m_GameObject: {fileID: 408902805}
333
+ m_Enabled: 1
334
+ serializedVersion: 2
335
+ m_ClearFlags: 2
336
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
337
+ m_projectionMatrixMode: 1
338
+ m_GateFitMode: 2
339
+ m_FOVAxisMode: 0
340
+ m_SensorSize: {x: 36, y: 24}
341
+ m_LensShift: {x: 0, y: 0}
342
+ m_FocalLength: 50
343
+ m_NormalizedViewPortRect:
344
+ serializedVersion: 2
345
+ x: 0
346
+ y: 0
347
+ width: 1
348
+ height: 1
349
+ near clip plane: 0.3
350
+ far clip plane: 1000
351
+ field of view: 60
352
+ orthographic: 1
353
+ orthographic size: 5
354
+ m_Depth: -1
355
+ m_CullingMask:
356
+ serializedVersion: 2
357
+ m_Bits: 4294967295
358
+ m_RenderingPath: -1
359
+ m_TargetTexture: {fileID: 0}
360
+ m_TargetDisplay: 0
361
+ m_TargetEye: 3
362
+ m_HDR: 1
363
+ m_AllowMSAA: 1
364
+ m_AllowDynamicResolution: 0
365
+ m_ForceIntoRT: 0
366
+ m_OcclusionCulling: 1
367
+ m_StereoConvergence: 10
368
+ m_StereoSeparation: 0.022
369
+ --- !u!4 &408902808
370
+ Transform:
371
+ m_ObjectHideFlags: 0
372
+ m_CorrespondingSourceObject: {fileID: 0}
373
+ m_PrefabInstance: {fileID: 0}
374
+ m_PrefabAsset: {fileID: 0}
375
+ m_GameObject: {fileID: 408902805}
376
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
377
+ m_LocalPosition: {x: 0, y: 0, z: -10}
378
+ m_LocalScale: {x: 1, y: 1, z: 1}
379
+ m_Children: []
380
+ m_Father: {fileID: 0}
381
+ m_RootOrder: 0
382
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SimplifiedSpriteShape.unity.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 254bf62203b7710419a1e6283f7e049b
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SprinklePrefabs.unity ADDED
@@ -0,0 +1,373 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!29 &1
4
+ OcclusionCullingSettings:
5
+ m_ObjectHideFlags: 0
6
+ serializedVersion: 2
7
+ m_OcclusionBakeSettings:
8
+ smallestOccluder: 5
9
+ smallestHole: 0.25
10
+ backfaceThreshold: 100
11
+ m_SceneGUID: 00000000000000000000000000000000
12
+ m_OcclusionCullingData: {fileID: 0}
13
+ --- !u!104 &2
14
+ RenderSettings:
15
+ m_ObjectHideFlags: 0
16
+ serializedVersion: 9
17
+ m_Fog: 0
18
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19
+ m_FogMode: 3
20
+ m_FogDensity: 0.01
21
+ m_LinearFogStart: 0
22
+ m_LinearFogEnd: 300
23
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26
+ m_AmbientIntensity: 1
27
+ m_AmbientMode: 0
28
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29
+ m_SkyboxMaterial: {fileID: 0}
30
+ m_HaloStrength: 0.5
31
+ m_FlareStrength: 1
32
+ m_FlareFadeSpeed: 3
33
+ m_HaloTexture: {fileID: 0}
34
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35
+ m_DefaultReflectionMode: 0
36
+ m_DefaultReflectionResolution: 128
37
+ m_ReflectionBounces: 1
38
+ m_ReflectionIntensity: 1
39
+ m_CustomReflection: {fileID: 0}
40
+ m_Sun: {fileID: 0}
41
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42
+ m_UseRadianceAmbientProbe: 0
43
+ --- !u!157 &3
44
+ LightmapSettings:
45
+ m_ObjectHideFlags: 0
46
+ serializedVersion: 11
47
+ m_GIWorkflowMode: 0
48
+ m_GISettings:
49
+ serializedVersion: 2
50
+ m_BounceScale: 1
51
+ m_IndirectOutputScale: 1
52
+ m_AlbedoBoost: 1
53
+ m_TemporalCoherenceThreshold: 1
54
+ m_EnvironmentLightingMode: 0
55
+ m_EnableBakedLightmaps: 1
56
+ m_EnableRealtimeLightmaps: 1
57
+ m_LightmapEditorSettings:
58
+ serializedVersion: 10
59
+ m_Resolution: 2
60
+ m_BakeResolution: 40
61
+ m_AtlasSize: 1024
62
+ m_AO: 0
63
+ m_AOMaxDistance: 1
64
+ m_CompAOExponent: 1
65
+ m_CompAOExponentDirect: 0
66
+ m_Padding: 2
67
+ m_LightmapParameters: {fileID: 0}
68
+ m_LightmapsBakeMode: 1
69
+ m_TextureCompression: 1
70
+ m_FinalGather: 0
71
+ m_FinalGatherFiltering: 1
72
+ m_FinalGatherRayCount: 256
73
+ m_ReflectionCompression: 2
74
+ m_MixedBakeMode: 2
75
+ m_BakeBackend: 1
76
+ m_PVRSampling: 1
77
+ m_PVRDirectSampleCount: 32
78
+ m_PVRSampleCount: 500
79
+ m_PVRBounces: 2
80
+ m_PVRFilterTypeDirect: 0
81
+ m_PVRFilterTypeIndirect: 0
82
+ m_PVRFilterTypeAO: 0
83
+ m_PVRFilteringMode: 1
84
+ m_PVRCulling: 1
85
+ m_PVRFilteringGaussRadiusDirect: 1
86
+ m_PVRFilteringGaussRadiusIndirect: 5
87
+ m_PVRFilteringGaussRadiusAO: 2
88
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
89
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
90
+ m_PVRFilteringAtrousPositionSigmaAO: 1
91
+ m_ShowResolutionOverlay: 1
92
+ m_LightingDataAsset: {fileID: 0}
93
+ m_UseShadowmask: 1
94
+ --- !u!196 &4
95
+ NavMeshSettings:
96
+ serializedVersion: 2
97
+ m_ObjectHideFlags: 0
98
+ m_BuildSettings:
99
+ serializedVersion: 2
100
+ agentTypeID: 0
101
+ agentRadius: 0.5
102
+ agentHeight: 2
103
+ agentSlope: 45
104
+ agentClimb: 0.4
105
+ ledgeDropHeight: 0
106
+ maxJumpAcrossDistance: 0
107
+ minRegionArea: 2
108
+ manualCellSize: 0
109
+ cellSize: 0.16666667
110
+ manualTileSize: 0
111
+ tileSize: 256
112
+ accuratePlacement: 0
113
+ debug:
114
+ m_Flags: 0
115
+ m_NavMeshData: {fileID: 0}
116
+ --- !u!1 &408902805
117
+ GameObject:
118
+ m_ObjectHideFlags: 0
119
+ m_CorrespondingSourceObject: {fileID: 0}
120
+ m_PrefabInternal: {fileID: 0}
121
+ serializedVersion: 6
122
+ m_Component:
123
+ - component: {fileID: 408902808}
124
+ - component: {fileID: 408902807}
125
+ - component: {fileID: 408902806}
126
+ m_Layer: 0
127
+ m_Name: Main Camera
128
+ m_TagString: MainCamera
129
+ m_Icon: {fileID: 0}
130
+ m_NavMeshLayer: 0
131
+ m_StaticEditorFlags: 0
132
+ m_IsActive: 1
133
+ --- !u!81 &408902806
134
+ AudioListener:
135
+ m_ObjectHideFlags: 0
136
+ m_CorrespondingSourceObject: {fileID: 0}
137
+ m_PrefabInternal: {fileID: 0}
138
+ m_GameObject: {fileID: 408902805}
139
+ m_Enabled: 1
140
+ --- !u!20 &408902807
141
+ Camera:
142
+ m_ObjectHideFlags: 0
143
+ m_CorrespondingSourceObject: {fileID: 0}
144
+ m_PrefabInternal: {fileID: 0}
145
+ m_GameObject: {fileID: 408902805}
146
+ m_Enabled: 1
147
+ serializedVersion: 2
148
+ m_ClearFlags: 2
149
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
150
+ m_projectionMatrixMode: 1
151
+ m_SensorSize: {x: 36, y: 24}
152
+ m_LensShift: {x: 0, y: 0}
153
+ m_FocalLength: 50
154
+ m_NormalizedViewPortRect:
155
+ serializedVersion: 2
156
+ x: 0
157
+ y: 0
158
+ width: 1
159
+ height: 1
160
+ near clip plane: 0.3
161
+ far clip plane: 1000
162
+ field of view: 60
163
+ orthographic: 1
164
+ orthographic size: 15
165
+ m_Depth: -1
166
+ m_CullingMask:
167
+ serializedVersion: 2
168
+ m_Bits: 4294967295
169
+ m_RenderingPath: -1
170
+ m_TargetTexture: {fileID: 0}
171
+ m_TargetDisplay: 0
172
+ m_TargetEye: 3
173
+ m_HDR: 1
174
+ m_AllowMSAA: 1
175
+ m_AllowDynamicResolution: 0
176
+ m_ForceIntoRT: 0
177
+ m_OcclusionCulling: 1
178
+ m_StereoConvergence: 10
179
+ m_StereoSeparation: 0.022
180
+ --- !u!4 &408902808
181
+ Transform:
182
+ m_ObjectHideFlags: 0
183
+ m_CorrespondingSourceObject: {fileID: 0}
184
+ m_PrefabInternal: {fileID: 0}
185
+ m_GameObject: {fileID: 408902805}
186
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
187
+ m_LocalPosition: {x: 0, y: 0, z: -10}
188
+ m_LocalScale: {x: 1, y: 1, z: 1}
189
+ m_Children: []
190
+ m_Father: {fileID: 0}
191
+ m_RootOrder: 0
192
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
193
+ --- !u!1 &2103414715
194
+ GameObject:
195
+ m_ObjectHideFlags: 0
196
+ m_CorrespondingSourceObject: {fileID: 0}
197
+ m_PrefabInternal: {fileID: 0}
198
+ serializedVersion: 6
199
+ m_Component:
200
+ - component: {fileID: 2103414719}
201
+ - component: {fileID: 2103414718}
202
+ - component: {fileID: 2103414717}
203
+ - component: {fileID: 2103414716}
204
+ m_Layer: 0
205
+ m_Name: New SpriteShapeController
206
+ m_TagString: Untagged
207
+ m_Icon: {fileID: 0}
208
+ m_NavMeshLayer: 0
209
+ m_StaticEditorFlags: 0
210
+ m_IsActive: 1
211
+ --- !u!114 &2103414716
212
+ MonoBehaviour:
213
+ m_ObjectHideFlags: 0
214
+ m_CorrespondingSourceObject: {fileID: 0}
215
+ m_PrefabInternal: {fileID: 0}
216
+ m_GameObject: {fileID: 2103414715}
217
+ m_Enabled: 1
218
+ m_EditorHideFlags: 0
219
+ m_Script: {fileID: 11500000, guid: 1c3eb1d33a6f9114bb5b51099948d2ce, type: 3}
220
+ m_Name:
221
+ m_EditorClassIdentifier:
222
+ m_Prefab: {fileID: 1791732276458280, guid: 91b2663493e1ab642b1b60fc7955f947, type: 2}
223
+ m_RandomFactor: 90
224
+ m_UseNormals: 1
225
+ --- !u!114 &2103414717
226
+ MonoBehaviour:
227
+ m_ObjectHideFlags: 0
228
+ m_CorrespondingSourceObject: {fileID: 0}
229
+ m_PrefabInternal: {fileID: 0}
230
+ m_GameObject: {fileID: 2103414715}
231
+ m_Enabled: 1
232
+ m_EditorHideFlags: 0
233
+ m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3}
234
+ m_Name:
235
+ m_EditorClassIdentifier:
236
+ m_Spline:
237
+ m_IsOpenEnded: 1
238
+ m_ControlPoints:
239
+ - position: {x: 26.488874, y: -2.6975656, z: 0}
240
+ leftTangent: {x: 0, y: 0, z: 0}
241
+ rightTangent: {x: 0, y: 0, z: 0}
242
+ mode: 0
243
+ height: 1
244
+ bevelCutoff: 0
245
+ bevelSize: 0
246
+ spriteIndex: 0
247
+ corner: 0
248
+ - position: {x: 10.016745, y: -9.5673275, z: 0}
249
+ leftTangent: {x: 5.787901, y: 1.0897436, z: -0}
250
+ rightTangent: {x: -5.787901, y: -1.0897436, z: 0}
251
+ mode: 1
252
+ height: 1
253
+ bevelCutoff: 0
254
+ bevelSize: 0
255
+ spriteIndex: 0
256
+ corner: 0
257
+ - position: {x: -9.3538, y: -9.1233, z: 0}
258
+ leftTangent: {x: 0, y: 0, z: 0}
259
+ rightTangent: {x: 0, y: 0, z: 0}
260
+ mode: 0
261
+ height: 1
262
+ bevelCutoff: 0
263
+ bevelSize: 0
264
+ spriteIndex: 0
265
+ corner: 0
266
+ - position: {x: -15.8531, y: 1.9792956, z: 0}
267
+ leftTangent: {x: -0.88264585, y: -3.0461369, z: -0}
268
+ rightTangent: {x: 0.88264585, y: 3.0461369, z: 0}
269
+ mode: 1
270
+ height: 1
271
+ bevelCutoff: 0
272
+ bevelSize: 0
273
+ spriteIndex: 0
274
+ corner: 0
275
+ - position: {x: -4.864938, y: 10.117959, z: 0}
276
+ leftTangent: {x: 0, y: 0, z: 0}
277
+ rightTangent: {x: 0, y: 0, z: 0}
278
+ mode: 0
279
+ height: 1
280
+ bevelCutoff: 0
281
+ bevelSize: 0
282
+ spriteIndex: 0
283
+ corner: 0
284
+ - position: {x: 10.084305, y: -0.2951008, z: 0}
285
+ leftTangent: {x: -1.3592644, y: -0.46925667, z: -0}
286
+ rightTangent: {x: 1.3592644, y: 0.46925667, z: 0}
287
+ mode: 1
288
+ height: 1
289
+ bevelCutoff: 0
290
+ bevelSize: 0
291
+ spriteIndex: 0
292
+ corner: 0
293
+ - position: {x: 25.481283, y: 4.9277797, z: 0}
294
+ leftTangent: {x: 0, y: 0, z: 0}
295
+ rightTangent: {x: 0, y: 0, z: 0}
296
+ mode: 0
297
+ height: 1
298
+ bevelCutoff: 0
299
+ bevelSize: 0
300
+ spriteIndex: 0
301
+ corner: 0
302
+ m_SpriteShape: {fileID: 11400000, guid: e03579ec9d1b6c54ea364bd8ee0bcfd8, type: 2}
303
+ m_SplineDetail: 16
304
+ m_AdaptiveUV: 1
305
+ m_UpdateCollider: 0
306
+ m_ColliderDetail: 4
307
+ m_ColliderOffset: 0
308
+ m_ColliderCornerType: 0
309
+ --- !u!1971053207 &2103414718
310
+ SpriteShapeRenderer:
311
+ m_ObjectHideFlags: 0
312
+ m_CorrespondingSourceObject: {fileID: 0}
313
+ m_PrefabInternal: {fileID: 0}
314
+ m_GameObject: {fileID: 2103414715}
315
+ m_Enabled: 1
316
+ m_CastShadows: 1
317
+ m_ReceiveShadows: 1
318
+ m_DynamicOccludee: 1
319
+ m_MotionVectors: 1
320
+ m_LightProbeUsage: 1
321
+ m_ReflectionProbeUsage: 1
322
+ m_RenderingLayerMask: 4294967295
323
+ m_Materials:
324
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
325
+ m_StaticBatchInfo:
326
+ firstSubMesh: 0
327
+ subMeshCount: 0
328
+ m_StaticBatchRoot: {fileID: 0}
329
+ m_ProbeAnchor: {fileID: 0}
330
+ m_LightProbeVolumeOverride: {fileID: 0}
331
+ m_ScaleInLightmap: 1
332
+ m_PreserveUVs: 0
333
+ m_IgnoreNormalsForChartDetection: 0
334
+ m_ImportantGI: 0
335
+ m_StitchLightmapSeams: 0
336
+ m_SelectedEditorRenderState: 0
337
+ m_MinimumChartSize: 4
338
+ m_AutoUVMaxDistance: 0.5
339
+ m_AutoUVMaxAngle: 89
340
+ m_LightmapParameters: {fileID: 0}
341
+ m_SortingLayerID: 0
342
+ m_SortingLayer: 0
343
+ m_SortingOrder: 0
344
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
345
+ m_MaskInteraction: 0
346
+ m_ShapeTexture: {fileID: 0}
347
+ m_Sprites:
348
+ - {fileID: 21300000, guid: 418ab5c27d3054eb89959d9c715e00c9, type: 3}
349
+ - {fileID: 21300000, guid: e74b518a65bc45f4cace9a2fef6af29d, type: 3}
350
+ - {fileID: 0}
351
+ - {fileID: 0}
352
+ - {fileID: 0}
353
+ - {fileID: 0}
354
+ - {fileID: 0}
355
+ - {fileID: 0}
356
+ - {fileID: 0}
357
+ - {fileID: 0}
358
+ m_LocalAABB:
359
+ m_Center: {x: 5.282402, y: 0.079841614, z: 0}
360
+ m_Extent: {x: 21.206472, y: 10.038117, z: 0}
361
+ --- !u!4 &2103414719
362
+ Transform:
363
+ m_ObjectHideFlags: 0
364
+ m_CorrespondingSourceObject: {fileID: 0}
365
+ m_PrefabInternal: {fileID: 0}
366
+ m_GameObject: {fileID: 2103414715}
367
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
368
+ m_LocalPosition: {x: -0.08430457, y: 0.2951008, z: 0}
369
+ m_LocalScale: {x: 1, y: 1, z: 1}
370
+ m_Children: []
371
+ m_Father: {fileID: 0}
372
+ m_RootOrder: 1
373
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scenes/SprinklePrefabs.unity.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 486575d9cb65b134fad35b06df9ae993
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Clipper.cs ADDED
The diff for this file is too large to render. See raw diff
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Clipper.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: cc4c383146400014d810176d3a637934
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/ConformingSpline.cs ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+ using UnityEngine.U2D;
5
+
6
+ #if UNITY_EDITOR
7
+ using UnityEditor;
8
+ #endif
9
+
10
+ // Demo Script Usage:
11
+ // When you want multiple SpriteShapes to share a common Spline,
12
+ // attach this script to the secondary objects you would like to
13
+ // copy the Spline and set the ParentObject to the original object
14
+ // you are copying from.
15
+
16
+ [ExecuteInEditMode]
17
+ public class ConformingSpline : MonoBehaviour
18
+ {
19
+
20
+ public GameObject m_ParentObject;
21
+ private int hashCode;
22
+
23
+ // Use this for initialization
24
+ void Start()
25
+ {
26
+
27
+ }
28
+
29
+ // Update is called once per frame
30
+ void Update()
31
+ {
32
+ if (m_ParentObject != null)
33
+ {
34
+ hashCode = CopySpline(m_ParentObject, gameObject, hashCode);
35
+ }
36
+ }
37
+
38
+ private static int CopySpline(GameObject src, GameObject dst, int hashCode)
39
+ {
40
+ #if UNITY_EDITOR
41
+ var parentSpriteShapeController = src.GetComponent<SpriteShapeController>();
42
+ var mirrorSpriteShapeController = dst.GetComponent<SpriteShapeController>();
43
+
44
+ if (parentSpriteShapeController != null && mirrorSpriteShapeController != null && parentSpriteShapeController.spline.GetHashCode() != hashCode)
45
+ {
46
+ SerializedObject srcController = new SerializedObject(parentSpriteShapeController);
47
+ SerializedObject dstController = new SerializedObject(mirrorSpriteShapeController);
48
+ SerializedProperty srcSpline = srcController.FindProperty("m_Spline");
49
+ dstController.CopyFromSerializedProperty(srcSpline);
50
+ dstController.ApplyModifiedProperties();
51
+ EditorUtility.SetDirty(mirrorSpriteShapeController);
52
+ return parentSpriteShapeController.spline.GetHashCode();
53
+ }
54
+ #endif
55
+ return hashCode;
56
+ }
57
+
58
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/ConformingSpline.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: db6f6067a1e6dd34ca4e2c4b7145e79b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GenerateSpriteShapes.cs ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+ using UnityEngine.Rendering;
5
+ using UnityEngine.U2D;
6
+
7
+ // Please add this Component to Camera or some top level object on each loadable scene.
8
+ public class GenerateSpriteShapes : MonoBehaviour
9
+ {
10
+
11
+ // Once all SpriteShapes are rendered, remove this Component if On or remove it from elsewhere.
12
+ public bool destroyOnCompletion = true;
13
+
14
+ void OnGUI()
15
+ {
16
+
17
+ // Loop all invisible SpriteShapeRenderers and generate geometry.
18
+ SpriteShapeRenderer[] spriteShapeRenderers = (SpriteShapeRenderer[]) GameObject.FindObjectsOfType (typeof(SpriteShapeRenderer));
19
+ CommandBuffer rc = new CommandBuffer();
20
+ rc.GetTemporaryRT(0, 256, 256, 0);
21
+ rc.SetRenderTarget(0);
22
+ foreach (var spriteShapeRenderer in spriteShapeRenderers)
23
+ {
24
+ var spriteShapeController = spriteShapeRenderer.gameObject.GetComponent<SpriteShapeController>();
25
+ if (spriteShapeRenderer != null && spriteShapeController != null)
26
+ {
27
+ if (!spriteShapeRenderer.isVisible)
28
+ {
29
+ spriteShapeController.BakeMesh();
30
+ rc.DrawRenderer(spriteShapeRenderer, spriteShapeRenderer.sharedMaterial);
31
+ // Debug.Log("generating shape for " + spriteShapeRenderer.gameObject.name);
32
+ }
33
+ }
34
+ }
35
+ rc.ReleaseTemporaryRT(0);
36
+ Graphics.ExecuteCommandBuffer(rc);
37
+
38
+ // SpriteShape Renderers are generated. This component is no longer needed. Delete this [or] remove this Component from elsewhere.
39
+ if (destroyOnCompletion)
40
+ Destroy(this);
41
+
42
+ }
43
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GenerateSpriteShapes.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: fccb8cf469e193a4ea6c24362f061c12
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GeometryCollider.cs ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using Unity.Collections;
4
+ using UnityEngine;
5
+ using UnityEngine.Experimental.U2D;
6
+ using UnityEngine.U2D;
7
+
8
+ #if UNITY_EDITOR
9
+ using UnityEditor;
10
+ #endif
11
+
12
+ [ExecuteAlways]
13
+ public class GeometryCollider : MonoBehaviour
14
+ {
15
+ [SerializeField]
16
+ bool m_UpdateCollider = false;
17
+
18
+ int m_HashCode = 0;
19
+
20
+ void Start()
21
+ {
22
+
23
+ }
24
+
25
+ // Update is called once per frame
26
+ void Update()
27
+ {
28
+ if (m_UpdateCollider)
29
+ Bake(gameObject, false);
30
+ }
31
+
32
+ static public void Bake(GameObject go, bool forced)
33
+ {
34
+ var spriteShapeController = go.GetComponent<SpriteShapeController>();
35
+ var spriteShapeRenderer = go.GetComponent<SpriteShapeRenderer>();
36
+ var polyCollider = go.GetComponent<PolygonCollider2D>();
37
+ var geometryCollider = go.GetComponent<GeometryCollider>();
38
+
39
+ if (spriteShapeController != null && polyCollider != null)
40
+ {
41
+ var spline = spriteShapeController.spline;
42
+ if (geometryCollider != null)
43
+ {
44
+ int splineHashCode = spline.GetHashCode();
45
+ if (splineHashCode == geometryCollider.m_HashCode && !forced)
46
+ return;
47
+ geometryCollider.m_HashCode = splineHashCode;
48
+ }
49
+ NativeArray<ushort> indexArray;
50
+ NativeSlice<Vector3> posArray;
51
+ NativeSlice<Vector2> uv0Array;
52
+ NativeArray<SpriteShapeSegment> geomArray;
53
+ spriteShapeRenderer.GetChannels(65536, out indexArray, out posArray, out uv0Array);
54
+ geomArray = spriteShapeRenderer.GetSegments(spline.GetPointCount() * 8);
55
+
56
+ NativeArray<ushort> indexArrayLocal = new NativeArray<ushort>(indexArray.Length, Allocator.Temp);
57
+
58
+ List<Vector2> points = new List<Vector2>();
59
+ int indexCount = 0, vertexCount = 0, counter = 0;
60
+ for (int u = 0; u < geomArray.Length; ++u)
61
+ {
62
+ if (geomArray[u].indexCount > 0)
63
+ {
64
+ for (int i = 0; i < geomArray[u].indexCount; ++i)
65
+ {
66
+ indexArrayLocal[counter] = (ushort)(indexArray[counter] + vertexCount);
67
+ counter++;
68
+ }
69
+ vertexCount += geomArray[u].vertexCount;
70
+ indexCount += geomArray[u].indexCount;
71
+ }
72
+ }
73
+ Debug.Log(go.name + " : " + counter);
74
+ OuterEdges(polyCollider, indexArrayLocal, posArray, indexCount);
75
+ }
76
+ }
77
+
78
+ // Generate the outer edges from the Renderer mesh. Based on code from www.h3xed.com
79
+ static void OuterEdges(PolygonCollider2D polygonCollider, NativeArray<ushort> triangles, NativeSlice<Vector3> vertices, int triangleCount)
80
+ {
81
+ // Get just the outer edges from the mesh's triangles (ignore or remove any shared edges)
82
+ Dictionary<string, KeyValuePair<int, int>> edges = new Dictionary<string, KeyValuePair<int, int>>();
83
+ for (int i = 0; i < triangleCount; i += 3)
84
+ {
85
+ for (int e = 0; e < 3; e++)
86
+ {
87
+ int vert1 = triangles[i + e];
88
+ int vert2 = triangles[i + e + 1 > i + 2 ? i : i + e + 1];
89
+ string edge = Mathf.Min(vert1, vert2) + ":" + Mathf.Max(vert1, vert2);
90
+ if (edges.ContainsKey(edge))
91
+ {
92
+ edges.Remove(edge);
93
+ }
94
+ else
95
+ {
96
+ edges.Add(edge, new KeyValuePair<int, int>(vert1, vert2));
97
+ }
98
+ }
99
+ }
100
+
101
+ // Create edge lookup (Key is first vertex, Value is second vertex, of each edge)
102
+ Dictionary<int, int> lookup = new Dictionary<int, int>();
103
+ foreach (KeyValuePair<int, int> edge in edges.Values)
104
+ {
105
+ if (lookup.ContainsKey(edge.Key) == false)
106
+ {
107
+ lookup.Add(edge.Key, edge.Value);
108
+ }
109
+ }
110
+
111
+ // Create empty polygon collider
112
+ polygonCollider.pathCount = 0;
113
+
114
+ // Loop through edge vertices in order
115
+ int startVert = 0;
116
+ int nextVert = startVert;
117
+ int highestVert = startVert;
118
+ List<Vector2> colliderPath = new List<Vector2>();
119
+ while (true)
120
+ {
121
+
122
+ // Add vertex to collider path
123
+ colliderPath.Add(vertices[nextVert]);
124
+
125
+ // Get next vertex
126
+ nextVert = lookup[nextVert];
127
+
128
+ // Store highest vertex (to know what shape to move to next)
129
+ if (nextVert > highestVert)
130
+ {
131
+ highestVert = nextVert;
132
+ }
133
+
134
+ // Shape complete
135
+ if (nextVert == startVert)
136
+ {
137
+
138
+ // Add path to polygon collider
139
+ polygonCollider.pathCount++;
140
+ polygonCollider.SetPath(polygonCollider.pathCount - 1, colliderPath.ToArray());
141
+ colliderPath.Clear();
142
+
143
+ // Go to next shape if one exists
144
+ if (lookup.ContainsKey(highestVert + 1))
145
+ {
146
+
147
+ // Set starting and next vertices
148
+ startVert = highestVert + 1;
149
+ nextVert = startVert;
150
+
151
+ // Continue to next loop
152
+ continue;
153
+ }
154
+
155
+ // No more verts
156
+ break;
157
+ }
158
+ }
159
+ }
160
+
161
+ #if UNITY_EDITOR
162
+
163
+ [MenuItem("SpriteShape/Generate Geometry Collider", false, 358)]
164
+ public static void BakeGeometryCollider()
165
+ {
166
+ if (Selection.activeGameObject != null)
167
+ GeometryCollider.Bake(Selection.activeGameObject, true);
168
+ }
169
+
170
+ #endif
171
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/GeometryCollider.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: e0ecd6fe4dd55d640bd7ef3235e0e425
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/LegacyCollider.cs ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+ using UnityEngine.U2D;
5
+ using ExtrasClipperLib;
6
+
7
+ #if UNITY_EDITOR
8
+ using UnityEditor;
9
+ #endif
10
+
11
+ public enum ColliderCornerType
12
+ {
13
+ Square,
14
+ Round,
15
+ Sharp
16
+ }
17
+
18
+ [ExecuteAlways]
19
+ public class LegacyCollider : MonoBehaviour
20
+ {
21
+ [SerializeField]
22
+ ColliderCornerType m_ColliderCornerType = ColliderCornerType.Square;
23
+ [SerializeField]
24
+ float m_ColliderOffset = 1.0f;
25
+ [SerializeField]
26
+ bool m_UpdateCollider = false;
27
+
28
+ const float s_ClipperScale = 100000.0f;
29
+ int m_HashCode = 0;
30
+
31
+ // Start is called before the first frame update
32
+ void Start()
33
+ {
34
+
35
+ }
36
+
37
+ // Update is called once per frame
38
+ void Update()
39
+ {
40
+ if (m_UpdateCollider)
41
+ Bake(gameObject, false);
42
+ }
43
+
44
+ static void SampleCurve(float colliderDetail, Vector3 startPoint, Vector3 startTangent, Vector3 endPoint, Vector3 endTangent, ref List<IntPoint> path)
45
+ {
46
+
47
+ if (startTangent.sqrMagnitude > 0f || endTangent.sqrMagnitude > 0f)
48
+ {
49
+ for (int j = 0; j <= colliderDetail; ++j)
50
+ {
51
+ float t = j / (float)colliderDetail;
52
+ Vector3 newPoint = BezierUtility.BezierPoint(startPoint, startTangent + startPoint, endTangent + endPoint, endPoint, t) * s_ClipperScale;
53
+
54
+ path.Add(new IntPoint((System.Int64)newPoint.x, (System.Int64)newPoint.y));
55
+ }
56
+ }
57
+ else
58
+ {
59
+ Vector3 newPoint = startPoint * s_ClipperScale;
60
+ path.Add(new IntPoint((System.Int64)newPoint.x, (System.Int64)newPoint.y));
61
+
62
+ newPoint = endPoint * s_ClipperScale;
63
+ path.Add(new IntPoint((System.Int64)newPoint.x, (System.Int64)newPoint.y));
64
+ }
65
+ }
66
+
67
+ public static void Bake(GameObject go, bool forced)
68
+ {
69
+ var sc = go.GetComponent<SpriteShapeController>();
70
+ var lc = go.GetComponent<LegacyCollider>();
71
+
72
+ if (sc != null)
73
+ {
74
+ List<IntPoint> path = new List<IntPoint>();
75
+ int splinePointCount = sc.spline.GetPointCount();
76
+ int pathPointCount = splinePointCount;
77
+
78
+ ColliderCornerType cct = ColliderCornerType.Square;
79
+ float co = 1.0f;
80
+
81
+ if (lc != null)
82
+ {
83
+ int hashCode = sc.spline.GetHashCode() + lc.m_ColliderCornerType.GetHashCode() + lc.m_ColliderOffset.GetHashCode();
84
+ if (lc.m_HashCode == hashCode && !forced)
85
+ return;
86
+
87
+ lc.m_HashCode = hashCode;
88
+ cct = lc.m_ColliderCornerType;
89
+ co = lc.m_ColliderOffset;
90
+ }
91
+
92
+ if (sc.spline.isOpenEnded)
93
+ pathPointCount--;
94
+
95
+ for (int i = 0; i < pathPointCount; ++i)
96
+ {
97
+ int nextIndex = SplineUtility.NextIndex(i, splinePointCount);
98
+ SampleCurve(sc.colliderDetail, sc.spline.GetPosition(i), sc.spline.GetRightTangent(i), sc.spline.GetPosition(nextIndex), sc.spline.GetLeftTangent(nextIndex), ref path);
99
+ }
100
+
101
+ if (co != 0f)
102
+ {
103
+ List<List<IntPoint>> solution = new List<List<IntPoint>>();
104
+ ClipperOffset clipOffset = new ClipperOffset();
105
+
106
+ EndType endType = EndType.etClosedPolygon;
107
+
108
+ if (sc.spline.isOpenEnded)
109
+ {
110
+ endType = EndType.etOpenSquare;
111
+
112
+ if (cct == ColliderCornerType.Round)
113
+ endType = EndType.etOpenRound;
114
+ }
115
+
116
+ clipOffset.ArcTolerance = 200f / sc.colliderDetail;
117
+ clipOffset.AddPath(path, (ExtrasClipperLib.JoinType)cct, endType);
118
+ clipOffset.Execute(ref solution, s_ClipperScale * co);
119
+
120
+ if (solution.Count > 0)
121
+ path = solution[0];
122
+ }
123
+
124
+ List<Vector2> pathPoints = new List<Vector2>(path.Count);
125
+ for (int i = 0; i < path.Count; ++i)
126
+ {
127
+ IntPoint ip = path[i];
128
+ pathPoints.Add(new Vector2(ip.X / s_ClipperScale, ip.Y / s_ClipperScale));
129
+ }
130
+
131
+ var pc = go.GetComponent<PolygonCollider2D>();
132
+ if (pc)
133
+ {
134
+ pc.pathCount = 0;
135
+ pc.SetPath(0, pathPoints.ToArray());
136
+ }
137
+
138
+ var ec = go.GetComponent<EdgeCollider2D>();
139
+ if (ec)
140
+ {
141
+ if (co > 0f || co < 0f && !sc.spline.isOpenEnded)
142
+ pathPoints.Add(pathPoints[0]);
143
+ ec.points = pathPoints.ToArray();
144
+ }
145
+ }
146
+ }
147
+
148
+ #if UNITY_EDITOR
149
+
150
+ [MenuItem("SpriteShape/Generate Legacy Collider", false, 358)]
151
+ public static void BakeLegacyCollider()
152
+ {
153
+ if (Selection.activeGameObject != null)
154
+ LegacyCollider.Bake(Selection.activeGameObject, true);
155
+ }
156
+
157
+ #endif
158
+ }
159
+
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/LegacyCollider.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 6a8e65bafadf93f41a17da25163f2f51
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/SimpleDraw.cs ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+ using UnityEngine.U2D;
5
+
6
+ // Dynamic modification of spline to follow the path of mouse movement.
7
+ // This script is just a simplified demo to demonstrate the idea.
8
+
9
+ public class SimpleDraw : MonoBehaviour
10
+ {
11
+ public float minimumDistance = 1.0f;
12
+ private Vector3 lastPosition;
13
+
14
+ // Use this for initialization
15
+ void Start()
16
+ {
17
+
18
+ }
19
+
20
+ private void Smoothen(SpriteShapeController sc, int pointIndex)
21
+ {
22
+ Vector3 position = sc.spline.GetPosition(pointIndex);
23
+ Vector3 positionNext = sc.spline.GetPosition(SplineUtility.NextIndex(pointIndex, sc.spline.GetPointCount()));
24
+ Vector3 positionPrev = sc.spline.GetPosition(SplineUtility.PreviousIndex(pointIndex, sc.spline.GetPointCount()));
25
+ Vector3 forward = gameObject.transform.forward;
26
+
27
+ float scale = Mathf.Min((positionNext - position).magnitude, (positionPrev - position).magnitude) * 0.33f;
28
+
29
+ Vector3 leftTangent = (positionPrev - position).normalized * scale;
30
+ Vector3 rightTangent = (positionNext - position).normalized * scale;
31
+
32
+ sc.spline.SetTangentMode(pointIndex, ShapeTangentMode.Continuous);
33
+ SplineUtility.CalculateTangents(position, positionPrev, positionNext, forward, scale, out rightTangent, out leftTangent);
34
+
35
+ sc.spline.SetLeftTangent(pointIndex, leftTangent);
36
+ sc.spline.SetRightTangent(pointIndex, rightTangent);
37
+ }
38
+
39
+ // Update is called once per frame
40
+ void Update()
41
+ {
42
+ var mp = Input.mousePosition;
43
+ mp.z = 10.0f;
44
+ mp = Camera.main.ScreenToWorldPoint(mp);
45
+ var dt = Mathf.Abs((mp - lastPosition).magnitude);
46
+ var md = (minimumDistance > 1.0f) ? minimumDistance : 1.0f;
47
+ if (Input.GetMouseButton(0) && dt > md)
48
+ {
49
+ var spriteShapeController = gameObject.GetComponent<SpriteShapeController>();
50
+ var spline = spriteShapeController.spline;
51
+ spline.InsertPointAt(spline.GetPointCount(), mp);
52
+ var newPointIndex = spline.GetPointCount() - 1;
53
+ Smoothen(spriteShapeController, newPointIndex - 1);
54
+
55
+ spline.SetHeight(newPointIndex, UnityEngine.Random.Range(0.1f, 2.0f));
56
+ lastPosition = mp;
57
+ }
58
+ }
59
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/SimpleDraw.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 922bb1bbfeaeb9a4c9204b7d0bc3d8c8
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Sprinkler.cs ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+ using UnityEngine.U2D;
5
+
6
+ public class Sprinkler : MonoBehaviour
7
+ {
8
+
9
+ public GameObject m_Prefab;
10
+ public float m_RandomFactor = 10.0f;
11
+ public bool m_UseNormals = false;
12
+
13
+ float Angle(Vector3 a, Vector3 b)
14
+ {
15
+ float dot = Vector3.Dot(a, b);
16
+ float det = (a.x * b.y) - (b.x * a.y);
17
+ return Mathf.Atan2(det, dot) * Mathf.Rad2Deg;
18
+ }
19
+
20
+ // Use this for initialization. Plant the Prefabs on Startup
21
+ void Start ()
22
+ {
23
+ SpriteShapeController ssc = GetComponent<SpriteShapeController>();
24
+ Spline spl = ssc.spline;
25
+
26
+ for (int i = 1; i < spl.GetPointCount() - 1; ++i)
27
+ {
28
+ if (Random.Range(0, 100) > (100 - m_RandomFactor) )
29
+ {
30
+ var go = GameObject.Instantiate(m_Prefab);
31
+ go.transform.position = spl.GetPosition(i);
32
+
33
+ if (m_UseNormals)
34
+ {
35
+ Vector3 lt = Vector3.Normalize(spl.GetPosition(i - 1) - spl.GetPosition(i));
36
+ Vector3 rt = Vector3.Normalize(spl.GetPosition(i + 1) - spl.GetPosition(i));
37
+ float a = Angle(Vector3.up, lt);
38
+ float b = Angle(lt, rt);
39
+ float c = a + (b * 0.5f);
40
+ if (b > 0)
41
+ c = (180 + c);
42
+ go.transform.rotation = Quaternion.Euler(0, 0, c);
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ // Update is called once per frame
49
+ void Update ()
50
+ {
51
+
52
+ }
53
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Scripts/Sprinkler.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 1c3eb1d33a6f9114bb5b51099948d2ce
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Branch.asset ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: af7181f404f1447c0a7a17b3070b952b, type: 3}
13
+ m_Name: Branch
14
+ m_EditorClassIdentifier:
15
+ m_Angles:
16
+ - m_Start: -180
17
+ m_End: 180
18
+ m_Order: 0
19
+ m_Sprites:
20
+ - {fileID: 21300000, guid: e205c552afc6743cb9c52e5ff6504efc, type: 3}
21
+ m_FillTexture: {fileID: 0}
22
+ m_CornerSprites:
23
+ - m_CornerType: 0
24
+ m_Sprites:
25
+ - {fileID: 0}
26
+ - m_CornerType: 1
27
+ m_Sprites:
28
+ - {fileID: 0}
29
+ - m_CornerType: 2
30
+ m_Sprites:
31
+ - {fileID: 0}
32
+ - m_CornerType: 3
33
+ m_Sprites:
34
+ - {fileID: 0}
35
+ - m_CornerType: 4
36
+ m_Sprites:
37
+ - {fileID: 0}
38
+ - m_CornerType: 5
39
+ m_Sprites:
40
+ - {fileID: 0}
41
+ - m_CornerType: 6
42
+ m_Sprites:
43
+ - {fileID: 0}
44
+ - m_CornerType: 7
45
+ m_Sprites:
46
+ - {fileID: 0}
47
+ m_FillOffset: 0
48
+ m_UseSpriteBorders: 1
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Branch.asset.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 67e0d7ab8806749199e5b764729aa46a
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Castle Wall.asset ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: af7181f404f1447c0a7a17b3070b952b, type: 3}
13
+ m_Name: Castle Wall
14
+ m_EditorClassIdentifier:
15
+ m_Angles:
16
+ - m_Start: -64
17
+ m_End: 61
18
+ m_Order: 7
19
+ m_Sprites:
20
+ - {fileID: 21300002, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
21
+ - {fileID: 21300012, guid: a8321f6fae34f034787010a903e29648, type: 3}
22
+ - m_Start: 61
23
+ m_End: 127
24
+ m_Order: 4
25
+ m_Sprites:
26
+ - {fileID: 21300014, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
27
+ - m_Start: 127
28
+ m_End: 233
29
+ m_Order: 8
30
+ m_Sprites:
31
+ - {fileID: 21300010, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
32
+ - m_Start: -127
33
+ m_End: -64
34
+ m_Order: 3
35
+ m_Sprites:
36
+ - {fileID: 21300006, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
37
+ m_FillTexture: {fileID: 2800000, guid: 7d8cda48c729c46329cd9d3c69a3a4e6, type: 3}
38
+ m_CornerSprites:
39
+ - m_CornerType: 0
40
+ m_Sprites:
41
+ - {fileID: 21300000, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
42
+ - m_CornerType: 1
43
+ m_Sprites:
44
+ - {fileID: 21300004, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
45
+ - m_CornerType: 2
46
+ m_Sprites:
47
+ - {fileID: 21300012, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
48
+ - m_CornerType: 3
49
+ m_Sprites:
50
+ - {fileID: 21300008, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
51
+ - m_CornerType: 4
52
+ m_Sprites:
53
+ - {fileID: 0}
54
+ - m_CornerType: 5
55
+ m_Sprites:
56
+ - {fileID: 0}
57
+ - m_CornerType: 6
58
+ m_Sprites:
59
+ - {fileID: 21300012, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
60
+ - m_CornerType: 7
61
+ m_Sprites:
62
+ - {fileID: 21300008, guid: 3bc0f8978d0114d568eb440fca26e64b, type: 3}
63
+ m_FillOffset: 0
64
+ m_UseSpriteBorders: 1
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Castle Wall.asset.meta ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: a710fe91ca336478e999261a86254e9f
3
+ timeCreated: 1507533165
4
+ licenseType: Pro
5
+ NativeFormatImporter:
6
+ externalObjects: {}
7
+ mainObjectFileID: 11400000
8
+ userData:
9
+ assetBundleName:
10
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple1.asset ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: af7181f404f1447c0a7a17b3070b952b, type: 3}
13
+ m_Name: Simple1
14
+ m_EditorClassIdentifier:
15
+ m_Angles:
16
+ - m_Start: -180
17
+ m_End: 180
18
+ m_Order: 0
19
+ m_Sprites:
20
+ - {fileID: 21300000, guid: e74b518a65bc45f4cace9a2fef6af29d, type: 3}
21
+ m_FillTexture: {fileID: 0}
22
+ m_CornerSprites:
23
+ - m_CornerType: 0
24
+ m_Sprites:
25
+ - {fileID: 0}
26
+ - m_CornerType: 1
27
+ m_Sprites:
28
+ - {fileID: 0}
29
+ - m_CornerType: 2
30
+ m_Sprites:
31
+ - {fileID: 0}
32
+ - m_CornerType: 3
33
+ m_Sprites:
34
+ - {fileID: 0}
35
+ - m_CornerType: 4
36
+ m_Sprites:
37
+ - {fileID: 0}
38
+ - m_CornerType: 5
39
+ m_Sprites:
40
+ - {fileID: 0}
41
+ - m_CornerType: 6
42
+ m_Sprites:
43
+ - {fileID: 0}
44
+ - m_CornerType: 7
45
+ m_Sprites:
46
+ - {fileID: 0}
47
+ m_FillOffset: 0
48
+ m_UseSpriteBorders: 1
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple1.asset.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 541c57e7ddb8adc46b7ca9573818a619
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple2.asset ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: af7181f404f1447c0a7a17b3070b952b, type: 3}
13
+ m_Name: Simple2
14
+ m_EditorClassIdentifier:
15
+ m_Angles:
16
+ - m_Start: -180
17
+ m_End: 180
18
+ m_Order: 0
19
+ m_Sprites:
20
+ - {fileID: 21300000, guid: 418ab5c27d3054eb89959d9c715e00c9, type: 3}
21
+ - {fileID: 21300000, guid: e74b518a65bc45f4cace9a2fef6af29d, type: 3}
22
+ m_FillTexture: {fileID: 0}
23
+ m_CornerSprites:
24
+ - m_CornerType: 0
25
+ m_Sprites:
26
+ - {fileID: 0}
27
+ - m_CornerType: 1
28
+ m_Sprites:
29
+ - {fileID: 0}
30
+ - m_CornerType: 2
31
+ m_Sprites:
32
+ - {fileID: 0}
33
+ - m_CornerType: 3
34
+ m_Sprites:
35
+ - {fileID: 0}
36
+ - m_CornerType: 4
37
+ m_Sprites:
38
+ - {fileID: 0}
39
+ - m_CornerType: 5
40
+ m_Sprites:
41
+ - {fileID: 0}
42
+ - m_CornerType: 6
43
+ m_Sprites:
44
+ - {fileID: 0}
45
+ - m_CornerType: 7
46
+ m_Sprites:
47
+ - {fileID: 0}
48
+ m_FillOffset: 0
49
+ m_UseSpriteBorders: 1
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple2.asset.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: e03579ec9d1b6c54ea364bd8ee0bcfd8
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple3.asset ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: af7181f404f1447c0a7a17b3070b952b, type: 3}
13
+ m_Name: Simple3
14
+ m_EditorClassIdentifier:
15
+ m_Angles:
16
+ - m_Start: -180
17
+ m_End: 180
18
+ m_Order: 0
19
+ m_Sprites:
20
+ - {fileID: 21300000, guid: c6dabd295b8ab514fa47b5d4e2b0266e, type: 3}
21
+ m_FillTexture: {fileID: 0}
22
+ m_CornerSprites:
23
+ - m_CornerType: 0
24
+ m_Sprites:
25
+ - {fileID: 0}
26
+ - m_CornerType: 1
27
+ m_Sprites:
28
+ - {fileID: 0}
29
+ - m_CornerType: 2
30
+ m_Sprites:
31
+ - {fileID: 0}
32
+ - m_CornerType: 3
33
+ m_Sprites:
34
+ - {fileID: 0}
35
+ - m_CornerType: 4
36
+ m_Sprites:
37
+ - {fileID: 0}
38
+ - m_CornerType: 5
39
+ m_Sprites:
40
+ - {fileID: 0}
41
+ - m_CornerType: 6
42
+ m_Sprites:
43
+ - {fileID: 0}
44
+ - m_CornerType: 7
45
+ m_Sprites:
46
+ - {fileID: 0}
47
+ m_FillOffset: 0
48
+ m_UseSpriteBorders: 1
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Simple3.asset.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 19b9cf308de41834c9968d12bec673b1
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Samples~/Extras/Sprite Shape Profiles/Tree A.asset ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: af7181f404f1447c0a7a17b3070b952b, type: 3}
13
+ m_Name: Tree A
14
+ m_EditorClassIdentifier:
15
+ m_Angles: []
16
+ m_FillTexture: {fileID: 2800000, guid: a94adaf94669646788de8f639270804a, type: 3}
17
+ m_CornerSprites:
18
+ - m_CornerType: 0
19
+ m_Sprites:
20
+ - {fileID: 0}
21
+ - m_CornerType: 1
22
+ m_Sprites:
23
+ - {fileID: 0}
24
+ - m_CornerType: 2
25
+ m_Sprites:
26
+ - {fileID: 0}
27
+ - m_CornerType: 3
28
+ m_Sprites:
29
+ - {fileID: 0}
30
+ - m_CornerType: 4
31
+ m_Sprites:
32
+ - {fileID: 0}
33
+ - m_CornerType: 5
34
+ m_Sprites:
35
+ - {fileID: 0}
36
+ - m_CornerType: 6
37
+ m_Sprites:
38
+ - {fileID: 0}
39
+ - m_CornerType: 7
40
+ m_Sprites:
41
+ - {fileID: 0}
42
+ m_FillOffset: 0
43
+ m_UseSpriteBorders: 1