├── .gitignore ├── CHANGELOG.md ├── CHANGELOG.md.meta ├── CSG.meta ├── CSG ├── CSG.cs ├── CSG.cs.meta ├── Classes.meta ├── Classes │ ├── Model.cs │ ├── Model.cs.meta │ ├── Node.cs │ ├── Node.cs.meta │ ├── Plane.cs │ ├── Plane.cs.meta │ ├── Polygon.cs │ ├── Polygon.cs.meta │ ├── Vertex.cs │ ├── Vertex.cs.meta │ ├── VertexAttributes.cs │ ├── VertexAttributes.cs.meta │ ├── VertexUtility.cs │ └── VertexUtility.cs.meta ├── Parabox.CSG.asmdef └── Parabox.CSG.asmdef.meta ├── LICENSE ├── LICENSE.meta ├── README.md ├── README.md.meta ├── Samples.meta ├── Samples ├── .sample.json ├── Demo Assets.meta ├── Demo Assets │ ├── Material.meta │ ├── Material │ │ ├── Checker.png │ │ ├── Checker.png.meta │ │ ├── Wireframe.mat │ │ └── Wireframe.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── CubeCapsule.prefab │ │ ├── CubeCapsule.prefab.meta │ │ ├── CylinderSquare.prefab │ │ ├── CylinderSquare.prefab.meta │ │ ├── SphereInCube.prefab │ │ ├── SphereInCube.prefab.meta │ │ ├── SphereSquare.prefab │ │ └── SphereSquare.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── CameraControls.cs │ │ ├── CameraControls.cs.meta │ │ ├── Demo.cs │ │ ├── Demo.cs.meta │ │ ├── Parabox.CSG.Demo.asmdef │ │ └── Parabox.CSG.Demo.asmdef.meta │ ├── Shader.meta │ └── Shader │ │ ├── Wireframe.shader │ │ └── Wireframe.shader.meta ├── Demo Scene.unity └── Demo Scene.unity.meta ├── bin~ ├── .htaccess ├── Compressed │ ├── UnityConfig.jsgz │ ├── bin.datagz │ ├── bin.html.memgz │ ├── bin.jsgz │ └── fileloader.jsgz ├── Release │ ├── UnityConfig.js │ ├── bin.data │ ├── bin.html.mem │ ├── bin.js │ └── fileloader.js ├── TemplateData │ ├── UnityProgress.js │ ├── default-cover.jpg │ ├── favicon.ico │ ├── fullbar.png │ ├── fullscreen.png │ ├── loadingbar.png │ ├── logo.png │ ├── progresslogo.png │ └── style.css ├── images │ └── subtract.PNG └── index.html ├── package.json └── package.json.meta /.gitignore: -------------------------------------------------------------------------------- 1 | # System files 2 | .DS_Store 3 | 4 | # IDE generated files 5 | UpgradeProjects~/*/.idea/** 6 | .vscode/** 7 | *.sublime-project* 8 | *.sublime-workspace* 9 | 10 | # Package Manager 11 | .Editor/** 12 | upm-ci~/** 13 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 6 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 7 | 8 | ## [2.0.0] 9 | 10 | ### Bug Fixes 11 | 12 | - Fixed potential crash or stack overflow if `Plane.SplitPolygon` fails to correctly identify co-planar triangles. 13 | 14 | ### Changes 15 | 16 | - Remove `pb_` prefix from type names. 17 | - Rename `Boolean` class to `CSG`. -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | @@ -0,0 +1,7 @@ 2 | fileFormatVersion: 2 3 | guid: 9e9d365796383ee4ea0baac0dff4fb5c 4 | TextScriptImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CSG.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5e1dab54d4abd14e9b28d0dac32baa9 3 | folderAsset: yes 4 | timeCreated: 1427153009 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /CSG/CSG.cs: -------------------------------------------------------------------------------- 1 | // Original CSG.JS library by Evan Wallace (http://madebyevan.com), under the MIT license. 2 | // GitHub: https://github.com/evanw/csg.js/ 3 | // 4 | // C++ port by Tomasz Dabrowski (http://28byteslater.com), under the MIT license. 5 | // GitHub: https://github.com/dabroz/csgjs-cpp/ 6 | // 7 | // C# port by Karl Henkel (parabox.co), under MIT license. 8 | // 9 | // Constructive Solid Geometry (CSG) is a modeling technique that uses Boolean 10 | // operations like union and intersection to combine 3D solids. This library 11 | // implements CSG operations on meshes elegantly and concisely using BSP trees, 12 | // and is meant to serve as an easily understandable implementation of the 13 | // algorithm. All edge cases involving overlapping coplanar polygons in both 14 | // solids are correctly handled. 15 | 16 | using UnityEngine; 17 | using System.Collections.Generic; 18 | 19 | namespace Parabox.CSG 20 | { 21 | /// 22 | /// Base class for CSG operations. Contains GameObject level methods for Subtraction, Intersection, and Union 23 | /// operations. The GameObjects passed to these functions will not be modified. 24 | /// 25 | public static class CSG 26 | { 27 | public enum BooleanOp 28 | { 29 | Intersection, 30 | Union, 31 | Subtraction 32 | } 33 | 34 | const float k_DefaultEpsilon = 0.00001f; 35 | static float s_Epsilon = k_DefaultEpsilon; 36 | 37 | /// 38 | /// Tolerance used by determine whether planes are coincident. 39 | /// 40 | public static float epsilon 41 | { 42 | get => s_Epsilon; 43 | set => s_Epsilon = value; 44 | } 45 | 46 | /// 47 | /// Performs a boolean operation on two GameObjects. 48 | /// 49 | /// A new mesh. 50 | public static Model Perform(BooleanOp op, GameObject lhs, GameObject rhs) 51 | { 52 | switch (op) 53 | { 54 | case BooleanOp.Intersection: 55 | return Intersect(lhs, rhs); 56 | case BooleanOp.Union: 57 | return Union(lhs, rhs); 58 | case BooleanOp.Subtraction: 59 | return Subtract(lhs, rhs); 60 | default: 61 | return null; 62 | } 63 | } 64 | 65 | /// 66 | /// Returns a new mesh by merging @lhs with @rhs. 67 | /// 68 | /// The base mesh of the boolean operation. 69 | /// The input mesh of the boolean operation. 70 | /// A new mesh if the operation succeeds, or null if an error occurs. 71 | public static Model Union(GameObject lhs, GameObject rhs) 72 | { 73 | Model csg_model_a = new Model(lhs); 74 | Model csg_model_b = new Model(rhs); 75 | 76 | Node a = new Node(csg_model_a.ToPolygons()); 77 | Node b = new Node(csg_model_b.ToPolygons()); 78 | 79 | List polygons = Node.Union(a, b).AllPolygons(); 80 | 81 | return new Model(polygons); 82 | } 83 | 84 | /// 85 | /// Returns a new mesh by subtracting @lhs with @rhs. 86 | /// 87 | /// The base mesh of the boolean operation. 88 | /// The input mesh of the boolean operation. 89 | /// A new mesh if the operation succeeds, or null if an error occurs. 90 | public static Model Subtract(GameObject lhs, GameObject rhs) 91 | { 92 | Model csg_model_a = new Model(lhs); 93 | Model csg_model_b = new Model(rhs); 94 | 95 | Node a = new Node(csg_model_a.ToPolygons()); 96 | Node b = new Node(csg_model_b.ToPolygons()); 97 | 98 | List polygons = Node.Subtract(a, b).AllPolygons(); 99 | 100 | return new Model(polygons); 101 | } 102 | 103 | /// 104 | /// Returns a new mesh by intersecting @lhs with @rhs. 105 | /// 106 | /// The base mesh of the boolean operation. 107 | /// The input mesh of the boolean operation. 108 | /// A new mesh if the operation succeeds, or null if an error occurs. 109 | public static Model Intersect(GameObject lhs, GameObject rhs) 110 | { 111 | Model csg_model_a = new Model(lhs); 112 | Model csg_model_b = new Model(rhs); 113 | 114 | Node a = new Node(csg_model_a.ToPolygons()); 115 | Node b = new Node(csg_model_b.ToPolygons()); 116 | 117 | List polygons = Node.Intersect(a, b).AllPolygons(); 118 | 119 | return new Model(polygons); 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /CSG/CSG.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebfb4c2cfc5327c42a8bf12d68aa7bdc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26a69eae25551d3459c97657aaabde95 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CSG/Classes/Model.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace Parabox.CSG 7 | { 8 | /// 9 | /// Representation of a mesh in CSG terms. Contains methods for translating to and from UnityEngine.Mesh. 10 | /// 11 | public sealed class Model 12 | { 13 | List m_Vertices; 14 | List m_Materials; 15 | List> m_Indices; 16 | 17 | public List materials 18 | { 19 | get { return m_Materials; } 20 | set { m_Materials = value; } 21 | } 22 | 23 | public List vertices 24 | { 25 | get { return m_Vertices; } 26 | set { m_Vertices = value; } 27 | } 28 | 29 | public List> indices 30 | { 31 | get { return m_Indices; } 32 | set { m_Indices = value; } 33 | } 34 | 35 | public Mesh mesh 36 | { 37 | get { return (Mesh)this; } 38 | } 39 | 40 | public Model(GameObject gameObject) : 41 | this(gameObject.GetComponent()?.sharedMesh, 42 | gameObject.GetComponent()?.sharedMaterials, 43 | gameObject.GetComponent()) 44 | { 45 | } 46 | 47 | /// 48 | /// Initialize a Model from a UnityEngine.Mesh and transform. 49 | /// 50 | public Model(Mesh mesh, Material[] materials, Transform transform) 51 | { 52 | if(mesh == null) 53 | throw new ArgumentNullException("mesh"); 54 | 55 | if(transform == null) 56 | throw new ArgumentNullException("transform"); 57 | 58 | m_Vertices = VertexUtility.GetVertices(mesh).Select(x => transform.TransformVertex(x)).ToList(); 59 | m_Materials = new List(materials); 60 | m_Indices = new List>(); 61 | 62 | for (int i = 0, c = mesh.subMeshCount; i < c; i++) 63 | { 64 | if (mesh.GetTopology(i) != MeshTopology.Triangles) 65 | continue; 66 | var indices = new List(); 67 | mesh.GetIndices(indices, i); 68 | m_Indices.Add(indices); 69 | } 70 | } 71 | 72 | internal Model(List polygons) 73 | { 74 | m_Vertices = new List(); 75 | Dictionary> submeshes = new Dictionary>(); 76 | 77 | int p = 0; 78 | 79 | for (int i = 0; i < polygons.Count; i++) 80 | { 81 | Polygon poly = polygons[i]; 82 | List indices; 83 | 84 | if (!submeshes.TryGetValue(poly.material, out indices)) 85 | submeshes.Add(poly.material, indices = new List()); 86 | 87 | for (int j = 2; j < poly.vertices.Count; j++) 88 | { 89 | m_Vertices.Add(poly.vertices[0]); 90 | indices.Add(p++); 91 | 92 | m_Vertices.Add(poly.vertices[j - 1]); 93 | indices.Add(p++); 94 | 95 | m_Vertices.Add(poly.vertices[j]); 96 | indices.Add(p++); 97 | } 98 | } 99 | 100 | m_Materials = submeshes.Keys.ToList(); 101 | m_Indices = submeshes.Values.ToList(); 102 | } 103 | 104 | internal List ToPolygons() 105 | { 106 | List list = new List(); 107 | 108 | for (int s = 0, c = m_Indices.Count; s < c; s++) 109 | { 110 | var indices = m_Indices[s]; 111 | 112 | for (int i = 0, ic = indices.Count; i < indices.Count; i += 3) 113 | { 114 | List triangle = new List() 115 | { 116 | m_Vertices[indices[i + 0]], 117 | m_Vertices[indices[i + 1]], 118 | m_Vertices[indices[i + 2]] 119 | }; 120 | 121 | list.Add(new Polygon(triangle, m_Materials[s])); 122 | } 123 | } 124 | 125 | return list; 126 | } 127 | 128 | public static explicit operator Mesh(Model model) 129 | { 130 | var mesh = new Mesh(); 131 | VertexUtility.SetMesh(mesh, model.m_Vertices); 132 | mesh.subMeshCount = model.m_Indices.Count; 133 | for (int i = 0, c = mesh.subMeshCount; i < c; i++) 134 | { 135 | #if UNITY_2019_3_OR_NEWER 136 | mesh.SetIndices(model.m_Indices[i], MeshTopology.Triangles, i); 137 | #else 138 | mesh.SetIndices(model.m_Indices[i].ToArray(), MeshTopology.Triangles, i); 139 | #endif 140 | } 141 | 142 | return mesh; 143 | } 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /CSG/Classes/Model.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc6aa3f6c70b67d24bf77989479e4655 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes/Node.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | 6 | namespace Parabox.CSG 7 | { 8 | sealed class Node 9 | { 10 | public List polygons; 11 | 12 | public Node front; 13 | public Node back; 14 | 15 | public Plane plane; 16 | 17 | public Node() 18 | { 19 | front = null; 20 | back = null; 21 | } 22 | 23 | public Node(List list) 24 | { 25 | Build(list); 26 | } 27 | 28 | public Node(List list, Plane plane, Node front, Node back) 29 | { 30 | this.polygons = list; 31 | this.plane = plane; 32 | this.front = front; 33 | this.back = back; 34 | } 35 | 36 | public Node Clone() 37 | { 38 | Node clone = new Node(this.polygons, this.plane, this.front, this.back); 39 | 40 | return clone; 41 | } 42 | 43 | // Remove all polygons in this BSP tree that are inside the other BSP tree 44 | // `bsp`. 45 | public void ClipTo(Node other) 46 | { 47 | this.polygons = other.ClipPolygons(this.polygons); 48 | 49 | if (this.front != null) 50 | { 51 | this.front.ClipTo(other); 52 | } 53 | 54 | if (this.back != null) 55 | { 56 | this.back.ClipTo(other); 57 | } 58 | } 59 | 60 | // Convert solid space to empty space and empty space to solid space. 61 | public void Invert() 62 | { 63 | for (int i = 0; i < this.polygons.Count; i++) 64 | this.polygons[i].Flip(); 65 | 66 | this.plane.Flip(); 67 | 68 | if (this.front != null) 69 | { 70 | this.front.Invert(); 71 | } 72 | 73 | if (this.back != null) 74 | { 75 | this.back.Invert(); 76 | } 77 | 78 | Node tmp = this.front; 79 | this.front = this.back; 80 | this.back = tmp; 81 | } 82 | 83 | // Build a BSP tree out of `polygons`. When called on an existing tree, the 84 | // new polygons are filtered down to the bottom of the tree and become new 85 | // nodes there. Each set of polygons is partitioned using the first polygon 86 | // (no heuristic is used to pick a good split). 87 | public void Build(List list) 88 | { 89 | if (list.Count < 1) 90 | return; 91 | 92 | bool newNode = plane == null || !plane.Valid(); 93 | 94 | if (newNode) 95 | { 96 | plane = new Plane(); 97 | plane.normal = list[0].plane.normal; 98 | plane.w = list[0].plane.w; 99 | } 100 | 101 | if (polygons == null) 102 | polygons = new List(); 103 | 104 | var listFront = new List(); 105 | var listBack = new List(); 106 | 107 | for (int i = 0; i < list.Count; i++) 108 | plane.SplitPolygon(list[i], polygons, polygons, listFront, listBack); 109 | 110 | 111 | if (listFront.Count > 0) 112 | { 113 | // SplitPolygon can fail to correctly identify coplanar planes when the epsilon value is too low. When 114 | // this happens, the front or back list will be filled and built into a new node recursively. This 115 | // check catches that case and sorts the front/back lists into the coplanar polygons collection. 116 | if (newNode && list.SequenceEqual(listFront)) 117 | polygons.AddRange(listFront); 118 | else 119 | (front ?? (front = new Node())).Build(listFront); 120 | } 121 | 122 | if (listBack.Count > 0) 123 | { 124 | if (newNode && list.SequenceEqual(listBack)) 125 | polygons.AddRange(listBack); 126 | else 127 | (back ?? (back = new Node())).Build(listBack); 128 | } 129 | } 130 | 131 | // Recursively remove all polygons in `polygons` that are inside this BSP tree. 132 | public List ClipPolygons(List list) 133 | { 134 | if (!this.plane.Valid()) 135 | { 136 | return list; 137 | } 138 | 139 | List list_front = new List(); 140 | List list_back = new List(); 141 | 142 | for (int i = 0; i < list.Count; i++) 143 | { 144 | this.plane.SplitPolygon(list[i], list_front, list_back, list_front, list_back); 145 | } 146 | 147 | if (this.front != null) 148 | { 149 | list_front = this.front.ClipPolygons(list_front); 150 | } 151 | 152 | if (this.back != null) 153 | { 154 | list_back = this.back.ClipPolygons(list_back); 155 | } 156 | else 157 | { 158 | list_back.Clear(); 159 | } 160 | 161 | // Position [First, Last] 162 | // list_front.insert(list_front.end(), list_back.begin(), list_back.end()); 163 | list_front.AddRange(list_back); 164 | 165 | return list_front; 166 | } 167 | 168 | // Return a list of all polygons in this BSP tree. 169 | public List AllPolygons() 170 | { 171 | List list = this.polygons; 172 | List list_front = new List(), list_back = new List(); 173 | 174 | if (this.front != null) 175 | { 176 | list_front = this.front.AllPolygons(); 177 | } 178 | 179 | if (this.back != null) 180 | { 181 | list_back = this.back.AllPolygons(); 182 | } 183 | 184 | list.AddRange(list_front); 185 | list.AddRange(list_back); 186 | 187 | return list; 188 | } 189 | 190 | #region STATIC OPERATIONS 191 | 192 | // Return a new CSG solid representing space in either this solid or in the 193 | // solid `csg`. Neither this solid nor the solid `csg` are modified. 194 | public static Node Union(Node a1, Node b1) 195 | { 196 | Node a = a1.Clone(); 197 | Node b = b1.Clone(); 198 | 199 | a.ClipTo(b); 200 | b.ClipTo(a); 201 | b.Invert(); 202 | b.ClipTo(a); 203 | b.Invert(); 204 | 205 | a.Build(b.AllPolygons()); 206 | 207 | Node ret = new Node(a.AllPolygons()); 208 | 209 | return ret; 210 | } 211 | 212 | // Return a new CSG solid representing space in this solid but not in the 213 | // solid `csg`. Neither this solid nor the solid `csg` are modified. 214 | public static Node Subtract(Node a1, Node b1) 215 | { 216 | Node a = a1.Clone(); 217 | Node b = b1.Clone(); 218 | 219 | a.Invert(); 220 | a.ClipTo(b); 221 | b.ClipTo(a); 222 | b.Invert(); 223 | b.ClipTo(a); 224 | b.Invert(); 225 | a.Build(b.AllPolygons()); 226 | a.Invert(); 227 | 228 | Node ret = new Node(a.AllPolygons()); 229 | 230 | return ret; 231 | } 232 | 233 | // Return a new CSG solid representing space both this solid and in the 234 | // solid `csg`. Neither this solid nor the solid `csg` are modified. 235 | public static Node Intersect(Node a1, Node b1) 236 | { 237 | Node a = a1.Clone(); 238 | Node b = b1.Clone(); 239 | 240 | a.Invert(); 241 | b.ClipTo(a); 242 | b.Invert(); 243 | a.ClipTo(b); 244 | b.ClipTo(a); 245 | 246 | a.Build(b.AllPolygons()); 247 | a.Invert(); 248 | 249 | Node ret = new Node(a.AllPolygons()); 250 | 251 | return ret; 252 | } 253 | 254 | #endregion 255 | } 256 | } 257 | -------------------------------------------------------------------------------- /CSG/Classes/Node.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d922dfe4019fb7789e22f45bb24fa62 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes/Plane.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace Parabox.CSG 5 | { 6 | /// 7 | /// Represents a plane in 3d space. 8 | /// Does not include position. 9 | /// 10 | sealed class Plane 11 | { 12 | public Vector3 normal; 13 | public float w; 14 | 15 | [System.Flags] 16 | enum EPolygonType 17 | { 18 | Coplanar = 0, 19 | Front = 1, 20 | Back = 2, 21 | Spanning = 3 /// 3 is Front | Back - not a separate entry 22 | }; 23 | 24 | public Plane() 25 | { 26 | normal = Vector3.zero; 27 | w = 0f; 28 | } 29 | 30 | public Plane(Vector3 a, Vector3 b, Vector3 c) 31 | { 32 | normal = Vector3.Cross(b - a, c - a);//.normalized; 33 | w = Vector3.Dot(normal, a); 34 | } 35 | 36 | public override string ToString() => $"{normal} {w}"; 37 | 38 | public bool Valid() 39 | { 40 | return normal.magnitude > 0f; 41 | } 42 | 43 | public void Flip() 44 | { 45 | normal *= -1f; 46 | w *= -1f; 47 | } 48 | 49 | // Split `polygon` by this plane if needed, then put the polygon or polygon 50 | // fragments in the appropriate lists. Coplanar polygons go into either 51 | // `coplanarFront` or `coplanarBack` depending on their orientation with 52 | // respect to this plane. Polygons in front or in back of this plane go into 53 | // either `front` or `back`. 54 | public void SplitPolygon(Polygon polygon, List coplanarFront, List coplanarBack, List front, List back) 55 | { 56 | // Classify each point as well as the entire polygon into one of the above 57 | // four classes. 58 | EPolygonType polygonType = 0; 59 | List types = new List(); 60 | 61 | for (int i = 0; i < polygon.vertices.Count; i++) 62 | { 63 | float t = Vector3.Dot(this.normal, polygon.vertices[i].position) - this.w; 64 | EPolygonType type = (t < -CSG.epsilon) ? EPolygonType.Back : ((t > CSG.epsilon) ? EPolygonType.Front : EPolygonType.Coplanar); 65 | polygonType |= type; 66 | types.Add(type); 67 | } 68 | 69 | // Put the polygon in the correct list, splitting it when necessary. 70 | switch (polygonType) 71 | { 72 | case EPolygonType.Coplanar: 73 | { 74 | if (Vector3.Dot(this.normal, polygon.plane.normal) > 0) 75 | coplanarFront.Add(polygon); 76 | else 77 | coplanarBack.Add(polygon); 78 | } 79 | break; 80 | 81 | case EPolygonType.Front: 82 | { 83 | front.Add(polygon); 84 | } 85 | break; 86 | 87 | case EPolygonType.Back: 88 | { 89 | back.Add(polygon); 90 | } 91 | break; 92 | 93 | case EPolygonType.Spanning: 94 | { 95 | List f = new List(); 96 | List b = new List(); 97 | 98 | for (int i = 0; i < polygon.vertices.Count; i++) 99 | { 100 | int j = (i + 1) % polygon.vertices.Count; 101 | 102 | EPolygonType ti = types[i], tj = types[j]; 103 | 104 | Vertex vi = polygon.vertices[i], vj = polygon.vertices[j]; 105 | 106 | if (ti != EPolygonType.Back) 107 | { 108 | f.Add(vi); 109 | } 110 | 111 | if (ti != EPolygonType.Front) 112 | { 113 | b.Add(vi); 114 | } 115 | 116 | if ((ti | tj) == EPolygonType.Spanning) 117 | { 118 | float t = (this.w - Vector3.Dot(this.normal, vi.position)) / Vector3.Dot(this.normal, vj.position - vi.position); 119 | 120 | Vertex v = VertexUtility.Mix(vi, vj, t); 121 | 122 | f.Add(v); 123 | b.Add(v); 124 | } 125 | } 126 | 127 | if (f.Count >= 3) 128 | { 129 | front.Add(new Polygon(f, polygon.material)); 130 | } 131 | 132 | if (b.Count >= 3) 133 | { 134 | back.Add(new Polygon(b, polygon.material)); 135 | } 136 | } 137 | break; 138 | } // End switch(polygonType) 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /CSG/Classes/Plane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5036d4859bee1f3d1b896b616cab05a4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes/Polygon.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace Parabox.CSG 5 | { 6 | /// 7 | /// Represents a polygon face with an arbitrary number of vertices. 8 | /// 9 | sealed class Polygon 10 | { 11 | public List vertices; 12 | public Plane plane; 13 | public Material material; 14 | 15 | public Polygon(List list, Material mat) 16 | { 17 | vertices = list; 18 | plane = new Plane(list[0].position, list[1].position, list[2].position); 19 | material = mat; 20 | } 21 | 22 | public void Flip() 23 | { 24 | vertices.Reverse(); 25 | 26 | for (int i = 0; i < vertices.Count; i++) 27 | vertices[i].Flip(); 28 | 29 | plane.Flip(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return $"[{vertices.Count}] {plane.normal}"; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CSG/Classes/Polygon.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cda6397b700ee527a36b378c4f72784 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes/Vertex.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Parabox.CSG 5 | { 6 | /// 7 | /// Holds information about a single vertex, and provides methods for averaging between many. 8 | /// All values are optional. Where not present a default value will be substituted if necessary. 9 | /// 10 | public struct Vertex 11 | { 12 | Vector3 m_Position; 13 | Color m_Color; 14 | Vector3 m_Normal; 15 | Vector4 m_Tangent; 16 | Vector2 m_UV0; 17 | Vector2 m_UV2; 18 | Vector4 m_UV3; 19 | Vector4 m_UV4; 20 | VertexAttributes m_Attributes; 21 | 22 | /// 23 | /// The position in model space. 24 | /// 25 | public Vector3 position 26 | { 27 | get { return m_Position; } 28 | set 29 | { 30 | hasPosition = true; 31 | m_Position = value; 32 | } 33 | } 34 | 35 | /// 36 | /// Vertex color. 37 | /// 38 | public Color color 39 | { 40 | get { return m_Color; } 41 | set 42 | { 43 | hasColor = true; 44 | m_Color = value; 45 | } 46 | } 47 | 48 | /// 49 | /// Unit vector normal. 50 | /// 51 | public Vector3 normal 52 | { 53 | get { return m_Normal; } 54 | set 55 | { 56 | hasNormal = true; 57 | m_Normal = value; 58 | } 59 | } 60 | 61 | /// 62 | /// Vertex tangent (sometimes called binormal). 63 | /// 64 | public Vector4 tangent 65 | { 66 | get { return m_Tangent; } 67 | set 68 | { 69 | hasTangent = true; 70 | m_Tangent = value; 71 | } 72 | } 73 | 74 | /// 75 | /// UV 0 channel. Also called textures. 76 | /// 77 | public Vector2 uv0 78 | { 79 | get { return m_UV0; } 80 | set 81 | { 82 | hasUV0 = true; 83 | m_UV0 = value; 84 | } 85 | } 86 | 87 | /// 88 | /// UV 2 channel. 89 | /// 90 | public Vector2 uv2 91 | { 92 | get { return m_UV2; } 93 | set 94 | { 95 | hasUV2 = true; 96 | m_UV2 = value; 97 | } 98 | } 99 | 100 | /// 101 | /// UV 3 channel. 102 | /// 103 | public Vector4 uv3 104 | { 105 | get { return m_UV3; } 106 | set 107 | { 108 | hasUV3 = true; 109 | m_UV3 = value; 110 | } 111 | } 112 | 113 | /// 114 | /// UV 4 channel. 115 | /// 116 | public Vector4 uv4 117 | { 118 | get { return m_UV4; } 119 | set 120 | { 121 | hasUV4 = true; 122 | m_UV4 = value; 123 | } 124 | } 125 | 126 | /// 127 | /// Find if a vertex attribute has been set. 128 | /// 129 | /// The attribute or attributes to test for. 130 | /// True if this vertex has the specified attributes set, false if they are default values. 131 | public bool HasArrays(VertexAttributes attribute) 132 | { 133 | return (m_Attributes & attribute) == attribute; 134 | } 135 | 136 | public bool hasPosition 137 | { 138 | get { return (m_Attributes & VertexAttributes.Position) == VertexAttributes.Position; } 139 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Position) : (m_Attributes & ~(VertexAttributes.Position)); } 140 | } 141 | 142 | public bool hasColor 143 | { 144 | get { return (m_Attributes & VertexAttributes.Color) == VertexAttributes.Color; } 145 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Color) : (m_Attributes & ~(VertexAttributes.Color)); } 146 | } 147 | 148 | public bool hasNormal 149 | { 150 | get { return (m_Attributes & VertexAttributes.Normal) == VertexAttributes.Normal; } 151 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Normal) : (m_Attributes & ~(VertexAttributes.Normal)); } 152 | } 153 | 154 | public bool hasTangent 155 | { 156 | get { return (m_Attributes & VertexAttributes.Tangent) == VertexAttributes.Tangent; } 157 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Tangent) : (m_Attributes & ~(VertexAttributes.Tangent)); } 158 | } 159 | 160 | public bool hasUV0 161 | { 162 | get { return (m_Attributes & VertexAttributes.Texture0) == VertexAttributes.Texture0; } 163 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Texture0) : (m_Attributes & ~(VertexAttributes.Texture0)); } 164 | } 165 | 166 | public bool hasUV2 167 | { 168 | get { return (m_Attributes & VertexAttributes.Texture1) == VertexAttributes.Texture1; } 169 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Texture1) : (m_Attributes & ~(VertexAttributes.Texture1)); } 170 | } 171 | 172 | public bool hasUV3 173 | { 174 | get { return (m_Attributes & VertexAttributes.Texture2) == VertexAttributes.Texture2; } 175 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Texture2) : (m_Attributes & ~(VertexAttributes.Texture2)); } 176 | } 177 | 178 | public bool hasUV4 179 | { 180 | get { return (m_Attributes & VertexAttributes.Texture3) == VertexAttributes.Texture3; } 181 | private set { m_Attributes = value ? (m_Attributes | VertexAttributes.Texture3) : (m_Attributes & ~(VertexAttributes.Texture3)); } 182 | } 183 | 184 | public void Flip() 185 | { 186 | if(hasNormal) 187 | m_Normal *= -1f; 188 | 189 | if (hasTangent) 190 | m_Tangent *= -1f; 191 | } 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /CSG/Classes/Vertex.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3396e48206be51d593d62d826555765 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes/VertexAttributes.cs: -------------------------------------------------------------------------------- 1 | namespace Parabox.CSG 2 | { 3 | /// 4 | /// Mesh attributes bitmask. 5 | /// 6 | [System.Flags] 7 | public enum VertexAttributes 8 | { 9 | /// 10 | /// Vertex positions. 11 | /// 12 | Position = 0x1, 13 | /// 14 | /// First UV channel. 15 | /// 16 | Texture0 = 0x2, 17 | /// 18 | /// Second UV channel. Commonly called UV2 or Lightmap UVs in Unity terms. 19 | /// 20 | Texture1 = 0x4, 21 | /// 22 | /// Second UV channel. Commonly called UV2 or Lightmap UVs in Unity terms. 23 | /// 24 | Lightmap = 0x4, 25 | /// 26 | /// Third UV channel. 27 | /// 28 | Texture2 = 0x8, 29 | /// 30 | /// Vertex UV4. 31 | /// 32 | Texture3 = 0x10, 33 | /// 34 | /// Vertex colors. 35 | /// 36 | Color = 0x20, 37 | /// 38 | /// Vertex normals. 39 | /// 40 | Normal = 0x40, 41 | /// 42 | /// Vertex tangents. 43 | /// 44 | Tangent = 0x80, 45 | /// 46 | /// All stored mesh attributes. 47 | /// 48 | All = 0xFF 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /CSG/Classes/VertexAttributes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aeb5ab6e99f0072c9b6d179703243558 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Classes/VertexUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace Parabox.CSG 6 | { 7 | static class VertexUtility 8 | { 9 | /// 10 | /// Allocate and fill all attribute arrays. This method will fill all arrays, regardless of whether or not real data populates the values (check what attributes a Vertex contains with HasAttribute()). 11 | /// 12 | /// 13 | /// If you are using this function to rebuild a mesh, use SetMesh instead. SetMesh handles setting null arrays where appropriate for you. 14 | /// 15 | /// 16 | /// The source vertices. 17 | /// A new array of the vertex position values. 18 | /// A new array of the vertex color values. 19 | /// A new array of the vertex uv0 values. 20 | /// A new array of the vertex normal values. 21 | /// A new array of the vertex tangent values. 22 | /// A new array of the vertex uv2 values. 23 | /// A new array of the vertex uv3 values. 24 | /// A new array of the vertex uv4 values. 25 | public static void GetArrays( 26 | IList vertices, 27 | out Vector3[] position, 28 | out Color[] color, 29 | out Vector2[] uv0, 30 | out Vector3[] normal, 31 | out Vector4[] tangent, 32 | out Vector2[] uv2, 33 | out List uv3, 34 | out List uv4) 35 | { 36 | GetArrays(vertices, out position, out color, out uv0, out normal, out tangent, out uv2, out uv3, out uv4, VertexAttributes.All); 37 | } 38 | 39 | /// 40 | /// Allocate and fill the requested attribute arrays. 41 | /// 42 | /// 43 | /// If you are using this function to rebuild a mesh, use SetMesh instead. SetMesh handles setting null arrays where appropriate for you. 44 | /// 45 | /// 46 | /// The source vertices. 47 | /// A new array of the vertex position values if requested by the attributes parameter, or null. 48 | /// A new array of the vertex color values if requested by the attributes parameter, or null. 49 | /// A new array of the vertex uv0 values if requested by the attributes parameter, or null. 50 | /// A new array of the vertex normal values if requested by the attributes parameter, or null. 51 | /// A new array of the vertex tangent values if requested by the attributes parameter, or null. 52 | /// A new array of the vertex uv2 values if requested by the attributes parameter, or null. 53 | /// A new array of the vertex uv3 values if requested by the attributes parameter, or null. 54 | /// A new array of the vertex uv4 values if requested by the attributes parameter, or null. 55 | /// A flag with the MeshAttributes requested. 56 | /// 57 | public static void GetArrays( 58 | IList vertices, 59 | out Vector3[] position, 60 | out Color[] color, 61 | out Vector2[] uv0, 62 | out Vector3[] normal, 63 | out Vector4[] tangent, 64 | out Vector2[] uv2, 65 | out List uv3, 66 | out List uv4, 67 | VertexAttributes attributes) 68 | { 69 | if (vertices == null) 70 | throw new ArgumentNullException("vertices"); 71 | 72 | int vc = vertices.Count; 73 | var first = vc < 1 ? new Vertex() : vertices[0]; 74 | 75 | bool hasPosition = ((attributes & VertexAttributes.Position) == VertexAttributes.Position) && first.hasPosition; 76 | bool hasColor = ((attributes & VertexAttributes.Color) == VertexAttributes.Color) && first.hasColor; 77 | bool hasUv0 = ((attributes & VertexAttributes.Texture0) == VertexAttributes.Texture0) && first.hasUV0; 78 | bool hasNormal = ((attributes & VertexAttributes.Normal) == VertexAttributes.Normal) && first.hasNormal; 79 | bool hasTangent = ((attributes & VertexAttributes.Tangent) == VertexAttributes.Tangent) && first.hasTangent; 80 | bool hasUv2 = ((attributes & VertexAttributes.Texture1) == VertexAttributes.Texture1) && first.hasUV2; 81 | bool hasUv3 = ((attributes & VertexAttributes.Texture2) == VertexAttributes.Texture2) && first.hasUV3; 82 | bool hasUv4 = ((attributes & VertexAttributes.Texture3) == VertexAttributes.Texture3) && first.hasUV4; 83 | 84 | position = hasPosition ? new Vector3[vc] : null; 85 | color = hasColor ? new Color[vc] : null; 86 | uv0 = hasUv0 ? new Vector2[vc] : null; 87 | normal = hasNormal ? new Vector3[vc] : null; 88 | tangent = hasTangent ? new Vector4[vc] : null; 89 | uv2 = hasUv2 ? new Vector2[vc] : null; 90 | uv3 = hasUv3 ? new List(vc) : null; 91 | uv4 = hasUv4 ? new List(vc) : null; 92 | 93 | for (int i = 0; i < vc; i++) 94 | { 95 | if (hasPosition) 96 | position[i] = vertices[i].position; 97 | if (hasColor) 98 | color[i] = vertices[i].color; 99 | if (hasUv0) 100 | uv0[i] = vertices[i].uv0; 101 | if (hasNormal) 102 | normal[i] = vertices[i].normal; 103 | if (hasTangent) 104 | tangent[i] = vertices[i].tangent; 105 | if (hasUv2) 106 | uv2[i] = vertices[i].uv2; 107 | if (hasUv3) 108 | uv3.Add(vertices[i].uv3); 109 | if (hasUv4) 110 | uv4.Add(vertices[i].uv4); 111 | } 112 | } 113 | 114 | public static Vertex[] GetVertices(this Mesh mesh) 115 | { 116 | if (mesh == null) 117 | return null; 118 | 119 | int vertexCount = mesh.vertexCount; 120 | Vertex[] v = new Vertex[vertexCount]; 121 | 122 | Vector3[] positions = mesh.vertices; 123 | Color[] colors = mesh.colors; 124 | Vector3[] normals = mesh.normals; 125 | Vector4[] tangents = mesh.tangents; 126 | Vector2[] uv0s = mesh.uv; 127 | Vector2[] uv2s = mesh.uv2; 128 | List uv3s = new List(); 129 | List uv4s = new List(); 130 | mesh.GetUVs(2, uv3s); 131 | mesh.GetUVs(3, uv4s); 132 | 133 | bool _hasPositions = positions != null && positions.Length == vertexCount; 134 | bool _hasColors = colors != null && colors.Length == vertexCount; 135 | bool _hasNormals = normals != null && normals.Length == vertexCount; 136 | bool _hasTangents = tangents != null && tangents.Length == vertexCount; 137 | bool _hasUv0 = uv0s != null && uv0s.Length == vertexCount; 138 | bool _hasUv2 = uv2s != null && uv2s.Length == vertexCount; 139 | bool _hasUv3 = uv3s.Count == vertexCount; 140 | bool _hasUv4 = uv4s.Count == vertexCount; 141 | 142 | for (int i = 0; i < vertexCount; i++) 143 | { 144 | v[i] = new Vertex(); 145 | 146 | if (_hasPositions) 147 | v[i].position = positions[i]; 148 | 149 | if (_hasColors) 150 | v[i].color = colors[i]; 151 | 152 | if (_hasNormals) 153 | v[i].normal = normals[i]; 154 | 155 | if (_hasTangents) 156 | v[i].tangent = tangents[i]; 157 | 158 | if (_hasUv0) 159 | v[i].uv0 = uv0s[i]; 160 | 161 | if (_hasUv2) 162 | v[i].uv2 = uv2s[i]; 163 | 164 | if (_hasUv3) 165 | v[i].uv3 = uv3s[i]; 166 | 167 | if (_hasUv4) 168 | v[i].uv4 = uv4s[i]; 169 | } 170 | 171 | return v; 172 | } 173 | 174 | /// 175 | /// Replace mesh values with vertex array. Mesh is cleared during this function, so be sure to set the triangles after calling. 176 | /// 177 | /// The target mesh. 178 | /// The vertices to replace the mesh attributes with. 179 | public static void SetMesh(Mesh mesh, IList vertices) 180 | { 181 | if (mesh == null) 182 | throw new ArgumentNullException("mesh"); 183 | 184 | if (vertices == null) 185 | throw new ArgumentNullException("vertices"); 186 | 187 | Vector3[] positions = null; 188 | Color[] colors = null; 189 | Vector2[] uv0s = null; 190 | Vector3[] normals = null; 191 | Vector4[] tangents = null; 192 | Vector2[] uv2s = null; 193 | List uv3s = null; 194 | List uv4s = null; 195 | 196 | GetArrays(vertices, out positions, 197 | out colors, 198 | out uv0s, 199 | out normals, 200 | out tangents, 201 | out uv2s, 202 | out uv3s, 203 | out uv4s); 204 | 205 | mesh.Clear(); 206 | 207 | Vertex first = vertices[0]; 208 | 209 | if (first.hasPosition) mesh.vertices = positions; 210 | if (first.hasColor) mesh.colors = colors; 211 | if (first.hasUV0) mesh.uv = uv0s; 212 | if (first.hasNormal) mesh.normals = normals; 213 | if (first.hasTangent) mesh.tangents = tangents; 214 | if (first.hasUV2) mesh.uv2 = uv2s; 215 | if (first.hasUV3) 216 | if (uv3s != null) 217 | mesh.SetUVs(2, uv3s); 218 | if (first.hasUV4) 219 | if (uv4s != null) 220 | mesh.SetUVs(3, uv4s); 221 | } 222 | 223 | /// 224 | /// Linearly interpolate between two vertices. 225 | /// 226 | /// Left parameter. 227 | /// Right parameter. 228 | /// The weight of the interpolation. 0 is fully x, 1 is fully y. 229 | /// A new vertex interpolated by weight between x and y. 230 | public static Vertex Mix(this Vertex x, Vertex y, float weight) 231 | { 232 | float i = 1f - weight; 233 | 234 | Vertex v = new Vertex(); 235 | 236 | v.position = x.position * i + y.position * weight; 237 | 238 | if (x.hasColor && y.hasColor) 239 | v.color = x.color * i + y.color * weight; 240 | else if (x.hasColor) 241 | v.color = x.color; 242 | else if (y.hasColor) 243 | v.color = y.color; 244 | 245 | if (x.hasNormal && y.hasNormal) 246 | v.normal = x.normal * i + y.normal * weight; 247 | else if (x.hasNormal) 248 | v.normal = x.normal; 249 | else if (y.hasNormal) 250 | v.normal = y.normal; 251 | 252 | if (x.hasTangent && y.hasTangent) 253 | v.tangent = x.tangent * i + y.tangent * weight; 254 | else if (x.hasTangent) 255 | v.tangent = x.tangent; 256 | else if (y.hasTangent) 257 | v.tangent = y.tangent; 258 | 259 | if (x.hasUV0 && y.hasUV0) 260 | v.uv0 = x.uv0 * i + y.uv0 * weight; 261 | else if (x.hasUV0) 262 | v.uv0 = x.uv0; 263 | else if (y.hasUV0) 264 | v.uv0 = y.uv0; 265 | 266 | if (x.hasUV2 && y.hasUV2) 267 | v.uv2 = x.uv2 * i + y.uv2 * weight; 268 | else if (x.hasUV2) 269 | v.uv2 = x.uv2; 270 | else if (y.hasUV2) 271 | v.uv2 = y.uv2; 272 | 273 | if (x.hasUV3 && y.hasUV3) 274 | v.uv3 = x.uv3 * i + y.uv3 * weight; 275 | else if (x.hasUV3) 276 | v.uv3 = x.uv3; 277 | else if (y.hasUV3) 278 | v.uv3 = y.uv3; 279 | 280 | if (x.hasUV4 && y.hasUV4) 281 | v.uv4 = x.uv4 * i + y.uv4 * weight; 282 | else if (x.hasUV4) 283 | v.uv4 = x.uv4; 284 | else if (y.hasUV4) 285 | v.uv4 = y.uv4; 286 | 287 | return v; 288 | } 289 | 290 | /// 291 | /// Transform a vertex into world space. 292 | /// 293 | /// The transform to apply. 294 | /// A model space vertex. 295 | /// A new vertex in world coordinate space. 296 | public static Vertex TransformVertex(this Transform transform, Vertex vertex) 297 | { 298 | var v = new Vertex(); 299 | 300 | if (vertex.HasArrays(VertexAttributes.Position)) 301 | v.position = transform.TransformPoint(vertex.position); 302 | 303 | if (vertex.HasArrays(VertexAttributes.Color)) 304 | v.color = vertex.color; 305 | 306 | if (vertex.HasArrays(VertexAttributes.Normal)) 307 | v.normal = transform.TransformDirection(vertex.normal); 308 | 309 | if (vertex.HasArrays(VertexAttributes.Tangent)) 310 | v.tangent = transform.rotation * vertex.tangent; 311 | 312 | if (vertex.HasArrays(VertexAttributes.Texture0)) 313 | v.uv0 = vertex.uv0; 314 | 315 | if (vertex.HasArrays(VertexAttributes.Texture1)) 316 | v.uv2 = vertex.uv2; 317 | 318 | if (vertex.HasArrays(VertexAttributes.Texture2)) 319 | v.uv3 = vertex.uv3; 320 | 321 | if (vertex.HasArrays(VertexAttributes.Texture3)) 322 | v.uv4 = vertex.uv4; 323 | 324 | return v; 325 | } 326 | } 327 | } 328 | -------------------------------------------------------------------------------- /CSG/Classes/VertexUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7c3201b501ec43fb812b740631a62b1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CSG/Parabox.CSG.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.ProBuilder.Csg", 3 | "references": [], 4 | "optionalUnityReferences": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [] 12 | } 13 | -------------------------------------------------------------------------------- /CSG/Parabox.CSG.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc7a76bbd6d37bf29a03b12fdc01a1cd 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Karl Henkel 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 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b06d98e41f634879ab424faf7644a02 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pb_CSG 2 | 3 | A C# port of [CSG.js](http://evanw.github.io/csg.js/) by Evan W for use in the Unity game engine. 4 | 5 | ## Install 6 | 7 | To install, simply check out this repository in the `My Project/Packages` directory. 8 | 9 | ``` 10 | cd My\ Project/Packages 11 | git clone https://github.com/karl-/pb_CSG.git co.parabox.csg 12 | ``` 13 | 14 | ## Quick Start 15 | 16 | pb_CSG provides an interface in the `CSG` class for creating new meshes from boolean operations. Each function (`Union`, `Subtract`, `Intersect`) accepts 2 gameObjects: the left and right side. A new mesh is returned. 17 | 18 | Example use: 19 | 20 | // Include the library 21 | using Parabox.CSG; 22 | 23 | ... 24 | 25 | // Initialize two new meshes in the scene 26 | GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); 27 | GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); 28 | sphere.transform.localScale = Vector3.one * 1.3f; 29 | 30 | // Perform boolean operation 31 | Model result = CSG.Subtract(cube, sphere); 32 | 33 | // Create a gameObject to render the result 34 | var composite = new GameObject(); 35 | composite.AddComponent().sharedMesh = result.mesh; 36 | composite.AddComponent().sharedMaterials = result.materials.ToArray(); 37 | 38 | Result: 39 | 40 | ![](bin~/images/subtract.PNG?raw=true) 41 | 42 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca986e024ff5140f181ae06d8eac5ab3 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eea8a65ec866d4b1081de13c3291c170 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/.sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName":"CSG Demo Scene", 3 | "description": "Demonstrates usage of CSG class.", 4 | "createSeparatePackage": false 5 | } 6 | -------------------------------------------------------------------------------- /Samples/Demo Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 139a9fca8e9f4b6429296d3fc1e0a749 3 | folderAsset: yes 4 | timeCreated: 1428248661 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Material.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 474945f6bd1a41243ad1ed59121b8143 3 | folderAsset: yes 4 | timeCreated: 1428248693 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Material/Checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/Samples/Demo Assets/Material/Checker.png -------------------------------------------------------------------------------- /Samples/Demo Assets/Material/Checker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41c9322827d1f9a4d830db3f0f391f64 3 | timeCreated: 1428249475 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Material/Wireframe.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Wireframe 11 | m_Shader: {fileID: 4800000, guid: 4928d9c2b4bef734cb5730d88a2580e6, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 41c9322827d1f9a4d830db3f0f391f64, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _Texture: 59 | m_Texture: {fileID: 2800000, guid: 41c9322827d1f9a4d830db3f0f391f64, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Floats: 63 | - _BumpScale: 1 64 | - _Cutoff: 0.5 65 | - _DetailNormalMapScale: 1 66 | - _DstBlend: 0 67 | - _EmissionScaleUI: 0 68 | - _Glossiness: 0.5 69 | - _Metallic: 0 70 | - _Mode: 0 71 | - _OcclusionStrength: 1 72 | - _Opacity: 1 73 | - _Parallax: 0.02 74 | - _SrcBlend: 1 75 | - _Thickness: 0.75 76 | - _UVSec: 0 77 | - _ZWrite: 1 78 | m_Colors: 79 | - _Color: {r: 0, g: 0, b: 0, a: 1} 80 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 81 | - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} 82 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Material/Wireframe.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7249d5446da713e4b96ce4bec901ddc4 3 | timeCreated: 1428245308 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dc71d28f4711834ab78b82d069343b1 3 | folderAsset: yes 4 | timeCreated: 1428253637 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/CubeCapsule.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &118580 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 497284} 12 | - component: {fileID: 3332664} 13 | - component: {fileID: 6539986} 14 | - component: {fileID: 2353612} 15 | m_Layer: 0 16 | m_Name: Cube 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &497284 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 118580} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0.05284801, y: 0.076564014, z: 0.022152036} 31 | m_LocalScale: {x: 0.60774314, y: 1.7016809, z: 0.60774314} 32 | m_Children: [] 33 | m_Father: {fileID: 423082} 34 | m_RootOrder: 1 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &3332664 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 118580} 43 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 44 | --- !u!65 &6539986 45 | BoxCollider: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 118580} 51 | m_Material: {fileID: 0} 52 | m_IsTrigger: 0 53 | m_Enabled: 1 54 | serializedVersion: 2 55 | m_Size: {x: 1, y: 1, z: 1} 56 | m_Center: {x: 0, y: 0, z: 0} 57 | --- !u!23 &2353612 58 | MeshRenderer: 59 | m_ObjectHideFlags: 0 60 | m_CorrespondingSourceObject: {fileID: 0} 61 | m_PrefabInstance: {fileID: 0} 62 | m_PrefabAsset: {fileID: 0} 63 | m_GameObject: {fileID: 118580} 64 | m_Enabled: 1 65 | m_CastShadows: 1 66 | m_ReceiveShadows: 1 67 | m_DynamicOccludee: 1 68 | m_MotionVectors: 1 69 | m_LightProbeUsage: 1 70 | m_ReflectionProbeUsage: 1 71 | m_RenderingLayerMask: 1 72 | m_RendererPriority: 0 73 | m_Materials: 74 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 75 | m_StaticBatchInfo: 76 | firstSubMesh: 0 77 | subMeshCount: 0 78 | m_StaticBatchRoot: {fileID: 0} 79 | m_ProbeAnchor: {fileID: 0} 80 | m_LightProbeVolumeOverride: {fileID: 0} 81 | m_ScaleInLightmap: 1 82 | m_PreserveUVs: 1 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 0 86 | m_SelectedEditorRenderState: 3 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | --- !u!1 &154230 95 | GameObject: 96 | m_ObjectHideFlags: 0 97 | m_CorrespondingSourceObject: {fileID: 0} 98 | m_PrefabInstance: {fileID: 0} 99 | m_PrefabAsset: {fileID: 0} 100 | serializedVersion: 6 101 | m_Component: 102 | - component: {fileID: 454448} 103 | - component: {fileID: 3330222} 104 | - component: {fileID: 13633874} 105 | - component: {fileID: 2336528} 106 | m_Layer: 0 107 | m_Name: Capsule 108 | m_TagString: Untagged 109 | m_Icon: {fileID: 0} 110 | m_NavMeshLayer: 0 111 | m_StaticEditorFlags: 0 112 | m_IsActive: 1 113 | --- !u!4 &454448 114 | Transform: 115 | m_ObjectHideFlags: 0 116 | m_CorrespondingSourceObject: {fileID: 0} 117 | m_PrefabInstance: {fileID: 0} 118 | m_PrefabAsset: {fileID: 0} 119 | m_GameObject: {fileID: 154230} 120 | m_LocalRotation: {x: 0.46193957, y: -0.1913416, z: -0.3314135, w: 0.80010337} 121 | m_LocalPosition: {x: -0.165136, y: 0.076564014, z: 0.09453601} 122 | m_LocalScale: {x: 0.97344005, y: 0.9734401, z: 0.9734403} 123 | m_Children: [] 124 | m_Father: {fileID: 423082} 125 | m_RootOrder: 0 126 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 127 | --- !u!33 &3330222 128 | MeshFilter: 129 | m_ObjectHideFlags: 0 130 | m_CorrespondingSourceObject: {fileID: 0} 131 | m_PrefabInstance: {fileID: 0} 132 | m_PrefabAsset: {fileID: 0} 133 | m_GameObject: {fileID: 154230} 134 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 135 | --- !u!136 &13633874 136 | CapsuleCollider: 137 | m_ObjectHideFlags: 0 138 | m_CorrespondingSourceObject: {fileID: 0} 139 | m_PrefabInstance: {fileID: 0} 140 | m_PrefabAsset: {fileID: 0} 141 | m_GameObject: {fileID: 154230} 142 | m_Material: {fileID: 0} 143 | m_IsTrigger: 0 144 | m_Enabled: 1 145 | m_Radius: 0.5 146 | m_Height: 2 147 | m_Direction: 1 148 | m_Center: {x: 0, y: 0, z: 0} 149 | --- !u!23 &2336528 150 | MeshRenderer: 151 | m_ObjectHideFlags: 0 152 | m_CorrespondingSourceObject: {fileID: 0} 153 | m_PrefabInstance: {fileID: 0} 154 | m_PrefabAsset: {fileID: 0} 155 | m_GameObject: {fileID: 154230} 156 | m_Enabled: 1 157 | m_CastShadows: 1 158 | m_ReceiveShadows: 1 159 | m_DynamicOccludee: 1 160 | m_MotionVectors: 1 161 | m_LightProbeUsage: 1 162 | m_ReflectionProbeUsage: 1 163 | m_RenderingLayerMask: 1 164 | m_RendererPriority: 0 165 | m_Materials: 166 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 167 | m_StaticBatchInfo: 168 | firstSubMesh: 0 169 | subMeshCount: 0 170 | m_StaticBatchRoot: {fileID: 0} 171 | m_ProbeAnchor: {fileID: 0} 172 | m_LightProbeVolumeOverride: {fileID: 0} 173 | m_ScaleInLightmap: 1 174 | m_PreserveUVs: 1 175 | m_IgnoreNormalsForChartDetection: 0 176 | m_ImportantGI: 0 177 | m_StitchLightmapSeams: 0 178 | m_SelectedEditorRenderState: 3 179 | m_MinimumChartSize: 4 180 | m_AutoUVMaxDistance: 0.5 181 | m_AutoUVMaxAngle: 89 182 | m_LightmapParameters: {fileID: 0} 183 | m_SortingLayerID: 0 184 | m_SortingLayer: 0 185 | m_SortingOrder: 0 186 | --- !u!1 &158940 187 | GameObject: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | serializedVersion: 6 193 | m_Component: 194 | - component: {fileID: 423082} 195 | m_Layer: 0 196 | m_Name: CubeCapsule 197 | m_TagString: Untagged 198 | m_Icon: {fileID: 0} 199 | m_NavMeshLayer: 0 200 | m_StaticEditorFlags: 0 201 | m_IsActive: 1 202 | --- !u!4 &423082 203 | Transform: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | m_GameObject: {fileID: 158940} 209 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 210 | m_LocalPosition: {x: 0, y: 0, z: 0} 211 | m_LocalScale: {x: 1, y: 1, z: 1} 212 | m_Children: 213 | - {fileID: 454448} 214 | - {fileID: 497284} 215 | m_Father: {fileID: 0} 216 | m_RootOrder: 0 217 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 218 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/CubeCapsule.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6985547397e6b864592f722d1a1440e6 3 | timeCreated: 1428255758 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/CylinderSquare.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &130178 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 459838} 12 | - component: {fileID: 3397974} 13 | - component: {fileID: 13656004} 14 | - component: {fileID: 2307282} 15 | m_Layer: 0 16 | m_Name: Cylinder 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &459838 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 130178} 29 | m_LocalRotation: {x: 0.707107, y: 0, z: 0, w: 0.70710665} 30 | m_LocalPosition: {x: 0.127, y: -0.032999992, z: 0.083} 31 | m_LocalScale: {x: 0.7, y: 0.7, z: 0.7} 32 | m_Children: [] 33 | m_Father: {fileID: 493486} 34 | m_RootOrder: 1 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &3397974 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 130178} 43 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 44 | --- !u!136 &13656004 45 | CapsuleCollider: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 130178} 51 | m_Material: {fileID: 0} 52 | m_IsTrigger: 0 53 | m_Enabled: 1 54 | m_Radius: 0.5 55 | m_Height: 2 56 | m_Direction: 1 57 | m_Center: {x: 0, y: 0, z: 0} 58 | --- !u!23 &2307282 59 | MeshRenderer: 60 | m_ObjectHideFlags: 0 61 | m_CorrespondingSourceObject: {fileID: 0} 62 | m_PrefabInstance: {fileID: 0} 63 | m_PrefabAsset: {fileID: 0} 64 | m_GameObject: {fileID: 130178} 65 | m_Enabled: 1 66 | m_CastShadows: 1 67 | m_ReceiveShadows: 1 68 | m_DynamicOccludee: 1 69 | m_MotionVectors: 1 70 | m_LightProbeUsage: 1 71 | m_ReflectionProbeUsage: 1 72 | m_RenderingLayerMask: 1 73 | m_RendererPriority: 0 74 | m_Materials: 75 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 76 | m_StaticBatchInfo: 77 | firstSubMesh: 0 78 | subMeshCount: 0 79 | m_StaticBatchRoot: {fileID: 0} 80 | m_ProbeAnchor: {fileID: 0} 81 | m_LightProbeVolumeOverride: {fileID: 0} 82 | m_ScaleInLightmap: 1 83 | m_PreserveUVs: 1 84 | m_IgnoreNormalsForChartDetection: 0 85 | m_ImportantGI: 0 86 | m_StitchLightmapSeams: 0 87 | m_SelectedEditorRenderState: 3 88 | m_MinimumChartSize: 4 89 | m_AutoUVMaxDistance: 0.5 90 | m_AutoUVMaxAngle: 89 91 | m_LightmapParameters: {fileID: 0} 92 | m_SortingLayerID: 0 93 | m_SortingLayer: 0 94 | m_SortingOrder: 0 95 | --- !u!1 &144168 96 | GameObject: 97 | m_ObjectHideFlags: 0 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInstance: {fileID: 0} 100 | m_PrefabAsset: {fileID: 0} 101 | serializedVersion: 6 102 | m_Component: 103 | - component: {fileID: 493486} 104 | m_Layer: 0 105 | m_Name: CylinderSquare 106 | m_TagString: Untagged 107 | m_Icon: {fileID: 0} 108 | m_NavMeshLayer: 0 109 | m_StaticEditorFlags: 0 110 | m_IsActive: 1 111 | --- !u!4 &493486 112 | Transform: 113 | m_ObjectHideFlags: 0 114 | m_CorrespondingSourceObject: {fileID: 0} 115 | m_PrefabInstance: {fileID: 0} 116 | m_PrefabAsset: {fileID: 0} 117 | m_GameObject: {fileID: 144168} 118 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 119 | m_LocalPosition: {x: 0, y: 0, z: 0} 120 | m_LocalScale: {x: 1, y: 1, z: 1} 121 | m_Children: 122 | - {fileID: 492880} 123 | - {fileID: 459838} 124 | m_Father: {fileID: 0} 125 | m_RootOrder: 0 126 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 127 | --- !u!1 &186970 128 | GameObject: 129 | m_ObjectHideFlags: 0 130 | m_CorrespondingSourceObject: {fileID: 0} 131 | m_PrefabInstance: {fileID: 0} 132 | m_PrefabAsset: {fileID: 0} 133 | serializedVersion: 6 134 | m_Component: 135 | - component: {fileID: 492880} 136 | - component: {fileID: 3301724} 137 | - component: {fileID: 6517952} 138 | - component: {fileID: 2340142} 139 | m_Layer: 0 140 | m_Name: Cube 141 | m_TagString: Untagged 142 | m_Icon: {fileID: 0} 143 | m_NavMeshLayer: 0 144 | m_StaticEditorFlags: 0 145 | m_IsActive: 1 146 | --- !u!4 &492880 147 | Transform: 148 | m_ObjectHideFlags: 0 149 | m_CorrespondingSourceObject: {fileID: 0} 150 | m_PrefabInstance: {fileID: 0} 151 | m_PrefabAsset: {fileID: 0} 152 | m_GameObject: {fileID: 186970} 153 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 154 | m_LocalPosition: {x: 0.05, y: -0.03400001, z: 0.083} 155 | m_LocalScale: {x: 1.2, y: 1.6, z: 0.32000002} 156 | m_Children: [] 157 | m_Father: {fileID: 493486} 158 | m_RootOrder: 0 159 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 160 | --- !u!33 &3301724 161 | MeshFilter: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 186970} 167 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 168 | --- !u!65 &6517952 169 | BoxCollider: 170 | m_ObjectHideFlags: 0 171 | m_CorrespondingSourceObject: {fileID: 0} 172 | m_PrefabInstance: {fileID: 0} 173 | m_PrefabAsset: {fileID: 0} 174 | m_GameObject: {fileID: 186970} 175 | m_Material: {fileID: 0} 176 | m_IsTrigger: 0 177 | m_Enabled: 1 178 | serializedVersion: 2 179 | m_Size: {x: 1, y: 1, z: 1} 180 | m_Center: {x: 0, y: 0, z: 0} 181 | --- !u!23 &2340142 182 | MeshRenderer: 183 | m_ObjectHideFlags: 0 184 | m_CorrespondingSourceObject: {fileID: 0} 185 | m_PrefabInstance: {fileID: 0} 186 | m_PrefabAsset: {fileID: 0} 187 | m_GameObject: {fileID: 186970} 188 | m_Enabled: 1 189 | m_CastShadows: 1 190 | m_ReceiveShadows: 1 191 | m_DynamicOccludee: 1 192 | m_MotionVectors: 1 193 | m_LightProbeUsage: 1 194 | m_ReflectionProbeUsage: 1 195 | m_RenderingLayerMask: 1 196 | m_RendererPriority: 0 197 | m_Materials: 198 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 199 | m_StaticBatchInfo: 200 | firstSubMesh: 0 201 | subMeshCount: 0 202 | m_StaticBatchRoot: {fileID: 0} 203 | m_ProbeAnchor: {fileID: 0} 204 | m_LightProbeVolumeOverride: {fileID: 0} 205 | m_ScaleInLightmap: 1 206 | m_PreserveUVs: 1 207 | m_IgnoreNormalsForChartDetection: 0 208 | m_ImportantGI: 0 209 | m_StitchLightmapSeams: 0 210 | m_SelectedEditorRenderState: 3 211 | m_MinimumChartSize: 4 212 | m_AutoUVMaxDistance: 0.5 213 | m_AutoUVMaxAngle: 89 214 | m_LightmapParameters: {fileID: 0} 215 | m_SortingLayerID: 0 216 | m_SortingLayer: 0 217 | m_SortingOrder: 0 218 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/CylinderSquare.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 678cdbee1e449a942bbed43014132d8a 3 | timeCreated: 1428253628 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/SphereInCube.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &109092 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 404562} 12 | - component: {fileID: 3368412} 13 | - component: {fileID: 6536214} 14 | - component: {fileID: 2384908} 15 | m_Layer: 0 16 | m_Name: Cube 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &404562 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 109092} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 440206} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &3368412 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 109092} 43 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 44 | --- !u!65 &6536214 45 | BoxCollider: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 109092} 51 | m_Material: {fileID: 0} 52 | m_IsTrigger: 0 53 | m_Enabled: 1 54 | serializedVersion: 2 55 | m_Size: {x: 1, y: 1, z: 1} 56 | m_Center: {x: 0, y: 0, z: 0} 57 | --- !u!23 &2384908 58 | MeshRenderer: 59 | m_ObjectHideFlags: 0 60 | m_CorrespondingSourceObject: {fileID: 0} 61 | m_PrefabInstance: {fileID: 0} 62 | m_PrefabAsset: {fileID: 0} 63 | m_GameObject: {fileID: 109092} 64 | m_Enabled: 1 65 | m_CastShadows: 1 66 | m_ReceiveShadows: 1 67 | m_DynamicOccludee: 1 68 | m_MotionVectors: 1 69 | m_LightProbeUsage: 1 70 | m_ReflectionProbeUsage: 1 71 | m_RenderingLayerMask: 1 72 | m_RendererPriority: 0 73 | m_Materials: 74 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 75 | m_StaticBatchInfo: 76 | firstSubMesh: 0 77 | subMeshCount: 0 78 | m_StaticBatchRoot: {fileID: 0} 79 | m_ProbeAnchor: {fileID: 0} 80 | m_LightProbeVolumeOverride: {fileID: 0} 81 | m_ScaleInLightmap: 1 82 | m_PreserveUVs: 1 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 0 86 | m_SelectedEditorRenderState: 3 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | --- !u!1 &145976 95 | GameObject: 96 | m_ObjectHideFlags: 0 97 | m_CorrespondingSourceObject: {fileID: 0} 98 | m_PrefabInstance: {fileID: 0} 99 | m_PrefabAsset: {fileID: 0} 100 | serializedVersion: 6 101 | m_Component: 102 | - component: {fileID: 440206} 103 | m_Layer: 0 104 | m_Name: SphereInCube 105 | m_TagString: Untagged 106 | m_Icon: {fileID: 0} 107 | m_NavMeshLayer: 0 108 | m_StaticEditorFlags: 0 109 | m_IsActive: 1 110 | --- !u!4 &440206 111 | Transform: 112 | m_ObjectHideFlags: 0 113 | m_CorrespondingSourceObject: {fileID: 0} 114 | m_PrefabInstance: {fileID: 0} 115 | m_PrefabAsset: {fileID: 0} 116 | m_GameObject: {fileID: 145976} 117 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 118 | m_LocalPosition: {x: 0.050000012, y: -0.28399998, z: 0.083000004} 119 | m_LocalScale: {x: 1, y: 1, z: 1} 120 | m_Children: 121 | - {fileID: 404562} 122 | - {fileID: 454428} 123 | m_Father: {fileID: 0} 124 | m_RootOrder: 0 125 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 126 | --- !u!1 &161106 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 454428} 135 | - component: {fileID: 3308544} 136 | - component: {fileID: 13547764} 137 | - component: {fileID: 2355350} 138 | m_Layer: 0 139 | m_Name: Sphere 140 | m_TagString: Untagged 141 | m_Icon: {fileID: 0} 142 | m_NavMeshLayer: 0 143 | m_StaticEditorFlags: 0 144 | m_IsActive: 1 145 | --- !u!4 &454428 146 | Transform: 147 | m_ObjectHideFlags: 0 148 | m_CorrespondingSourceObject: {fileID: 0} 149 | m_PrefabInstance: {fileID: 0} 150 | m_PrefabAsset: {fileID: 0} 151 | m_GameObject: {fileID: 161106} 152 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 153 | m_LocalPosition: {x: -0, y: -0, z: -0} 154 | m_LocalScale: {x: 1.3, y: 1.2999998, z: 1.2999998} 155 | m_Children: [] 156 | m_Father: {fileID: 440206} 157 | m_RootOrder: 1 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | --- !u!33 &3308544 160 | MeshFilter: 161 | m_ObjectHideFlags: 0 162 | m_CorrespondingSourceObject: {fileID: 0} 163 | m_PrefabInstance: {fileID: 0} 164 | m_PrefabAsset: {fileID: 0} 165 | m_GameObject: {fileID: 161106} 166 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 167 | --- !u!135 &13547764 168 | SphereCollider: 169 | m_ObjectHideFlags: 0 170 | m_CorrespondingSourceObject: {fileID: 0} 171 | m_PrefabInstance: {fileID: 0} 172 | m_PrefabAsset: {fileID: 0} 173 | m_GameObject: {fileID: 161106} 174 | m_Material: {fileID: 0} 175 | m_IsTrigger: 0 176 | m_Enabled: 1 177 | serializedVersion: 2 178 | m_Radius: 0.5 179 | m_Center: {x: 0, y: 0, z: 0} 180 | --- !u!23 &2355350 181 | MeshRenderer: 182 | m_ObjectHideFlags: 0 183 | m_CorrespondingSourceObject: {fileID: 0} 184 | m_PrefabInstance: {fileID: 0} 185 | m_PrefabAsset: {fileID: 0} 186 | m_GameObject: {fileID: 161106} 187 | m_Enabled: 1 188 | m_CastShadows: 1 189 | m_ReceiveShadows: 1 190 | m_DynamicOccludee: 1 191 | m_MotionVectors: 1 192 | m_LightProbeUsage: 1 193 | m_ReflectionProbeUsage: 1 194 | m_RenderingLayerMask: 1 195 | m_RendererPriority: 0 196 | m_Materials: 197 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 198 | m_StaticBatchInfo: 199 | firstSubMesh: 0 200 | subMeshCount: 0 201 | m_StaticBatchRoot: {fileID: 0} 202 | m_ProbeAnchor: {fileID: 0} 203 | m_LightProbeVolumeOverride: {fileID: 0} 204 | m_ScaleInLightmap: 1 205 | m_PreserveUVs: 1 206 | m_IgnoreNormalsForChartDetection: 0 207 | m_ImportantGI: 0 208 | m_StitchLightmapSeams: 0 209 | m_SelectedEditorRenderState: 3 210 | m_MinimumChartSize: 4 211 | m_AutoUVMaxDistance: 0.5 212 | m_AutoUVMaxAngle: 89 213 | m_LightmapParameters: {fileID: 0} 214 | m_SortingLayerID: 0 215 | m_SortingLayer: 0 216 | m_SortingOrder: 0 217 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/SphereInCube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68212dad33f3b5a4897a979f72745eb7 3 | timeCreated: 1428259785 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/SphereSquare.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &136624 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 489048} 12 | m_Layer: 0 13 | m_Name: SphereSquare 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &489048 20 | Transform: 21 | m_ObjectHideFlags: 0 22 | m_CorrespondingSourceObject: {fileID: 0} 23 | m_PrefabInstance: {fileID: 0} 24 | m_PrefabAsset: {fileID: 0} 25 | m_GameObject: {fileID: 136624} 26 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 27 | m_LocalPosition: {x: 0, y: 0, z: 0} 28 | m_LocalScale: {x: 1, y: 1, z: 1} 29 | m_Children: 30 | - {fileID: 415162} 31 | - {fileID: 466122} 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!1 &153690 36 | GameObject: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | serializedVersion: 6 42 | m_Component: 43 | - component: {fileID: 415162} 44 | - component: {fileID: 3389596} 45 | - component: {fileID: 6555238} 46 | - component: {fileID: 2385630} 47 | m_Layer: 0 48 | m_Name: Cube 49 | m_TagString: Untagged 50 | m_Icon: {fileID: 0} 51 | m_NavMeshLayer: 0 52 | m_StaticEditorFlags: 0 53 | m_IsActive: 1 54 | --- !u!4 &415162 55 | Transform: 56 | m_ObjectHideFlags: 0 57 | m_CorrespondingSourceObject: {fileID: 0} 58 | m_PrefabInstance: {fileID: 0} 59 | m_PrefabAsset: {fileID: 0} 60 | m_GameObject: {fileID: 153690} 61 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 62 | m_LocalPosition: {x: 0.16, y: -0.2, z: -0.1} 63 | m_LocalScale: {x: 1, y: 1, z: 1} 64 | m_Children: [] 65 | m_Father: {fileID: 489048} 66 | m_RootOrder: 0 67 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 68 | --- !u!33 &3389596 69 | MeshFilter: 70 | m_ObjectHideFlags: 0 71 | m_CorrespondingSourceObject: {fileID: 0} 72 | m_PrefabInstance: {fileID: 0} 73 | m_PrefabAsset: {fileID: 0} 74 | m_GameObject: {fileID: 153690} 75 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 76 | --- !u!65 &6555238 77 | BoxCollider: 78 | m_ObjectHideFlags: 0 79 | m_CorrespondingSourceObject: {fileID: 0} 80 | m_PrefabInstance: {fileID: 0} 81 | m_PrefabAsset: {fileID: 0} 82 | m_GameObject: {fileID: 153690} 83 | m_Material: {fileID: 0} 84 | m_IsTrigger: 0 85 | m_Enabled: 1 86 | serializedVersion: 2 87 | m_Size: {x: 1, y: 1, z: 1} 88 | m_Center: {x: 0, y: 0, z: 0} 89 | --- !u!23 &2385630 90 | MeshRenderer: 91 | m_ObjectHideFlags: 0 92 | m_CorrespondingSourceObject: {fileID: 0} 93 | m_PrefabInstance: {fileID: 0} 94 | m_PrefabAsset: {fileID: 0} 95 | m_GameObject: {fileID: 153690} 96 | m_Enabled: 1 97 | m_CastShadows: 1 98 | m_ReceiveShadows: 1 99 | m_DynamicOccludee: 1 100 | m_MotionVectors: 1 101 | m_LightProbeUsage: 1 102 | m_ReflectionProbeUsage: 1 103 | m_RenderingLayerMask: 1 104 | m_RendererPriority: 0 105 | m_Materials: 106 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 107 | m_StaticBatchInfo: 108 | firstSubMesh: 0 109 | subMeshCount: 0 110 | m_StaticBatchRoot: {fileID: 0} 111 | m_ProbeAnchor: {fileID: 0} 112 | m_LightProbeVolumeOverride: {fileID: 0} 113 | m_ScaleInLightmap: 1 114 | m_PreserveUVs: 1 115 | m_IgnoreNormalsForChartDetection: 0 116 | m_ImportantGI: 0 117 | m_StitchLightmapSeams: 0 118 | m_SelectedEditorRenderState: 3 119 | m_MinimumChartSize: 4 120 | m_AutoUVMaxDistance: 0.5 121 | m_AutoUVMaxAngle: 89 122 | m_LightmapParameters: {fileID: 0} 123 | m_SortingLayerID: 0 124 | m_SortingLayer: 0 125 | m_SortingOrder: 0 126 | --- !u!1 &193430 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 466122} 135 | - component: {fileID: 3308736} 136 | - component: {fileID: 13538144} 137 | - component: {fileID: 2302334} 138 | m_Layer: 0 139 | m_Name: Sphere 140 | m_TagString: Untagged 141 | m_Icon: {fileID: 0} 142 | m_NavMeshLayer: 0 143 | m_StaticEditorFlags: 0 144 | m_IsActive: 1 145 | --- !u!4 &466122 146 | Transform: 147 | m_ObjectHideFlags: 0 148 | m_CorrespondingSourceObject: {fileID: 0} 149 | m_PrefabInstance: {fileID: 0} 150 | m_PrefabAsset: {fileID: 0} 151 | m_GameObject: {fileID: 193430} 152 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 153 | m_LocalPosition: {x: -0.093, y: 0.09, z: 0.123} 154 | m_LocalScale: {x: 1.3, y: 1.3, z: 1.3} 155 | m_Children: [] 156 | m_Father: {fileID: 489048} 157 | m_RootOrder: 1 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | --- !u!33 &3308736 160 | MeshFilter: 161 | m_ObjectHideFlags: 0 162 | m_CorrespondingSourceObject: {fileID: 0} 163 | m_PrefabInstance: {fileID: 0} 164 | m_PrefabAsset: {fileID: 0} 165 | m_GameObject: {fileID: 193430} 166 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 167 | --- !u!135 &13538144 168 | SphereCollider: 169 | m_ObjectHideFlags: 0 170 | m_CorrespondingSourceObject: {fileID: 0} 171 | m_PrefabInstance: {fileID: 0} 172 | m_PrefabAsset: {fileID: 0} 173 | m_GameObject: {fileID: 193430} 174 | m_Material: {fileID: 0} 175 | m_IsTrigger: 0 176 | m_Enabled: 1 177 | serializedVersion: 2 178 | m_Radius: 0.5 179 | m_Center: {x: 0, y: 0, z: 0} 180 | --- !u!23 &2302334 181 | MeshRenderer: 182 | m_ObjectHideFlags: 0 183 | m_CorrespondingSourceObject: {fileID: 0} 184 | m_PrefabInstance: {fileID: 0} 185 | m_PrefabAsset: {fileID: 0} 186 | m_GameObject: {fileID: 193430} 187 | m_Enabled: 1 188 | m_CastShadows: 1 189 | m_ReceiveShadows: 1 190 | m_DynamicOccludee: 1 191 | m_MotionVectors: 1 192 | m_LightProbeUsage: 1 193 | m_ReflectionProbeUsage: 1 194 | m_RenderingLayerMask: 1 195 | m_RendererPriority: 0 196 | m_Materials: 197 | - {fileID: 2100000, guid: 7249d5446da713e4b96ce4bec901ddc4, type: 2} 198 | m_StaticBatchInfo: 199 | firstSubMesh: 0 200 | subMeshCount: 0 201 | m_StaticBatchRoot: {fileID: 0} 202 | m_ProbeAnchor: {fileID: 0} 203 | m_LightProbeVolumeOverride: {fileID: 0} 204 | m_ScaleInLightmap: 1 205 | m_PreserveUVs: 1 206 | m_IgnoreNormalsForChartDetection: 0 207 | m_ImportantGI: 0 208 | m_StitchLightmapSeams: 0 209 | m_SelectedEditorRenderState: 3 210 | m_MinimumChartSize: 4 211 | m_AutoUVMaxDistance: 0.5 212 | m_AutoUVMaxAngle: 89 213 | m_LightmapParameters: {fileID: 0} 214 | m_SortingLayerID: 0 215 | m_SortingLayer: 0 216 | m_SortingOrder: 0 217 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Prefabs/SphereSquare.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eab5f60e738b26542916aac113f57df4 3 | timeCreated: 1428253673 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37695177bfe52c74d9442e790dafc7f2 3 | folderAsset: yes 4 | timeCreated: 1428248681 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts/CameraControls.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Parabox.CSG.Demo 4 | { 5 | public class CameraControls : MonoBehaviour 6 | { 7 | const string INPUT_MOUSE_SCROLLWHEEL = "Mouse ScrollWheel"; 8 | const string INPUT_MOUSE_X = "Mouse X"; 9 | const string INPUT_MOUSE_Y = "Mouse Y"; 10 | const float MIN_CAM_DISTANCE = 2f; 11 | const float MAX_CAM_DISTANCE = 20f; 12 | 13 | // how fast the camera orbits 14 | [Range(2f, 15f)] 15 | public float orbitSpeed = 6f; 16 | 17 | // how fast the camera zooms in and out 18 | [Range(.3f, 2f)] 19 | public float zoomSpeed = .8f; 20 | 21 | // the current distance from pivot point (locked to Vector3.zero) 22 | float distance = 0f; 23 | 24 | void Start() 25 | { 26 | distance = Vector3.Distance(transform.position, Vector3.zero); 27 | } 28 | 29 | void LateUpdate() 30 | { 31 | // orbits 32 | if (Input.GetMouseButton(0)) 33 | { 34 | float rot_x = Input.GetAxis(INPUT_MOUSE_X); 35 | float rot_y = -Input.GetAxis(INPUT_MOUSE_Y); 36 | 37 | Vector3 eulerRotation = transform.localRotation.eulerAngles; 38 | 39 | eulerRotation.x += rot_y * orbitSpeed; 40 | eulerRotation.y += rot_x * orbitSpeed; 41 | 42 | eulerRotation.z = 0f; 43 | 44 | transform.localRotation = Quaternion.Euler(eulerRotation); 45 | transform.position = transform.localRotation * (Vector3.forward * -distance); 46 | } 47 | 48 | if (Input.GetAxis(INPUT_MOUSE_SCROLLWHEEL) != 0f) 49 | { 50 | float delta = Input.GetAxis(INPUT_MOUSE_SCROLLWHEEL); 51 | 52 | distance -= delta * (distance / MAX_CAM_DISTANCE) * (zoomSpeed * 1000) * Time.deltaTime; 53 | distance = Mathf.Clamp(distance, MIN_CAM_DISTANCE, MAX_CAM_DISTANCE); 54 | transform.position = transform.localRotation * (Vector3.forward * -distance); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts/CameraControls.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11ce85d160a6b3047bca4f61c331061f 3 | timeCreated: 1428248954 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts/Demo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Parabox.CSG.Demo 4 | { 5 | /// 6 | /// Simple demo of CSG operations. 7 | /// 8 | public class Demo : MonoBehaviour 9 | { 10 | GameObject left, right, composite; 11 | bool wireframe = false; 12 | 13 | public Material wireframeMaterial = null; 14 | 15 | public GameObject[] fodder; // prefabs containing two mesh children 16 | int index = 0; // the index of example mesh prefabs 17 | 18 | enum BoolOp 19 | { 20 | Union, 21 | SubtractLR, 22 | SubtractRL, 23 | Intersect 24 | }; 25 | 26 | void Awake() 27 | { 28 | Reset(); 29 | 30 | wireframeMaterial.SetFloat("_Opacity", 0); 31 | cur_alpha = 0f; 32 | dest_alpha = 0f; 33 | 34 | ToggleWireframe(); 35 | } 36 | 37 | /// 38 | /// Reset the scene to it's original state. 39 | /// 40 | public void Reset() 41 | { 42 | if (composite) Destroy(composite); 43 | if (left) Destroy(left); 44 | if (right) Destroy(right); 45 | 46 | var go = Instantiate(fodder[index]); 47 | 48 | left = Instantiate(go.transform.GetChild(0).gameObject); 49 | right = Instantiate(go.transform.GetChild(1).gameObject); 50 | 51 | Destroy(go); 52 | 53 | wireframeMaterial = left.GetComponent().sharedMaterial; 54 | 55 | GenerateBarycentric(left); 56 | GenerateBarycentric(right); 57 | } 58 | 59 | public void Union() 60 | { 61 | Reset(); 62 | DoBooleanOperation(BoolOp.Union); 63 | } 64 | 65 | public void SubtractionLR() 66 | { 67 | Reset(); 68 | DoBooleanOperation(BoolOp.SubtractLR); 69 | } 70 | 71 | public void SubtractionRL() 72 | { 73 | Reset(); 74 | DoBooleanOperation(BoolOp.SubtractRL); 75 | } 76 | 77 | public void Intersection() 78 | { 79 | Reset(); 80 | DoBooleanOperation(BoolOp.Intersect); 81 | } 82 | 83 | void DoBooleanOperation(BoolOp operation) 84 | { 85 | Model result; 86 | 87 | // All boolean operations accept two gameobjects and return a new mesh. 88 | // Order matters - left, right vs. right, left will yield different 89 | // results in some cases. 90 | switch (operation) 91 | { 92 | case BoolOp.Union: 93 | result = CSG.Union(left, right); 94 | break; 95 | 96 | case BoolOp.SubtractLR: 97 | result = CSG.Subtract(left, right); 98 | break; 99 | 100 | case BoolOp.SubtractRL: 101 | result = CSG.Subtract(right, left); 102 | break; 103 | 104 | default: 105 | result = CSG.Intersect(right, left); 106 | break; 107 | } 108 | 109 | composite = new GameObject(); 110 | composite.AddComponent().sharedMesh = result.mesh; 111 | composite.AddComponent().sharedMaterials = result.materials.ToArray(); 112 | 113 | GenerateBarycentric(composite); 114 | 115 | Destroy(left); 116 | Destroy(right); 117 | } 118 | 119 | /// 120 | /// Turn the wireframe overlay on or off. 121 | /// 122 | public void ToggleWireframe() 123 | { 124 | wireframe = !wireframe; 125 | 126 | cur_alpha = wireframe ? 0f : 1f; 127 | dest_alpha = wireframe ? 1f : 0f; 128 | start_time = Time.time; 129 | } 130 | 131 | /// 132 | /// Swap the current example meshes 133 | /// 134 | public void ToggleExampleMeshes() 135 | { 136 | index++; 137 | if (index > fodder.Length - 1) index = 0; 138 | 139 | Reset(); 140 | } 141 | 142 | float wireframe_alpha = 0f, cur_alpha = 0f, dest_alpha = 1f, start_time = 0f; 143 | 144 | void Update() 145 | { 146 | wireframe_alpha = Mathf.Lerp(cur_alpha, dest_alpha, Time.time - start_time); 147 | wireframeMaterial.SetFloat("_Opacity", wireframe_alpha); 148 | } 149 | 150 | /** 151 | * Rebuild mesh with individual triangles, adding barycentric coordinates 152 | * in the colors channel. Not the most ideal wireframe implementation, 153 | * but it works and didn't take an inordinate amount of time :) 154 | */ 155 | void GenerateBarycentric(GameObject go) 156 | { 157 | Mesh m = go.GetComponent().sharedMesh; 158 | 159 | if (m == null) return; 160 | 161 | int[] tris = m.triangles; 162 | int triangleCount = tris.Length; 163 | 164 | Vector3[] mesh_vertices = m.vertices; 165 | Vector3[] mesh_normals = m.normals; 166 | Vector2[] mesh_uv = m.uv; 167 | 168 | Vector3[] vertices = new Vector3[triangleCount]; 169 | Vector3[] normals = new Vector3[triangleCount]; 170 | Vector2[] uv = new Vector2[triangleCount]; 171 | Color[] colors = new Color[triangleCount]; 172 | 173 | for (int i = 0; i < triangleCount; i++) 174 | { 175 | vertices[i] = mesh_vertices[tris[i]]; 176 | normals[i] = mesh_normals[tris[i]]; 177 | uv[i] = mesh_uv[tris[i]]; 178 | 179 | colors[i] = i % 3 == 0 ? new Color(1, 0, 0, 0) : (i % 3) == 1 ? new Color(0, 1, 0, 0) : new Color(0, 0, 1, 0); 180 | 181 | tris[i] = i; 182 | } 183 | 184 | Mesh wireframeMesh = new Mesh(); 185 | 186 | wireframeMesh.Clear(); 187 | wireframeMesh.vertices = vertices; 188 | wireframeMesh.triangles = tris; 189 | wireframeMesh.normals = normals; 190 | wireframeMesh.colors = colors; 191 | wireframeMesh.uv = uv; 192 | 193 | go.GetComponent().sharedMesh = wireframeMesh; 194 | } 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts/Demo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d107089815ad904ea32446163f3c8e8 3 | timeCreated: 1427153036 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts/Parabox.CSG.Demo.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Parabox.CSG.Demo", 3 | "rootNamespace": "", 4 | "references": [ 5 | "Unity.ProBuilder.Csg" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Samples/Demo Assets/Scripts/Parabox.CSG.Demo.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4bf6b254ae1d454e861a0762f0d7097 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da8095fe2c4772a4b85c7f77318a5b96 3 | folderAsset: yes 4 | timeCreated: 1428248700 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Shader/Wireframe.shader: -------------------------------------------------------------------------------- 1 | /** 2 | * Wireframe shader adapted from: 3 | * http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/ 4 | */ 5 | 6 | Shader "Custom/Wireframe" 7 | { 8 | Properties { 9 | _MainTex ("Texture", 2D) = "white" {} 10 | _Color ("Wire Color", Color) = (0,0,0,1) 11 | _Thickness ("Wire Thickness", Range(0, 1)) = .5 12 | _Opacity ("Wire Opacity", Range (0, 1)) = .8 13 | } 14 | 15 | SubShader 16 | { 17 | Tags { "RenderType" = "Opaque" } 18 | 19 | ColorMask RGB 20 | 21 | CGPROGRAM 22 | #pragma surface surf Lambert 23 | 24 | sampler2D _MainTex; 25 | fixed4 _Color; 26 | float _Thickness; 27 | float _Opacity; 28 | 29 | struct Input { 30 | float4 color : COLOR; 31 | float2 uv_MainTex; 32 | }; 33 | 34 | float edgeFactor(fixed3 pos) 35 | { 36 | fixed3 d = fwidth(pos); 37 | fixed3 a3 = smoothstep( fixed3(0.0,0.0,0.0), d * _Thickness, pos); 38 | return min(min(a3.x, a3.y), a3.z); 39 | } 40 | 41 | void surf (Input IN, inout SurfaceOutput o) { 42 | 43 | fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); 44 | fixed4 c = lerp( _Color, tex, edgeFactor(IN.color) ); 45 | c = lerp(tex, c, _Opacity); 46 | 47 | o.Albedo = c.rgb; 48 | } 49 | ENDCG 50 | } 51 | 52 | Fallback "Diffuse" 53 | } 54 | -------------------------------------------------------------------------------- /Samples/Demo Assets/Shader/Wireframe.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4928d9c2b4bef734cb5730d88a2580e6 3 | timeCreated: 1428249647 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples/Demo Scene.unity: -------------------------------------------------------------------------------- 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: 10304, guid: 0000000000000000f000000000000000, type: 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 &4 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: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 0 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 1024 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 1 74 | m_BakeBackend: 0 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 0 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 0 93 | --- !u!196 &5 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &37081739 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 37081740} 124 | - component: {fileID: 37081742} 125 | - component: {fileID: 37081741} 126 | m_Layer: 5 127 | m_Name: Text 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!224 &37081740 134 | RectTransform: 135 | m_ObjectHideFlags: 0 136 | m_CorrespondingSourceObject: {fileID: 0} 137 | m_PrefabInstance: {fileID: 0} 138 | m_PrefabAsset: {fileID: 0} 139 | m_GameObject: {fileID: 37081739} 140 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 141 | m_LocalPosition: {x: 0, y: 0, z: 0} 142 | m_LocalScale: {x: 1, y: 1, z: 1} 143 | m_Children: [] 144 | m_Father: {fileID: 1178041152} 145 | m_RootOrder: 0 146 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 147 | m_AnchorMin: {x: 0, y: 0} 148 | m_AnchorMax: {x: 1, y: 1} 149 | m_AnchoredPosition: {x: 0, y: 0} 150 | m_SizeDelta: {x: 0, y: 0} 151 | m_Pivot: {x: 0.5, y: 0.5} 152 | --- !u!114 &37081741 153 | MonoBehaviour: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 37081739} 159 | m_Enabled: 1 160 | m_EditorHideFlags: 0 161 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 162 | m_Name: 163 | m_EditorClassIdentifier: 164 | m_Material: {fileID: 0} 165 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 166 | m_RaycastTarget: 1 167 | m_OnCullStateChanged: 168 | m_PersistentCalls: 169 | m_Calls: [] 170 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 171 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 172 | m_FontData: 173 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 174 | m_FontSize: 14 175 | m_FontStyle: 0 176 | m_BestFit: 0 177 | m_MinSize: 10 178 | m_MaxSize: 40 179 | m_Alignment: 4 180 | m_AlignByGeometry: 0 181 | m_RichText: 1 182 | m_HorizontalOverflow: 0 183 | m_VerticalOverflow: 0 184 | m_LineSpacing: 1 185 | m_Text: 'Intersection 186 | 187 | ' 188 | --- !u!222 &37081742 189 | CanvasRenderer: 190 | m_ObjectHideFlags: 0 191 | m_CorrespondingSourceObject: {fileID: 0} 192 | m_PrefabInstance: {fileID: 0} 193 | m_PrefabAsset: {fileID: 0} 194 | m_GameObject: {fileID: 37081739} 195 | m_CullTransparentMesh: 0 196 | --- !u!1 &179206113 197 | GameObject: 198 | m_ObjectHideFlags: 0 199 | m_CorrespondingSourceObject: {fileID: 0} 200 | m_PrefabInstance: {fileID: 0} 201 | m_PrefabAsset: {fileID: 0} 202 | serializedVersion: 6 203 | m_Component: 204 | - component: {fileID: 179206115} 205 | - component: {fileID: 179206114} 206 | m_Layer: 0 207 | m_Name: Point light 2 208 | m_TagString: Untagged 209 | m_Icon: {fileID: 0} 210 | m_NavMeshLayer: 0 211 | m_StaticEditorFlags: 0 212 | m_IsActive: 1 213 | --- !u!108 &179206114 214 | Light: 215 | m_ObjectHideFlags: 0 216 | m_CorrespondingSourceObject: {fileID: 0} 217 | m_PrefabInstance: {fileID: 0} 218 | m_PrefabAsset: {fileID: 0} 219 | m_GameObject: {fileID: 179206113} 220 | m_Enabled: 1 221 | serializedVersion: 8 222 | m_Type: 2 223 | m_Color: {r: 1, g: 1, b: 1, a: 1} 224 | m_Intensity: 1 225 | m_Range: 10 226 | m_SpotAngle: 30 227 | m_CookieSize: 10 228 | m_Shadows: 229 | m_Type: 0 230 | m_Resolution: -1 231 | m_CustomResolution: -1 232 | m_Strength: 1 233 | m_Bias: 0.05 234 | m_NormalBias: 0.4 235 | m_NearPlane: 0.2 236 | m_Cookie: {fileID: 0} 237 | m_DrawHalo: 0 238 | m_Flare: {fileID: 0} 239 | m_RenderMode: 0 240 | m_CullingMask: 241 | serializedVersion: 2 242 | m_Bits: 4294967295 243 | m_Lightmapping: 4 244 | m_LightShadowCasterMode: 0 245 | m_AreaSize: {x: 1, y: 1} 246 | m_BounceIntensity: 1 247 | m_ColorTemperature: 6570 248 | m_UseColorTemperature: 0 249 | m_ShadowRadius: 0 250 | m_ShadowAngle: 0 251 | --- !u!4 &179206115 252 | Transform: 253 | m_ObjectHideFlags: 0 254 | m_CorrespondingSourceObject: {fileID: 0} 255 | m_PrefabInstance: {fileID: 0} 256 | m_PrefabAsset: {fileID: 0} 257 | m_GameObject: {fileID: 179206113} 258 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 259 | m_LocalPosition: {x: -0.09, y: 2.32, z: 4.35} 260 | m_LocalScale: {x: 1, y: 1, z: 1} 261 | m_Children: [] 262 | m_Father: {fileID: 0} 263 | m_RootOrder: 0 264 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 265 | --- !u!1 &236659482 266 | GameObject: 267 | m_ObjectHideFlags: 0 268 | m_CorrespondingSourceObject: {fileID: 0} 269 | m_PrefabInstance: {fileID: 0} 270 | m_PrefabAsset: {fileID: 0} 271 | serializedVersion: 6 272 | m_Component: 273 | - component: {fileID: 236659484} 274 | - component: {fileID: 236659483} 275 | m_Layer: 0 276 | m_Name: Point light 277 | m_TagString: Untagged 278 | m_Icon: {fileID: 0} 279 | m_NavMeshLayer: 0 280 | m_StaticEditorFlags: 0 281 | m_IsActive: 1 282 | --- !u!108 &236659483 283 | Light: 284 | m_ObjectHideFlags: 0 285 | m_CorrespondingSourceObject: {fileID: 0} 286 | m_PrefabInstance: {fileID: 0} 287 | m_PrefabAsset: {fileID: 0} 288 | m_GameObject: {fileID: 236659482} 289 | m_Enabled: 1 290 | serializedVersion: 8 291 | m_Type: 2 292 | m_Color: {r: 1, g: 1, b: 1, a: 1} 293 | m_Intensity: 1 294 | m_Range: 10 295 | m_SpotAngle: 30 296 | m_CookieSize: 10 297 | m_Shadows: 298 | m_Type: 2 299 | m_Resolution: -1 300 | m_CustomResolution: -1 301 | m_Strength: 1 302 | m_Bias: 0.05 303 | m_NormalBias: 0.4 304 | m_NearPlane: 0.2 305 | m_Cookie: {fileID: 0} 306 | m_DrawHalo: 0 307 | m_Flare: {fileID: 0} 308 | m_RenderMode: 0 309 | m_CullingMask: 310 | serializedVersion: 2 311 | m_Bits: 4294967295 312 | m_Lightmapping: 4 313 | m_LightShadowCasterMode: 0 314 | m_AreaSize: {x: 1, y: 1} 315 | m_BounceIntensity: 1 316 | m_ColorTemperature: 6570 317 | m_UseColorTemperature: 0 318 | m_ShadowRadius: 0 319 | m_ShadowAngle: 0 320 | --- !u!4 &236659484 321 | Transform: 322 | m_ObjectHideFlags: 0 323 | m_CorrespondingSourceObject: {fileID: 0} 324 | m_PrefabInstance: {fileID: 0} 325 | m_PrefabAsset: {fileID: 0} 326 | m_GameObject: {fileID: 236659482} 327 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 328 | m_LocalPosition: {x: 1.91, y: 2.57, z: -1.65} 329 | m_LocalScale: {x: 1, y: 1, z: 1} 330 | m_Children: [] 331 | m_Father: {fileID: 0} 332 | m_RootOrder: 6 333 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 334 | --- !u!1 &536639313 335 | GameObject: 336 | m_ObjectHideFlags: 0 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInstance: {fileID: 0} 339 | m_PrefabAsset: {fileID: 0} 340 | serializedVersion: 6 341 | m_Component: 342 | - component: {fileID: 536639314} 343 | - component: {fileID: 536639317} 344 | - component: {fileID: 536639316} 345 | - component: {fileID: 536639315} 346 | m_Layer: 5 347 | m_Name: Reset Button 348 | m_TagString: Untagged 349 | m_Icon: {fileID: 0} 350 | m_NavMeshLayer: 0 351 | m_StaticEditorFlags: 0 352 | m_IsActive: 1 353 | --- !u!224 &536639314 354 | RectTransform: 355 | m_ObjectHideFlags: 0 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInstance: {fileID: 0} 358 | m_PrefabAsset: {fileID: 0} 359 | m_GameObject: {fileID: 536639313} 360 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 361 | m_LocalPosition: {x: 0, y: 0, z: 0} 362 | m_LocalScale: {x: 1, y: 1, z: 1} 363 | m_Children: 364 | - {fileID: 2055423584} 365 | m_Father: {fileID: 1389035451} 366 | m_RootOrder: 0 367 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 368 | m_AnchorMin: {x: 0, y: 1} 369 | m_AnchorMax: {x: 0, y: 1} 370 | m_AnchoredPosition: {x: 99, y: -34} 371 | m_SizeDelta: {x: 120, y: 30} 372 | m_Pivot: {x: 0.5, y: 0.5} 373 | --- !u!114 &536639315 374 | MonoBehaviour: 375 | m_ObjectHideFlags: 0 376 | m_CorrespondingSourceObject: {fileID: 0} 377 | m_PrefabInstance: {fileID: 0} 378 | m_PrefabAsset: {fileID: 0} 379 | m_GameObject: {fileID: 536639313} 380 | m_Enabled: 1 381 | m_EditorHideFlags: 0 382 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 383 | m_Name: 384 | m_EditorClassIdentifier: 385 | m_Navigation: 386 | m_Mode: 3 387 | m_SelectOnUp: {fileID: 0} 388 | m_SelectOnDown: {fileID: 0} 389 | m_SelectOnLeft: {fileID: 0} 390 | m_SelectOnRight: {fileID: 0} 391 | m_Transition: 1 392 | m_Colors: 393 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 394 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 395 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 396 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 397 | m_ColorMultiplier: 1 398 | m_FadeDuration: 0.1 399 | m_SpriteState: 400 | m_HighlightedSprite: {fileID: 0} 401 | m_PressedSprite: {fileID: 0} 402 | m_DisabledSprite: {fileID: 0} 403 | m_AnimationTriggers: 404 | m_NormalTrigger: Normal 405 | m_HighlightedTrigger: Highlighted 406 | m_PressedTrigger: Pressed 407 | m_DisabledTrigger: Disabled 408 | m_Interactable: 1 409 | m_TargetGraphic: {fileID: 536639316} 410 | m_OnClick: 411 | m_PersistentCalls: 412 | m_Calls: 413 | - m_Target: {fileID: 1289435174} 414 | m_MethodName: Reset 415 | m_Mode: 1 416 | m_Arguments: 417 | m_ObjectArgument: {fileID: 0} 418 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 419 | m_IntArgument: 0 420 | m_FloatArgument: 0 421 | m_StringArgument: 422 | m_BoolArgument: 0 423 | m_CallState: 2 424 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 425 | Culture=neutral, PublicKeyToken=null 426 | --- !u!114 &536639316 427 | MonoBehaviour: 428 | m_ObjectHideFlags: 0 429 | m_CorrespondingSourceObject: {fileID: 0} 430 | m_PrefabInstance: {fileID: 0} 431 | m_PrefabAsset: {fileID: 0} 432 | m_GameObject: {fileID: 536639313} 433 | m_Enabled: 1 434 | m_EditorHideFlags: 0 435 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 436 | m_Name: 437 | m_EditorClassIdentifier: 438 | m_Material: {fileID: 0} 439 | m_Color: {r: 1, g: 1, b: 1, a: 1} 440 | m_RaycastTarget: 1 441 | m_OnCullStateChanged: 442 | m_PersistentCalls: 443 | m_Calls: [] 444 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 445 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 446 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 447 | m_Type: 1 448 | m_PreserveAspect: 0 449 | m_FillCenter: 1 450 | m_FillMethod: 4 451 | m_FillAmount: 1 452 | m_FillClockwise: 1 453 | m_FillOrigin: 0 454 | m_UseSpriteMesh: 0 455 | --- !u!222 &536639317 456 | CanvasRenderer: 457 | m_ObjectHideFlags: 0 458 | m_CorrespondingSourceObject: {fileID: 0} 459 | m_PrefabInstance: {fileID: 0} 460 | m_PrefabAsset: {fileID: 0} 461 | m_GameObject: {fileID: 536639313} 462 | m_CullTransparentMesh: 0 463 | --- !u!1 &651349505 464 | GameObject: 465 | m_ObjectHideFlags: 0 466 | m_CorrespondingSourceObject: {fileID: 0} 467 | m_PrefabInstance: {fileID: 0} 468 | m_PrefabAsset: {fileID: 0} 469 | serializedVersion: 6 470 | m_Component: 471 | - component: {fileID: 651349506} 472 | - component: {fileID: 651349508} 473 | - component: {fileID: 651349507} 474 | m_Layer: 5 475 | m_Name: Text 476 | m_TagString: Untagged 477 | m_Icon: {fileID: 0} 478 | m_NavMeshLayer: 0 479 | m_StaticEditorFlags: 0 480 | m_IsActive: 1 481 | --- !u!224 &651349506 482 | RectTransform: 483 | m_ObjectHideFlags: 0 484 | m_CorrespondingSourceObject: {fileID: 0} 485 | m_PrefabInstance: {fileID: 0} 486 | m_PrefabAsset: {fileID: 0} 487 | m_GameObject: {fileID: 651349505} 488 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 489 | m_LocalPosition: {x: 0, y: 0, z: 0} 490 | m_LocalScale: {x: 1, y: 1, z: 1} 491 | m_Children: [] 492 | m_Father: {fileID: 1267959002} 493 | m_RootOrder: 2 494 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 495 | m_AnchorMin: {x: 0.5, y: 0.5} 496 | m_AnchorMax: {x: 0.5, y: 0.5} 497 | m_AnchoredPosition: {x: 0, y: 21.3} 498 | m_SizeDelta: {x: 158.5, y: 26.5} 499 | m_Pivot: {x: 0.5, y: 0.5} 500 | --- !u!114 &651349507 501 | MonoBehaviour: 502 | m_ObjectHideFlags: 0 503 | m_CorrespondingSourceObject: {fileID: 0} 504 | m_PrefabInstance: {fileID: 0} 505 | m_PrefabAsset: {fileID: 0} 506 | m_GameObject: {fileID: 651349505} 507 | m_Enabled: 1 508 | m_EditorHideFlags: 0 509 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 510 | m_Name: 511 | m_EditorClassIdentifier: 512 | m_Material: {fileID: 0} 513 | m_Color: {r: 1, g: 1, b: 1, a: 1} 514 | m_RaycastTarget: 1 515 | m_OnCullStateChanged: 516 | m_PersistentCalls: 517 | m_Calls: [] 518 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 519 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 520 | m_FontData: 521 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 522 | m_FontSize: 14 523 | m_FontStyle: 0 524 | m_BestFit: 0 525 | m_MinSize: 10 526 | m_MaxSize: 40 527 | m_Alignment: 1 528 | m_AlignByGeometry: 0 529 | m_RichText: 1 530 | m_HorizontalOverflow: 0 531 | m_VerticalOverflow: 0 532 | m_LineSpacing: 1 533 | m_Text: Subtraction 534 | --- !u!222 &651349508 535 | CanvasRenderer: 536 | m_ObjectHideFlags: 0 537 | m_CorrespondingSourceObject: {fileID: 0} 538 | m_PrefabInstance: {fileID: 0} 539 | m_PrefabAsset: {fileID: 0} 540 | m_GameObject: {fileID: 651349505} 541 | m_CullTransparentMesh: 0 542 | --- !u!1 &692305656 543 | GameObject: 544 | m_ObjectHideFlags: 0 545 | m_CorrespondingSourceObject: {fileID: 0} 546 | m_PrefabInstance: {fileID: 0} 547 | m_PrefabAsset: {fileID: 0} 548 | serializedVersion: 6 549 | m_Component: 550 | - component: {fileID: 692305657} 551 | - component: {fileID: 692305659} 552 | - component: {fileID: 692305658} 553 | m_Layer: 5 554 | m_Name: Text 555 | m_TagString: Untagged 556 | m_Icon: {fileID: 0} 557 | m_NavMeshLayer: 0 558 | m_StaticEditorFlags: 0 559 | m_IsActive: 1 560 | --- !u!224 &692305657 561 | RectTransform: 562 | m_ObjectHideFlags: 0 563 | m_CorrespondingSourceObject: {fileID: 0} 564 | m_PrefabInstance: {fileID: 0} 565 | m_PrefabAsset: {fileID: 0} 566 | m_GameObject: {fileID: 692305656} 567 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 568 | m_LocalPosition: {x: 0, y: 0, z: 0} 569 | m_LocalScale: {x: 1, y: 1, z: 1} 570 | m_Children: [] 571 | m_Father: {fileID: 1477244627} 572 | m_RootOrder: 0 573 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 574 | m_AnchorMin: {x: 0, y: 0} 575 | m_AnchorMax: {x: 1, y: 1} 576 | m_AnchoredPosition: {x: 0, y: 0} 577 | m_SizeDelta: {x: 0, y: 0} 578 | m_Pivot: {x: 0.5, y: 0.5} 579 | --- !u!114 &692305658 580 | MonoBehaviour: 581 | m_ObjectHideFlags: 0 582 | m_CorrespondingSourceObject: {fileID: 0} 583 | m_PrefabInstance: {fileID: 0} 584 | m_PrefabAsset: {fileID: 0} 585 | m_GameObject: {fileID: 692305656} 586 | m_Enabled: 1 587 | m_EditorHideFlags: 0 588 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 589 | m_Name: 590 | m_EditorClassIdentifier: 591 | m_Material: {fileID: 0} 592 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 593 | m_RaycastTarget: 1 594 | m_OnCullStateChanged: 595 | m_PersistentCalls: 596 | m_Calls: [] 597 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 598 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 599 | m_FontData: 600 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 601 | m_FontSize: 14 602 | m_FontStyle: 0 603 | m_BestFit: 0 604 | m_MinSize: 10 605 | m_MaxSize: 40 606 | m_Alignment: 4 607 | m_AlignByGeometry: 0 608 | m_RichText: 1 609 | m_HorizontalOverflow: 0 610 | m_VerticalOverflow: 0 611 | m_LineSpacing: 1 612 | m_Text: Next Mesh Set 613 | --- !u!222 &692305659 614 | CanvasRenderer: 615 | m_ObjectHideFlags: 0 616 | m_CorrespondingSourceObject: {fileID: 0} 617 | m_PrefabInstance: {fileID: 0} 618 | m_PrefabAsset: {fileID: 0} 619 | m_GameObject: {fileID: 692305656} 620 | m_CullTransparentMesh: 0 621 | --- !u!1 &692373763 622 | GameObject: 623 | m_ObjectHideFlags: 0 624 | m_CorrespondingSourceObject: {fileID: 0} 625 | m_PrefabInstance: {fileID: 0} 626 | m_PrefabAsset: {fileID: 0} 627 | serializedVersion: 6 628 | m_Component: 629 | - component: {fileID: 692373764} 630 | - component: {fileID: 692373765} 631 | m_Layer: 5 632 | m_Name: Wireframe 633 | m_TagString: Untagged 634 | m_Icon: {fileID: 0} 635 | m_NavMeshLayer: 0 636 | m_StaticEditorFlags: 0 637 | m_IsActive: 1 638 | --- !u!224 &692373764 639 | RectTransform: 640 | m_ObjectHideFlags: 0 641 | m_CorrespondingSourceObject: {fileID: 0} 642 | m_PrefabInstance: {fileID: 0} 643 | m_PrefabAsset: {fileID: 0} 644 | m_GameObject: {fileID: 692373763} 645 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 646 | m_LocalPosition: {x: 0, y: 0, z: 0} 647 | m_LocalScale: {x: 1, y: 1, z: 1} 648 | m_Children: 649 | - {fileID: 1699770121} 650 | - {fileID: 1487020549} 651 | m_Father: {fileID: 1389035451} 652 | m_RootOrder: 3 653 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 654 | m_AnchorMin: {x: 1, y: 1} 655 | m_AnchorMax: {x: 1, y: 1} 656 | m_AnchoredPosition: {x: -43.8, y: -29} 657 | m_SizeDelta: {x: 160, y: 20} 658 | m_Pivot: {x: 0.5, y: 0.5} 659 | --- !u!114 &692373765 660 | MonoBehaviour: 661 | m_ObjectHideFlags: 0 662 | m_CorrespondingSourceObject: {fileID: 0} 663 | m_PrefabInstance: {fileID: 0} 664 | m_PrefabAsset: {fileID: 0} 665 | m_GameObject: {fileID: 692373763} 666 | m_Enabled: 1 667 | m_EditorHideFlags: 0 668 | m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 669 | m_Name: 670 | m_EditorClassIdentifier: 671 | m_Navigation: 672 | m_Mode: 3 673 | m_SelectOnUp: {fileID: 0} 674 | m_SelectOnDown: {fileID: 0} 675 | m_SelectOnLeft: {fileID: 0} 676 | m_SelectOnRight: {fileID: 0} 677 | m_Transition: 1 678 | m_Colors: 679 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 680 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 681 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 682 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 683 | m_ColorMultiplier: 1 684 | m_FadeDuration: 0.1 685 | m_SpriteState: 686 | m_HighlightedSprite: {fileID: 0} 687 | m_PressedSprite: {fileID: 0} 688 | m_DisabledSprite: {fileID: 0} 689 | m_AnimationTriggers: 690 | m_NormalTrigger: Normal 691 | m_HighlightedTrigger: Highlighted 692 | m_PressedTrigger: Pressed 693 | m_DisabledTrigger: Disabled 694 | m_Interactable: 1 695 | m_TargetGraphic: {fileID: 1699770122} 696 | toggleTransition: 1 697 | graphic: {fileID: 1079397857} 698 | m_Group: {fileID: 0} 699 | onValueChanged: 700 | m_PersistentCalls: 701 | m_Calls: 702 | - m_Target: {fileID: 1289435174} 703 | m_MethodName: ToggleWireframe 704 | m_Mode: 1 705 | m_Arguments: 706 | m_ObjectArgument: {fileID: 0} 707 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 708 | m_IntArgument: 0 709 | m_FloatArgument: 0 710 | m_StringArgument: 711 | m_BoolArgument: 1 712 | m_CallState: 2 713 | m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, 714 | Culture=neutral, PublicKeyToken=null 715 | m_IsOn: 1 716 | --- !u!1 &731997020 717 | GameObject: 718 | m_ObjectHideFlags: 0 719 | m_CorrespondingSourceObject: {fileID: 0} 720 | m_PrefabInstance: {fileID: 0} 721 | m_PrefabAsset: {fileID: 0} 722 | serializedVersion: 6 723 | m_Component: 724 | - component: {fileID: 731997021} 725 | - component: {fileID: 731997024} 726 | - component: {fileID: 731997023} 727 | - component: {fileID: 731997022} 728 | m_Layer: 5 729 | m_Name: Subtract Left Right 730 | m_TagString: Untagged 731 | m_Icon: {fileID: 0} 732 | m_NavMeshLayer: 0 733 | m_StaticEditorFlags: 0 734 | m_IsActive: 1 735 | --- !u!224 &731997021 736 | RectTransform: 737 | m_ObjectHideFlags: 0 738 | m_CorrespondingSourceObject: {fileID: 0} 739 | m_PrefabInstance: {fileID: 0} 740 | m_PrefabAsset: {fileID: 0} 741 | m_GameObject: {fileID: 731997020} 742 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 743 | m_LocalPosition: {x: 0, y: 0, z: 0} 744 | m_LocalScale: {x: 1, y: 1, z: 1} 745 | m_Children: 746 | - {fileID: 1032981747} 747 | m_Father: {fileID: 1267959002} 748 | m_RootOrder: 0 749 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 750 | m_AnchorMin: {x: 0, y: 1} 751 | m_AnchorMax: {x: 0, y: 1} 752 | m_AnchoredPosition: {x: 59.5, y: -37.8} 753 | m_SizeDelta: {x: 112.3, y: 24.4} 754 | m_Pivot: {x: 0.5, y: 0.5} 755 | --- !u!114 &731997022 756 | MonoBehaviour: 757 | m_ObjectHideFlags: 0 758 | m_CorrespondingSourceObject: {fileID: 0} 759 | m_PrefabInstance: {fileID: 0} 760 | m_PrefabAsset: {fileID: 0} 761 | m_GameObject: {fileID: 731997020} 762 | m_Enabled: 1 763 | m_EditorHideFlags: 0 764 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 765 | m_Name: 766 | m_EditorClassIdentifier: 767 | m_Navigation: 768 | m_Mode: 3 769 | m_SelectOnUp: {fileID: 0} 770 | m_SelectOnDown: {fileID: 0} 771 | m_SelectOnLeft: {fileID: 0} 772 | m_SelectOnRight: {fileID: 0} 773 | m_Transition: 1 774 | m_Colors: 775 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 776 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 777 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 778 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 779 | m_ColorMultiplier: 1 780 | m_FadeDuration: 0.1 781 | m_SpriteState: 782 | m_HighlightedSprite: {fileID: 0} 783 | m_PressedSprite: {fileID: 0} 784 | m_DisabledSprite: {fileID: 0} 785 | m_AnimationTriggers: 786 | m_NormalTrigger: Normal 787 | m_HighlightedTrigger: Highlighted 788 | m_PressedTrigger: Pressed 789 | m_DisabledTrigger: Disabled 790 | m_Interactable: 1 791 | m_TargetGraphic: {fileID: 731997023} 792 | m_OnClick: 793 | m_PersistentCalls: 794 | m_Calls: 795 | - m_Target: {fileID: 1289435174} 796 | m_MethodName: SubtractionLR 797 | m_Mode: 1 798 | m_Arguments: 799 | m_ObjectArgument: {fileID: 0} 800 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 801 | m_IntArgument: 0 802 | m_FloatArgument: 0 803 | m_StringArgument: 804 | m_BoolArgument: 0 805 | m_CallState: 2 806 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 807 | Culture=neutral, PublicKeyToken=null 808 | --- !u!114 &731997023 809 | MonoBehaviour: 810 | m_ObjectHideFlags: 0 811 | m_CorrespondingSourceObject: {fileID: 0} 812 | m_PrefabInstance: {fileID: 0} 813 | m_PrefabAsset: {fileID: 0} 814 | m_GameObject: {fileID: 731997020} 815 | m_Enabled: 1 816 | m_EditorHideFlags: 0 817 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 818 | m_Name: 819 | m_EditorClassIdentifier: 820 | m_Material: {fileID: 0} 821 | m_Color: {r: 1, g: 1, b: 1, a: 1} 822 | m_RaycastTarget: 1 823 | m_OnCullStateChanged: 824 | m_PersistentCalls: 825 | m_Calls: [] 826 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 827 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 828 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 829 | m_Type: 1 830 | m_PreserveAspect: 0 831 | m_FillCenter: 1 832 | m_FillMethod: 4 833 | m_FillAmount: 1 834 | m_FillClockwise: 1 835 | m_FillOrigin: 0 836 | m_UseSpriteMesh: 0 837 | --- !u!222 &731997024 838 | CanvasRenderer: 839 | m_ObjectHideFlags: 0 840 | m_CorrespondingSourceObject: {fileID: 0} 841 | m_PrefabInstance: {fileID: 0} 842 | m_PrefabAsset: {fileID: 0} 843 | m_GameObject: {fileID: 731997020} 844 | m_CullTransparentMesh: 0 845 | --- !u!1 &794253297 846 | GameObject: 847 | m_ObjectHideFlags: 0 848 | m_CorrespondingSourceObject: {fileID: 0} 849 | m_PrefabInstance: {fileID: 0} 850 | m_PrefabAsset: {fileID: 0} 851 | serializedVersion: 6 852 | m_Component: 853 | - component: {fileID: 794253300} 854 | - component: {fileID: 794253299} 855 | - component: {fileID: 794253298} 856 | m_Layer: 5 857 | m_Name: Text 858 | m_TagString: Untagged 859 | m_Icon: {fileID: 0} 860 | m_NavMeshLayer: 0 861 | m_StaticEditorFlags: 0 862 | m_IsActive: 1 863 | --- !u!114 &794253298 864 | MonoBehaviour: 865 | m_ObjectHideFlags: 0 866 | m_CorrespondingSourceObject: {fileID: 0} 867 | m_PrefabInstance: {fileID: 0} 868 | m_PrefabAsset: {fileID: 0} 869 | m_GameObject: {fileID: 794253297} 870 | m_Enabled: 1 871 | m_EditorHideFlags: 0 872 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 873 | m_Name: 874 | m_EditorClassIdentifier: 875 | m_Material: {fileID: 0} 876 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 877 | m_RaycastTarget: 1 878 | m_OnCullStateChanged: 879 | m_PersistentCalls: 880 | m_Calls: [] 881 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 882 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 883 | m_FontData: 884 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 885 | m_FontSize: 14 886 | m_FontStyle: 0 887 | m_BestFit: 0 888 | m_MinSize: 10 889 | m_MaxSize: 40 890 | m_Alignment: 4 891 | m_AlignByGeometry: 0 892 | m_RichText: 1 893 | m_HorizontalOverflow: 0 894 | m_VerticalOverflow: 0 895 | m_LineSpacing: 1 896 | m_Text: Right > Left 897 | --- !u!222 &794253299 898 | CanvasRenderer: 899 | m_ObjectHideFlags: 0 900 | m_CorrespondingSourceObject: {fileID: 0} 901 | m_PrefabInstance: {fileID: 0} 902 | m_PrefabAsset: {fileID: 0} 903 | m_GameObject: {fileID: 794253297} 904 | m_CullTransparentMesh: 0 905 | --- !u!224 &794253300 906 | RectTransform: 907 | m_ObjectHideFlags: 0 908 | m_CorrespondingSourceObject: {fileID: 0} 909 | m_PrefabInstance: {fileID: 0} 910 | m_PrefabAsset: {fileID: 0} 911 | m_GameObject: {fileID: 794253297} 912 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 913 | m_LocalPosition: {x: 0, y: 0, z: 0} 914 | m_LocalScale: {x: 1, y: 1, z: 1} 915 | m_Children: [] 916 | m_Father: {fileID: 1925789619} 917 | m_RootOrder: 0 918 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 919 | m_AnchorMin: {x: 0, y: 0} 920 | m_AnchorMax: {x: 1, y: 1} 921 | m_AnchoredPosition: {x: 0, y: 0} 922 | m_SizeDelta: {x: 0, y: 0} 923 | m_Pivot: {x: 0.5, y: 0.5} 924 | --- !u!1 &1032981746 925 | GameObject: 926 | m_ObjectHideFlags: 0 927 | m_CorrespondingSourceObject: {fileID: 0} 928 | m_PrefabInstance: {fileID: 0} 929 | m_PrefabAsset: {fileID: 0} 930 | serializedVersion: 6 931 | m_Component: 932 | - component: {fileID: 1032981747} 933 | - component: {fileID: 1032981749} 934 | - component: {fileID: 1032981748} 935 | m_Layer: 5 936 | m_Name: Text 937 | m_TagString: Untagged 938 | m_Icon: {fileID: 0} 939 | m_NavMeshLayer: 0 940 | m_StaticEditorFlags: 0 941 | m_IsActive: 1 942 | --- !u!224 &1032981747 943 | RectTransform: 944 | m_ObjectHideFlags: 0 945 | m_CorrespondingSourceObject: {fileID: 0} 946 | m_PrefabInstance: {fileID: 0} 947 | m_PrefabAsset: {fileID: 0} 948 | m_GameObject: {fileID: 1032981746} 949 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 950 | m_LocalPosition: {x: 0, y: 0, z: 0} 951 | m_LocalScale: {x: 1, y: 1, z: 1} 952 | m_Children: [] 953 | m_Father: {fileID: 731997021} 954 | m_RootOrder: 0 955 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 956 | m_AnchorMin: {x: 0, y: 0} 957 | m_AnchorMax: {x: 1, y: 1} 958 | m_AnchoredPosition: {x: 0, y: 0} 959 | m_SizeDelta: {x: 0, y: 0} 960 | m_Pivot: {x: 0.5, y: 0.5} 961 | --- !u!114 &1032981748 962 | MonoBehaviour: 963 | m_ObjectHideFlags: 0 964 | m_CorrespondingSourceObject: {fileID: 0} 965 | m_PrefabInstance: {fileID: 0} 966 | m_PrefabAsset: {fileID: 0} 967 | m_GameObject: {fileID: 1032981746} 968 | m_Enabled: 1 969 | m_EditorHideFlags: 0 970 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 971 | m_Name: 972 | m_EditorClassIdentifier: 973 | m_Material: {fileID: 0} 974 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 975 | m_RaycastTarget: 1 976 | m_OnCullStateChanged: 977 | m_PersistentCalls: 978 | m_Calls: [] 979 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 980 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 981 | m_FontData: 982 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 983 | m_FontSize: 14 984 | m_FontStyle: 0 985 | m_BestFit: 0 986 | m_MinSize: 10 987 | m_MaxSize: 40 988 | m_Alignment: 4 989 | m_AlignByGeometry: 0 990 | m_RichText: 1 991 | m_HorizontalOverflow: 0 992 | m_VerticalOverflow: 0 993 | m_LineSpacing: 1 994 | m_Text: Left > Right 995 | --- !u!222 &1032981749 996 | CanvasRenderer: 997 | m_ObjectHideFlags: 0 998 | m_CorrespondingSourceObject: {fileID: 0} 999 | m_PrefabInstance: {fileID: 0} 1000 | m_PrefabAsset: {fileID: 0} 1001 | m_GameObject: {fileID: 1032981746} 1002 | m_CullTransparentMesh: 0 1003 | --- !u!1 &1079397855 1004 | GameObject: 1005 | m_ObjectHideFlags: 0 1006 | m_CorrespondingSourceObject: {fileID: 0} 1007 | m_PrefabInstance: {fileID: 0} 1008 | m_PrefabAsset: {fileID: 0} 1009 | serializedVersion: 6 1010 | m_Component: 1011 | - component: {fileID: 1079397856} 1012 | - component: {fileID: 1079397858} 1013 | - component: {fileID: 1079397857} 1014 | m_Layer: 5 1015 | m_Name: Checkmark 1016 | m_TagString: Untagged 1017 | m_Icon: {fileID: 0} 1018 | m_NavMeshLayer: 0 1019 | m_StaticEditorFlags: 0 1020 | m_IsActive: 1 1021 | --- !u!224 &1079397856 1022 | RectTransform: 1023 | m_ObjectHideFlags: 0 1024 | m_CorrespondingSourceObject: {fileID: 0} 1025 | m_PrefabInstance: {fileID: 0} 1026 | m_PrefabAsset: {fileID: 0} 1027 | m_GameObject: {fileID: 1079397855} 1028 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1029 | m_LocalPosition: {x: 0, y: 0, z: 0} 1030 | m_LocalScale: {x: 1, y: 1, z: 1} 1031 | m_Children: [] 1032 | m_Father: {fileID: 1699770121} 1033 | m_RootOrder: 0 1034 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1035 | m_AnchorMin: {x: 0.5, y: 0.5} 1036 | m_AnchorMax: {x: 0.5, y: 0.5} 1037 | m_AnchoredPosition: {x: 0, y: 0} 1038 | m_SizeDelta: {x: 20, y: 20} 1039 | m_Pivot: {x: 0.5, y: 0.5} 1040 | --- !u!114 &1079397857 1041 | MonoBehaviour: 1042 | m_ObjectHideFlags: 0 1043 | m_CorrespondingSourceObject: {fileID: 0} 1044 | m_PrefabInstance: {fileID: 0} 1045 | m_PrefabAsset: {fileID: 0} 1046 | m_GameObject: {fileID: 1079397855} 1047 | m_Enabled: 1 1048 | m_EditorHideFlags: 0 1049 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1050 | m_Name: 1051 | m_EditorClassIdentifier: 1052 | m_Material: {fileID: 0} 1053 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1054 | m_RaycastTarget: 1 1055 | m_OnCullStateChanged: 1056 | m_PersistentCalls: 1057 | m_Calls: [] 1058 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1059 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1060 | m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} 1061 | m_Type: 0 1062 | m_PreserveAspect: 0 1063 | m_FillCenter: 1 1064 | m_FillMethod: 4 1065 | m_FillAmount: 1 1066 | m_FillClockwise: 1 1067 | m_FillOrigin: 0 1068 | m_UseSpriteMesh: 0 1069 | --- !u!222 &1079397858 1070 | CanvasRenderer: 1071 | m_ObjectHideFlags: 0 1072 | m_CorrespondingSourceObject: {fileID: 0} 1073 | m_PrefabInstance: {fileID: 0} 1074 | m_PrefabAsset: {fileID: 0} 1075 | m_GameObject: {fileID: 1079397855} 1076 | m_CullTransparentMesh: 0 1077 | --- !u!1 &1173366340 1078 | GameObject: 1079 | m_ObjectHideFlags: 0 1080 | m_CorrespondingSourceObject: {fileID: 0} 1081 | m_PrefabInstance: {fileID: 0} 1082 | m_PrefabAsset: {fileID: 0} 1083 | serializedVersion: 6 1084 | m_Component: 1085 | - component: {fileID: 1173366344} 1086 | - component: {fileID: 1173366343} 1087 | - component: {fileID: 1173366342} 1088 | - component: {fileID: 1173366341} 1089 | m_Layer: 0 1090 | m_Name: Plane 1091 | m_TagString: Untagged 1092 | m_Icon: {fileID: 0} 1093 | m_NavMeshLayer: 0 1094 | m_StaticEditorFlags: 0 1095 | m_IsActive: 1 1096 | --- !u!23 &1173366341 1097 | MeshRenderer: 1098 | m_ObjectHideFlags: 0 1099 | m_CorrespondingSourceObject: {fileID: 0} 1100 | m_PrefabInstance: {fileID: 0} 1101 | m_PrefabAsset: {fileID: 0} 1102 | m_GameObject: {fileID: 1173366340} 1103 | m_Enabled: 1 1104 | m_CastShadows: 1 1105 | m_ReceiveShadows: 1 1106 | m_DynamicOccludee: 1 1107 | m_MotionVectors: 1 1108 | m_LightProbeUsage: 1 1109 | m_ReflectionProbeUsage: 1 1110 | m_RenderingLayerMask: 1 1111 | m_RendererPriority: 0 1112 | m_Materials: 1113 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 1114 | m_StaticBatchInfo: 1115 | firstSubMesh: 0 1116 | subMeshCount: 0 1117 | m_StaticBatchRoot: {fileID: 0} 1118 | m_ProbeAnchor: {fileID: 0} 1119 | m_LightProbeVolumeOverride: {fileID: 0} 1120 | m_ScaleInLightmap: 1 1121 | m_PreserveUVs: 1 1122 | m_IgnoreNormalsForChartDetection: 0 1123 | m_ImportantGI: 0 1124 | m_StitchLightmapSeams: 0 1125 | m_SelectedEditorRenderState: 3 1126 | m_MinimumChartSize: 4 1127 | m_AutoUVMaxDistance: 0.5 1128 | m_AutoUVMaxAngle: 89 1129 | m_LightmapParameters: {fileID: 0} 1130 | m_SortingLayerID: 0 1131 | m_SortingLayer: 0 1132 | m_SortingOrder: 0 1133 | --- !u!64 &1173366342 1134 | MeshCollider: 1135 | m_ObjectHideFlags: 0 1136 | m_CorrespondingSourceObject: {fileID: 0} 1137 | m_PrefabInstance: {fileID: 0} 1138 | m_PrefabAsset: {fileID: 0} 1139 | m_GameObject: {fileID: 1173366340} 1140 | m_Material: {fileID: 0} 1141 | m_IsTrigger: 0 1142 | m_Enabled: 1 1143 | serializedVersion: 3 1144 | m_Convex: 0 1145 | m_CookingOptions: 14 1146 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 1147 | --- !u!33 &1173366343 1148 | MeshFilter: 1149 | m_ObjectHideFlags: 0 1150 | m_CorrespondingSourceObject: {fileID: 0} 1151 | m_PrefabInstance: {fileID: 0} 1152 | m_PrefabAsset: {fileID: 0} 1153 | m_GameObject: {fileID: 1173366340} 1154 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 1155 | --- !u!4 &1173366344 1156 | Transform: 1157 | m_ObjectHideFlags: 0 1158 | m_CorrespondingSourceObject: {fileID: 0} 1159 | m_PrefabInstance: {fileID: 0} 1160 | m_PrefabAsset: {fileID: 0} 1161 | m_GameObject: {fileID: 1173366340} 1162 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1163 | m_LocalPosition: {x: 0, y: -1.75, z: 0} 1164 | m_LocalScale: {x: 1, y: 1, z: 1} 1165 | m_Children: [] 1166 | m_Father: {fileID: 0} 1167 | m_RootOrder: 7 1168 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1169 | --- !u!1 &1178041148 1170 | GameObject: 1171 | m_ObjectHideFlags: 0 1172 | m_CorrespondingSourceObject: {fileID: 0} 1173 | m_PrefabInstance: {fileID: 0} 1174 | m_PrefabAsset: {fileID: 0} 1175 | serializedVersion: 6 1176 | m_Component: 1177 | - component: {fileID: 1178041152} 1178 | - component: {fileID: 1178041151} 1179 | - component: {fileID: 1178041150} 1180 | - component: {fileID: 1178041149} 1181 | m_Layer: 5 1182 | m_Name: Intersection 1183 | m_TagString: Untagged 1184 | m_Icon: {fileID: 0} 1185 | m_NavMeshLayer: 0 1186 | m_StaticEditorFlags: 0 1187 | m_IsActive: 1 1188 | --- !u!114 &1178041149 1189 | MonoBehaviour: 1190 | m_ObjectHideFlags: 0 1191 | m_CorrespondingSourceObject: {fileID: 0} 1192 | m_PrefabInstance: {fileID: 0} 1193 | m_PrefabAsset: {fileID: 0} 1194 | m_GameObject: {fileID: 1178041148} 1195 | m_Enabled: 1 1196 | m_EditorHideFlags: 0 1197 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1198 | m_Name: 1199 | m_EditorClassIdentifier: 1200 | m_Navigation: 1201 | m_Mode: 3 1202 | m_SelectOnUp: {fileID: 0} 1203 | m_SelectOnDown: {fileID: 0} 1204 | m_SelectOnLeft: {fileID: 0} 1205 | m_SelectOnRight: {fileID: 0} 1206 | m_Transition: 1 1207 | m_Colors: 1208 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 1209 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1210 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 1211 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 1212 | m_ColorMultiplier: 1 1213 | m_FadeDuration: 0.1 1214 | m_SpriteState: 1215 | m_HighlightedSprite: {fileID: 0} 1216 | m_PressedSprite: {fileID: 0} 1217 | m_DisabledSprite: {fileID: 0} 1218 | m_AnimationTriggers: 1219 | m_NormalTrigger: Normal 1220 | m_HighlightedTrigger: Highlighted 1221 | m_PressedTrigger: Pressed 1222 | m_DisabledTrigger: Disabled 1223 | m_Interactable: 1 1224 | m_TargetGraphic: {fileID: 1178041150} 1225 | m_OnClick: 1226 | m_PersistentCalls: 1227 | m_Calls: 1228 | - m_Target: {fileID: 1289435174} 1229 | m_MethodName: Intersection 1230 | m_Mode: 1 1231 | m_Arguments: 1232 | m_ObjectArgument: {fileID: 0} 1233 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 1234 | m_IntArgument: 0 1235 | m_FloatArgument: 0 1236 | m_StringArgument: 1237 | m_BoolArgument: 0 1238 | m_CallState: 2 1239 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 1240 | Culture=neutral, PublicKeyToken=null 1241 | --- !u!114 &1178041150 1242 | MonoBehaviour: 1243 | m_ObjectHideFlags: 0 1244 | m_CorrespondingSourceObject: {fileID: 0} 1245 | m_PrefabInstance: {fileID: 0} 1246 | m_PrefabAsset: {fileID: 0} 1247 | m_GameObject: {fileID: 1178041148} 1248 | m_Enabled: 1 1249 | m_EditorHideFlags: 0 1250 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1251 | m_Name: 1252 | m_EditorClassIdentifier: 1253 | m_Material: {fileID: 0} 1254 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1255 | m_RaycastTarget: 1 1256 | m_OnCullStateChanged: 1257 | m_PersistentCalls: 1258 | m_Calls: [] 1259 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1260 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1261 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 1262 | m_Type: 1 1263 | m_PreserveAspect: 0 1264 | m_FillCenter: 1 1265 | m_FillMethod: 4 1266 | m_FillAmount: 1 1267 | m_FillClockwise: 1 1268 | m_FillOrigin: 0 1269 | m_UseSpriteMesh: 0 1270 | --- !u!222 &1178041151 1271 | CanvasRenderer: 1272 | m_ObjectHideFlags: 0 1273 | m_CorrespondingSourceObject: {fileID: 0} 1274 | m_PrefabInstance: {fileID: 0} 1275 | m_PrefabAsset: {fileID: 0} 1276 | m_GameObject: {fileID: 1178041148} 1277 | m_CullTransparentMesh: 0 1278 | --- !u!224 &1178041152 1279 | RectTransform: 1280 | m_ObjectHideFlags: 0 1281 | m_CorrespondingSourceObject: {fileID: 0} 1282 | m_PrefabInstance: {fileID: 0} 1283 | m_PrefabAsset: {fileID: 0} 1284 | m_GameObject: {fileID: 1178041148} 1285 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1286 | m_LocalPosition: {x: 0, y: 0, z: 0} 1287 | m_LocalScale: {x: 1, y: 1, z: 1} 1288 | m_Children: 1289 | - {fileID: 37081740} 1290 | m_Father: {fileID: 1389035451} 1291 | m_RootOrder: 5 1292 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1293 | m_AnchorMin: {x: 0, y: 1} 1294 | m_AnchorMax: {x: 0, y: 1} 1295 | m_AnchoredPosition: {x: 99, y: -167.7} 1296 | m_SizeDelta: {x: 120, y: 30} 1297 | m_Pivot: {x: 0.5, y: 0.5} 1298 | --- !u!1 &1267959001 1299 | GameObject: 1300 | m_ObjectHideFlags: 0 1301 | m_CorrespondingSourceObject: {fileID: 0} 1302 | m_PrefabInstance: {fileID: 0} 1303 | m_PrefabAsset: {fileID: 0} 1304 | serializedVersion: 6 1305 | m_Component: 1306 | - component: {fileID: 1267959002} 1307 | - component: {fileID: 1267959004} 1308 | - component: {fileID: 1267959003} 1309 | m_Layer: 5 1310 | m_Name: Subtraction 1311 | m_TagString: Untagged 1312 | m_Icon: {fileID: 0} 1313 | m_NavMeshLayer: 0 1314 | m_StaticEditorFlags: 0 1315 | m_IsActive: 1 1316 | --- !u!224 &1267959002 1317 | RectTransform: 1318 | m_ObjectHideFlags: 0 1319 | m_CorrespondingSourceObject: {fileID: 0} 1320 | m_PrefabInstance: {fileID: 0} 1321 | m_PrefabAsset: {fileID: 0} 1322 | m_GameObject: {fileID: 1267959001} 1323 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1324 | m_LocalPosition: {x: 0, y: 0, z: 0} 1325 | m_LocalScale: {x: 1, y: 1, z: 1} 1326 | m_Children: 1327 | - {fileID: 731997021} 1328 | - {fileID: 1925789619} 1329 | - {fileID: 651349506} 1330 | m_Father: {fileID: 1389035451} 1331 | m_RootOrder: 4 1332 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1333 | m_AnchorMin: {x: 0, y: 1} 1334 | m_AnchorMax: {x: 0, y: 1} 1335 | m_AnchoredPosition: {x: 99, y: -227.5} 1336 | m_SizeDelta: {x: 120, y: 79.1} 1337 | m_Pivot: {x: 0.5, y: 0.5} 1338 | --- !u!114 &1267959003 1339 | MonoBehaviour: 1340 | m_ObjectHideFlags: 0 1341 | m_CorrespondingSourceObject: {fileID: 0} 1342 | m_PrefabInstance: {fileID: 0} 1343 | m_PrefabAsset: {fileID: 0} 1344 | m_GameObject: {fileID: 1267959001} 1345 | m_Enabled: 1 1346 | m_EditorHideFlags: 0 1347 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1348 | m_Name: 1349 | m_EditorClassIdentifier: 1350 | m_Material: {fileID: 0} 1351 | m_Color: {r: 1, g: 1, b: 1, a: 0.392} 1352 | m_RaycastTarget: 1 1353 | m_OnCullStateChanged: 1354 | m_PersistentCalls: 1355 | m_Calls: [] 1356 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1357 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1358 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 1359 | m_Type: 1 1360 | m_PreserveAspect: 0 1361 | m_FillCenter: 1 1362 | m_FillMethod: 4 1363 | m_FillAmount: 1 1364 | m_FillClockwise: 1 1365 | m_FillOrigin: 0 1366 | m_UseSpriteMesh: 0 1367 | --- !u!222 &1267959004 1368 | CanvasRenderer: 1369 | m_ObjectHideFlags: 0 1370 | m_CorrespondingSourceObject: {fileID: 0} 1371 | m_PrefabInstance: {fileID: 0} 1372 | m_PrefabAsset: {fileID: 0} 1373 | m_GameObject: {fileID: 1267959001} 1374 | m_CullTransparentMesh: 0 1375 | --- !u!1 &1289435173 1376 | GameObject: 1377 | m_ObjectHideFlags: 0 1378 | m_CorrespondingSourceObject: {fileID: 0} 1379 | m_PrefabInstance: {fileID: 0} 1380 | m_PrefabAsset: {fileID: 0} 1381 | serializedVersion: 6 1382 | m_Component: 1383 | - component: {fileID: 1289435175} 1384 | - component: {fileID: 1289435174} 1385 | m_Layer: 0 1386 | m_Name: Scene Manager 1387 | m_TagString: Untagged 1388 | m_Icon: {fileID: 0} 1389 | m_NavMeshLayer: 0 1390 | m_StaticEditorFlags: 0 1391 | m_IsActive: 1 1392 | --- !u!114 &1289435174 1393 | MonoBehaviour: 1394 | m_ObjectHideFlags: 0 1395 | m_CorrespondingSourceObject: {fileID: 0} 1396 | m_PrefabInstance: {fileID: 0} 1397 | m_PrefabAsset: {fileID: 0} 1398 | m_GameObject: {fileID: 1289435173} 1399 | m_Enabled: 1 1400 | m_EditorHideFlags: 0 1401 | m_Script: {fileID: 11500000, guid: 7d107089815ad904ea32446163f3c8e8, type: 3} 1402 | m_Name: 1403 | m_EditorClassIdentifier: 1404 | m_Name: 1405 | m_EditorClassIdentifier: 1406 | wireframeMaterial: {fileID: 0} 1407 | fodder: 1408 | - {fileID: 145976, guid: 68212dad33f3b5a4897a979f72745eb7, type: 3} 1409 | - {fileID: 158940, guid: 6985547397e6b864592f722d1a1440e6, type: 3} 1410 | - {fileID: 136624, guid: eab5f60e738b26542916aac113f57df4, type: 3} 1411 | - {fileID: 144168, guid: 678cdbee1e449a942bbed43014132d8a, type: 3} 1412 | --- !u!4 &1289435175 1413 | Transform: 1414 | m_ObjectHideFlags: 0 1415 | m_CorrespondingSourceObject: {fileID: 0} 1416 | m_PrefabInstance: {fileID: 0} 1417 | m_PrefabAsset: {fileID: 0} 1418 | m_GameObject: {fileID: 1289435173} 1419 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1420 | m_LocalPosition: {x: 538.42566, y: 468.93436, z: -1.375} 1421 | m_LocalScale: {x: 1, y: 1, z: 1} 1422 | m_Children: [] 1423 | m_Father: {fileID: 0} 1424 | m_RootOrder: 5 1425 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1426 | --- !u!1 &1389035447 1427 | GameObject: 1428 | m_ObjectHideFlags: 0 1429 | m_CorrespondingSourceObject: {fileID: 0} 1430 | m_PrefabInstance: {fileID: 0} 1431 | m_PrefabAsset: {fileID: 0} 1432 | serializedVersion: 6 1433 | m_Component: 1434 | - component: {fileID: 1389035451} 1435 | - component: {fileID: 1389035450} 1436 | - component: {fileID: 1389035449} 1437 | - component: {fileID: 1389035448} 1438 | m_Layer: 5 1439 | m_Name: Canvas 1440 | m_TagString: Untagged 1441 | m_Icon: {fileID: 0} 1442 | m_NavMeshLayer: 0 1443 | m_StaticEditorFlags: 0 1444 | m_IsActive: 1 1445 | --- !u!114 &1389035448 1446 | MonoBehaviour: 1447 | m_ObjectHideFlags: 0 1448 | m_CorrespondingSourceObject: {fileID: 0} 1449 | m_PrefabInstance: {fileID: 0} 1450 | m_PrefabAsset: {fileID: 0} 1451 | m_GameObject: {fileID: 1389035447} 1452 | m_Enabled: 1 1453 | m_EditorHideFlags: 0 1454 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1455 | m_Name: 1456 | m_EditorClassIdentifier: 1457 | m_IgnoreReversedGraphics: 1 1458 | m_BlockingObjects: 0 1459 | m_BlockingMask: 1460 | serializedVersion: 2 1461 | m_Bits: 4294967295 1462 | --- !u!114 &1389035449 1463 | MonoBehaviour: 1464 | m_ObjectHideFlags: 0 1465 | m_CorrespondingSourceObject: {fileID: 0} 1466 | m_PrefabInstance: {fileID: 0} 1467 | m_PrefabAsset: {fileID: 0} 1468 | m_GameObject: {fileID: 1389035447} 1469 | m_Enabled: 1 1470 | m_EditorHideFlags: 0 1471 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1472 | m_Name: 1473 | m_EditorClassIdentifier: 1474 | m_UiScaleMode: 0 1475 | m_ReferencePixelsPerUnit: 100 1476 | m_ScaleFactor: 1 1477 | m_ReferenceResolution: {x: 800, y: 600} 1478 | m_ScreenMatchMode: 0 1479 | m_MatchWidthOrHeight: 0 1480 | m_PhysicalUnit: 3 1481 | m_FallbackScreenDPI: 96 1482 | m_DefaultSpriteDPI: 96 1483 | m_DynamicPixelsPerUnit: 1 1484 | --- !u!223 &1389035450 1485 | Canvas: 1486 | m_ObjectHideFlags: 0 1487 | m_CorrespondingSourceObject: {fileID: 0} 1488 | m_PrefabInstance: {fileID: 0} 1489 | m_PrefabAsset: {fileID: 0} 1490 | m_GameObject: {fileID: 1389035447} 1491 | m_Enabled: 1 1492 | serializedVersion: 3 1493 | m_RenderMode: 0 1494 | m_Camera: {fileID: 0} 1495 | m_PlaneDistance: 100 1496 | m_PixelPerfect: 0 1497 | m_ReceivesEvents: 1 1498 | m_OverrideSorting: 0 1499 | m_OverridePixelPerfect: 0 1500 | m_SortingBucketNormalizedSize: 0 1501 | m_AdditionalShaderChannelsFlag: 25 1502 | m_SortingLayerID: 0 1503 | m_SortingOrder: 0 1504 | m_TargetDisplay: 0 1505 | --- !u!224 &1389035451 1506 | RectTransform: 1507 | m_ObjectHideFlags: 0 1508 | m_CorrespondingSourceObject: {fileID: 0} 1509 | m_PrefabInstance: {fileID: 0} 1510 | m_PrefabAsset: {fileID: 0} 1511 | m_GameObject: {fileID: 1389035447} 1512 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1513 | m_LocalPosition: {x: 0, y: 0, z: 0} 1514 | m_LocalScale: {x: 0, y: 0, z: 0} 1515 | m_Children: 1516 | - {fileID: 536639314} 1517 | - {fileID: 1769227586} 1518 | - {fileID: 1477244627} 1519 | - {fileID: 692373764} 1520 | - {fileID: 1267959002} 1521 | - {fileID: 1178041152} 1522 | m_Father: {fileID: 0} 1523 | m_RootOrder: 3 1524 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1525 | m_AnchorMin: {x: 0, y: 0} 1526 | m_AnchorMax: {x: 0, y: 0} 1527 | m_AnchoredPosition: {x: 0, y: 0} 1528 | m_SizeDelta: {x: 0, y: 0} 1529 | m_Pivot: {x: 0, y: 0} 1530 | --- !u!1 &1477244626 1531 | GameObject: 1532 | m_ObjectHideFlags: 0 1533 | m_CorrespondingSourceObject: {fileID: 0} 1534 | m_PrefabInstance: {fileID: 0} 1535 | m_PrefabAsset: {fileID: 0} 1536 | serializedVersion: 6 1537 | m_Component: 1538 | - component: {fileID: 1477244627} 1539 | - component: {fileID: 1477244630} 1540 | - component: {fileID: 1477244629} 1541 | - component: {fileID: 1477244628} 1542 | m_Layer: 5 1543 | m_Name: Toggle Prefab 1544 | m_TagString: Untagged 1545 | m_Icon: {fileID: 0} 1546 | m_NavMeshLayer: 0 1547 | m_StaticEditorFlags: 0 1548 | m_IsActive: 1 1549 | --- !u!224 &1477244627 1550 | RectTransform: 1551 | m_ObjectHideFlags: 0 1552 | m_CorrespondingSourceObject: {fileID: 0} 1553 | m_PrefabInstance: {fileID: 0} 1554 | m_PrefabAsset: {fileID: 0} 1555 | m_GameObject: {fileID: 1477244626} 1556 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1557 | m_LocalPosition: {x: 0, y: 0, z: 0} 1558 | m_LocalScale: {x: 1, y: 1, z: 1} 1559 | m_Children: 1560 | - {fileID: 692305657} 1561 | m_Father: {fileID: 1389035451} 1562 | m_RootOrder: 2 1563 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1564 | m_AnchorMin: {x: 0, y: 1} 1565 | m_AnchorMax: {x: 0, y: 1} 1566 | m_AnchoredPosition: {x: 99, y: -67.8} 1567 | m_SizeDelta: {x: 120, y: 30} 1568 | m_Pivot: {x: 0.5, y: 0.5} 1569 | --- !u!114 &1477244628 1570 | MonoBehaviour: 1571 | m_ObjectHideFlags: 0 1572 | m_CorrespondingSourceObject: {fileID: 0} 1573 | m_PrefabInstance: {fileID: 0} 1574 | m_PrefabAsset: {fileID: 0} 1575 | m_GameObject: {fileID: 1477244626} 1576 | m_Enabled: 1 1577 | m_EditorHideFlags: 0 1578 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1579 | m_Name: 1580 | m_EditorClassIdentifier: 1581 | m_Navigation: 1582 | m_Mode: 3 1583 | m_SelectOnUp: {fileID: 0} 1584 | m_SelectOnDown: {fileID: 0} 1585 | m_SelectOnLeft: {fileID: 0} 1586 | m_SelectOnRight: {fileID: 0} 1587 | m_Transition: 1 1588 | m_Colors: 1589 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 1590 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1591 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 1592 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 1593 | m_ColorMultiplier: 1 1594 | m_FadeDuration: 0.1 1595 | m_SpriteState: 1596 | m_HighlightedSprite: {fileID: 0} 1597 | m_PressedSprite: {fileID: 0} 1598 | m_DisabledSprite: {fileID: 0} 1599 | m_AnimationTriggers: 1600 | m_NormalTrigger: Normal 1601 | m_HighlightedTrigger: Highlighted 1602 | m_PressedTrigger: Pressed 1603 | m_DisabledTrigger: Disabled 1604 | m_Interactable: 1 1605 | m_TargetGraphic: {fileID: 1477244629} 1606 | m_OnClick: 1607 | m_PersistentCalls: 1608 | m_Calls: 1609 | - m_Target: {fileID: 1289435174} 1610 | m_MethodName: ToggleExampleMeshes 1611 | m_Mode: 1 1612 | m_Arguments: 1613 | m_ObjectArgument: {fileID: 0} 1614 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 1615 | m_IntArgument: 0 1616 | m_FloatArgument: 0 1617 | m_StringArgument: 1618 | m_BoolArgument: 0 1619 | m_CallState: 2 1620 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 1621 | Culture=neutral, PublicKeyToken=null 1622 | --- !u!114 &1477244629 1623 | MonoBehaviour: 1624 | m_ObjectHideFlags: 0 1625 | m_CorrespondingSourceObject: {fileID: 0} 1626 | m_PrefabInstance: {fileID: 0} 1627 | m_PrefabAsset: {fileID: 0} 1628 | m_GameObject: {fileID: 1477244626} 1629 | m_Enabled: 1 1630 | m_EditorHideFlags: 0 1631 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1632 | m_Name: 1633 | m_EditorClassIdentifier: 1634 | m_Material: {fileID: 0} 1635 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1636 | m_RaycastTarget: 1 1637 | m_OnCullStateChanged: 1638 | m_PersistentCalls: 1639 | m_Calls: [] 1640 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1641 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1642 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 1643 | m_Type: 1 1644 | m_PreserveAspect: 0 1645 | m_FillCenter: 1 1646 | m_FillMethod: 4 1647 | m_FillAmount: 1 1648 | m_FillClockwise: 1 1649 | m_FillOrigin: 0 1650 | m_UseSpriteMesh: 0 1651 | --- !u!222 &1477244630 1652 | CanvasRenderer: 1653 | m_ObjectHideFlags: 0 1654 | m_CorrespondingSourceObject: {fileID: 0} 1655 | m_PrefabInstance: {fileID: 0} 1656 | m_PrefabAsset: {fileID: 0} 1657 | m_GameObject: {fileID: 1477244626} 1658 | m_CullTransparentMesh: 0 1659 | --- !u!1 &1487020548 1660 | GameObject: 1661 | m_ObjectHideFlags: 0 1662 | m_CorrespondingSourceObject: {fileID: 0} 1663 | m_PrefabInstance: {fileID: 0} 1664 | m_PrefabAsset: {fileID: 0} 1665 | serializedVersion: 6 1666 | m_Component: 1667 | - component: {fileID: 1487020549} 1668 | - component: {fileID: 1487020551} 1669 | - component: {fileID: 1487020550} 1670 | m_Layer: 5 1671 | m_Name: Label 1672 | m_TagString: Untagged 1673 | m_Icon: {fileID: 0} 1674 | m_NavMeshLayer: 0 1675 | m_StaticEditorFlags: 0 1676 | m_IsActive: 1 1677 | --- !u!224 &1487020549 1678 | RectTransform: 1679 | m_ObjectHideFlags: 0 1680 | m_CorrespondingSourceObject: {fileID: 0} 1681 | m_PrefabInstance: {fileID: 0} 1682 | m_PrefabAsset: {fileID: 0} 1683 | m_GameObject: {fileID: 1487020548} 1684 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1685 | m_LocalPosition: {x: 0, y: 0, z: 0} 1686 | m_LocalScale: {x: 1, y: 1, z: 1} 1687 | m_Children: [] 1688 | m_Father: {fileID: 692373764} 1689 | m_RootOrder: 1 1690 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1691 | m_AnchorMin: {x: 0, y: 0} 1692 | m_AnchorMax: {x: 0.6062499, y: 1} 1693 | m_AnchoredPosition: {x: 40.5, y: -0.5} 1694 | m_SizeDelta: {x: 35, y: -3} 1695 | m_Pivot: {x: 0.5, y: 0.5} 1696 | --- !u!114 &1487020550 1697 | MonoBehaviour: 1698 | m_ObjectHideFlags: 0 1699 | m_CorrespondingSourceObject: {fileID: 0} 1700 | m_PrefabInstance: {fileID: 0} 1701 | m_PrefabAsset: {fileID: 0} 1702 | m_GameObject: {fileID: 1487020548} 1703 | m_Enabled: 1 1704 | m_EditorHideFlags: 0 1705 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1706 | m_Name: 1707 | m_EditorClassIdentifier: 1708 | m_Material: {fileID: 0} 1709 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1710 | m_RaycastTarget: 1 1711 | m_OnCullStateChanged: 1712 | m_PersistentCalls: 1713 | m_Calls: [] 1714 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1715 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1716 | m_FontData: 1717 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1718 | m_FontSize: 14 1719 | m_FontStyle: 0 1720 | m_BestFit: 0 1721 | m_MinSize: 10 1722 | m_MaxSize: 40 1723 | m_Alignment: 0 1724 | m_AlignByGeometry: 0 1725 | m_RichText: 1 1726 | m_HorizontalOverflow: 0 1727 | m_VerticalOverflow: 0 1728 | m_LineSpacing: 1 1729 | m_Text: Wireframe 1730 | --- !u!222 &1487020551 1731 | CanvasRenderer: 1732 | m_ObjectHideFlags: 0 1733 | m_CorrespondingSourceObject: {fileID: 0} 1734 | m_PrefabInstance: {fileID: 0} 1735 | m_PrefabAsset: {fileID: 0} 1736 | m_GameObject: {fileID: 1487020548} 1737 | m_CullTransparentMesh: 0 1738 | --- !u!1 &1584505011 1739 | GameObject: 1740 | m_ObjectHideFlags: 0 1741 | m_CorrespondingSourceObject: {fileID: 0} 1742 | m_PrefabInstance: {fileID: 0} 1743 | m_PrefabAsset: {fileID: 0} 1744 | serializedVersion: 6 1745 | m_Component: 1746 | - component: {fileID: 1584505012} 1747 | - component: {fileID: 1584505014} 1748 | - component: {fileID: 1584505013} 1749 | m_Layer: 5 1750 | m_Name: Text 1751 | m_TagString: Untagged 1752 | m_Icon: {fileID: 0} 1753 | m_NavMeshLayer: 0 1754 | m_StaticEditorFlags: 0 1755 | m_IsActive: 1 1756 | --- !u!224 &1584505012 1757 | RectTransform: 1758 | m_ObjectHideFlags: 0 1759 | m_CorrespondingSourceObject: {fileID: 0} 1760 | m_PrefabInstance: {fileID: 0} 1761 | m_PrefabAsset: {fileID: 0} 1762 | m_GameObject: {fileID: 1584505011} 1763 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1764 | m_LocalPosition: {x: 0, y: 0, z: 0} 1765 | m_LocalScale: {x: 1, y: 1, z: 1} 1766 | m_Children: [] 1767 | m_Father: {fileID: 1769227586} 1768 | m_RootOrder: 0 1769 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1770 | m_AnchorMin: {x: 0, y: 0} 1771 | m_AnchorMax: {x: 1, y: 1} 1772 | m_AnchoredPosition: {x: 0, y: 0} 1773 | m_SizeDelta: {x: 0, y: 0} 1774 | m_Pivot: {x: 0.5, y: 0.5} 1775 | --- !u!114 &1584505013 1776 | MonoBehaviour: 1777 | m_ObjectHideFlags: 0 1778 | m_CorrespondingSourceObject: {fileID: 0} 1779 | m_PrefabInstance: {fileID: 0} 1780 | m_PrefabAsset: {fileID: 0} 1781 | m_GameObject: {fileID: 1584505011} 1782 | m_Enabled: 1 1783 | m_EditorHideFlags: 0 1784 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1785 | m_Name: 1786 | m_EditorClassIdentifier: 1787 | m_Material: {fileID: 0} 1788 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 1789 | m_RaycastTarget: 1 1790 | m_OnCullStateChanged: 1791 | m_PersistentCalls: 1792 | m_Calls: [] 1793 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1794 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1795 | m_FontData: 1796 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1797 | m_FontSize: 14 1798 | m_FontStyle: 0 1799 | m_BestFit: 0 1800 | m_MinSize: 10 1801 | m_MaxSize: 40 1802 | m_Alignment: 4 1803 | m_AlignByGeometry: 0 1804 | m_RichText: 1 1805 | m_HorizontalOverflow: 0 1806 | m_VerticalOverflow: 0 1807 | m_LineSpacing: 1 1808 | m_Text: Union 1809 | --- !u!222 &1584505014 1810 | CanvasRenderer: 1811 | m_ObjectHideFlags: 0 1812 | m_CorrespondingSourceObject: {fileID: 0} 1813 | m_PrefabInstance: {fileID: 0} 1814 | m_PrefabAsset: {fileID: 0} 1815 | m_GameObject: {fileID: 1584505011} 1816 | m_CullTransparentMesh: 0 1817 | --- !u!1 &1699770120 1818 | GameObject: 1819 | m_ObjectHideFlags: 0 1820 | m_CorrespondingSourceObject: {fileID: 0} 1821 | m_PrefabInstance: {fileID: 0} 1822 | m_PrefabAsset: {fileID: 0} 1823 | serializedVersion: 6 1824 | m_Component: 1825 | - component: {fileID: 1699770121} 1826 | - component: {fileID: 1699770123} 1827 | - component: {fileID: 1699770122} 1828 | m_Layer: 5 1829 | m_Name: Background 1830 | m_TagString: Untagged 1831 | m_Icon: {fileID: 0} 1832 | m_NavMeshLayer: 0 1833 | m_StaticEditorFlags: 0 1834 | m_IsActive: 1 1835 | --- !u!224 &1699770121 1836 | RectTransform: 1837 | m_ObjectHideFlags: 0 1838 | m_CorrespondingSourceObject: {fileID: 0} 1839 | m_PrefabInstance: {fileID: 0} 1840 | m_PrefabAsset: {fileID: 0} 1841 | m_GameObject: {fileID: 1699770120} 1842 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1843 | m_LocalPosition: {x: 0, y: 0, z: 0} 1844 | m_LocalScale: {x: 1, y: 1, z: 1} 1845 | m_Children: 1846 | - {fileID: 1079397856} 1847 | m_Father: {fileID: 692373764} 1848 | m_RootOrder: 0 1849 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1850 | m_AnchorMin: {x: 0, y: 1} 1851 | m_AnchorMax: {x: 0, y: 1} 1852 | m_AnchoredPosition: {x: 10, y: -10} 1853 | m_SizeDelta: {x: 20, y: 20} 1854 | m_Pivot: {x: 0.5, y: 0.5} 1855 | --- !u!114 &1699770122 1856 | MonoBehaviour: 1857 | m_ObjectHideFlags: 0 1858 | m_CorrespondingSourceObject: {fileID: 0} 1859 | m_PrefabInstance: {fileID: 0} 1860 | m_PrefabAsset: {fileID: 0} 1861 | m_GameObject: {fileID: 1699770120} 1862 | m_Enabled: 1 1863 | m_EditorHideFlags: 0 1864 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1865 | m_Name: 1866 | m_EditorClassIdentifier: 1867 | m_Material: {fileID: 0} 1868 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1869 | m_RaycastTarget: 1 1870 | m_OnCullStateChanged: 1871 | m_PersistentCalls: 1872 | m_Calls: [] 1873 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1874 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1875 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 1876 | m_Type: 1 1877 | m_PreserveAspect: 0 1878 | m_FillCenter: 1 1879 | m_FillMethod: 4 1880 | m_FillAmount: 1 1881 | m_FillClockwise: 1 1882 | m_FillOrigin: 0 1883 | m_UseSpriteMesh: 0 1884 | --- !u!222 &1699770123 1885 | CanvasRenderer: 1886 | m_ObjectHideFlags: 0 1887 | m_CorrespondingSourceObject: {fileID: 0} 1888 | m_PrefabInstance: {fileID: 0} 1889 | m_PrefabAsset: {fileID: 0} 1890 | m_GameObject: {fileID: 1699770120} 1891 | m_CullTransparentMesh: 0 1892 | --- !u!1 &1769227585 1893 | GameObject: 1894 | m_ObjectHideFlags: 0 1895 | m_CorrespondingSourceObject: {fileID: 0} 1896 | m_PrefabInstance: {fileID: 0} 1897 | m_PrefabAsset: {fileID: 0} 1898 | serializedVersion: 6 1899 | m_Component: 1900 | - component: {fileID: 1769227586} 1901 | - component: {fileID: 1769227589} 1902 | - component: {fileID: 1769227588} 1903 | - component: {fileID: 1769227587} 1904 | m_Layer: 5 1905 | m_Name: Union Button 1906 | m_TagString: Untagged 1907 | m_Icon: {fileID: 0} 1908 | m_NavMeshLayer: 0 1909 | m_StaticEditorFlags: 0 1910 | m_IsActive: 1 1911 | --- !u!224 &1769227586 1912 | RectTransform: 1913 | m_ObjectHideFlags: 0 1914 | m_CorrespondingSourceObject: {fileID: 0} 1915 | m_PrefabInstance: {fileID: 0} 1916 | m_PrefabAsset: {fileID: 0} 1917 | m_GameObject: {fileID: 1769227585} 1918 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1919 | m_LocalPosition: {x: 0, y: 0, z: 0} 1920 | m_LocalScale: {x: 1, y: 1, z: 1} 1921 | m_Children: 1922 | - {fileID: 1584505012} 1923 | m_Father: {fileID: 1389035451} 1924 | m_RootOrder: 1 1925 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1926 | m_AnchorMin: {x: 0, y: 1} 1927 | m_AnchorMax: {x: 0, y: 1} 1928 | m_AnchoredPosition: {x: 99, y: -132.6} 1929 | m_SizeDelta: {x: 120, y: 30} 1930 | m_Pivot: {x: 0.5, y: 0.5} 1931 | --- !u!114 &1769227587 1932 | MonoBehaviour: 1933 | m_ObjectHideFlags: 0 1934 | m_CorrespondingSourceObject: {fileID: 0} 1935 | m_PrefabInstance: {fileID: 0} 1936 | m_PrefabAsset: {fileID: 0} 1937 | m_GameObject: {fileID: 1769227585} 1938 | m_Enabled: 1 1939 | m_EditorHideFlags: 0 1940 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1941 | m_Name: 1942 | m_EditorClassIdentifier: 1943 | m_Navigation: 1944 | m_Mode: 3 1945 | m_SelectOnUp: {fileID: 0} 1946 | m_SelectOnDown: {fileID: 0} 1947 | m_SelectOnLeft: {fileID: 0} 1948 | m_SelectOnRight: {fileID: 0} 1949 | m_Transition: 1 1950 | m_Colors: 1951 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 1952 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1953 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 1954 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 1955 | m_ColorMultiplier: 1 1956 | m_FadeDuration: 0.1 1957 | m_SpriteState: 1958 | m_HighlightedSprite: {fileID: 0} 1959 | m_PressedSprite: {fileID: 0} 1960 | m_DisabledSprite: {fileID: 0} 1961 | m_AnimationTriggers: 1962 | m_NormalTrigger: Normal 1963 | m_HighlightedTrigger: Highlighted 1964 | m_PressedTrigger: Pressed 1965 | m_DisabledTrigger: Disabled 1966 | m_Interactable: 1 1967 | m_TargetGraphic: {fileID: 1769227588} 1968 | m_OnClick: 1969 | m_PersistentCalls: 1970 | m_Calls: 1971 | - m_Target: {fileID: 1289435174} 1972 | m_MethodName: Union 1973 | m_Mode: 1 1974 | m_Arguments: 1975 | m_ObjectArgument: {fileID: 0} 1976 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 1977 | m_IntArgument: 0 1978 | m_FloatArgument: 0 1979 | m_StringArgument: 1980 | m_BoolArgument: 0 1981 | m_CallState: 2 1982 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 1983 | Culture=neutral, PublicKeyToken=null 1984 | --- !u!114 &1769227588 1985 | MonoBehaviour: 1986 | m_ObjectHideFlags: 0 1987 | m_CorrespondingSourceObject: {fileID: 0} 1988 | m_PrefabInstance: {fileID: 0} 1989 | m_PrefabAsset: {fileID: 0} 1990 | m_GameObject: {fileID: 1769227585} 1991 | m_Enabled: 1 1992 | m_EditorHideFlags: 0 1993 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1994 | m_Name: 1995 | m_EditorClassIdentifier: 1996 | m_Material: {fileID: 0} 1997 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1998 | m_RaycastTarget: 1 1999 | m_OnCullStateChanged: 2000 | m_PersistentCalls: 2001 | m_Calls: [] 2002 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 2003 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2004 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 2005 | m_Type: 1 2006 | m_PreserveAspect: 0 2007 | m_FillCenter: 1 2008 | m_FillMethod: 4 2009 | m_FillAmount: 1 2010 | m_FillClockwise: 1 2011 | m_FillOrigin: 0 2012 | m_UseSpriteMesh: 0 2013 | --- !u!222 &1769227589 2014 | CanvasRenderer: 2015 | m_ObjectHideFlags: 0 2016 | m_CorrespondingSourceObject: {fileID: 0} 2017 | m_PrefabInstance: {fileID: 0} 2018 | m_PrefabAsset: {fileID: 0} 2019 | m_GameObject: {fileID: 1769227585} 2020 | m_CullTransparentMesh: 0 2021 | --- !u!1 &1889552587 2022 | GameObject: 2023 | m_ObjectHideFlags: 0 2024 | m_CorrespondingSourceObject: {fileID: 0} 2025 | m_PrefabInstance: {fileID: 0} 2026 | m_PrefabAsset: {fileID: 0} 2027 | serializedVersion: 6 2028 | m_Component: 2029 | - component: {fileID: 1889552589} 2030 | - component: {fileID: 1889552588} 2031 | m_Layer: 0 2032 | m_Name: Point light 1 2033 | m_TagString: Untagged 2034 | m_Icon: {fileID: 0} 2035 | m_NavMeshLayer: 0 2036 | m_StaticEditorFlags: 0 2037 | m_IsActive: 1 2038 | --- !u!108 &1889552588 2039 | Light: 2040 | m_ObjectHideFlags: 0 2041 | m_CorrespondingSourceObject: {fileID: 0} 2042 | m_PrefabInstance: {fileID: 0} 2043 | m_PrefabAsset: {fileID: 0} 2044 | m_GameObject: {fileID: 1889552587} 2045 | m_Enabled: 1 2046 | serializedVersion: 8 2047 | m_Type: 2 2048 | m_Color: {r: 0.36764705, g: 0.36764705, b: 0.36764705, a: 1} 2049 | m_Intensity: 1 2050 | m_Range: 10 2051 | m_SpotAngle: 30 2052 | m_CookieSize: 10 2053 | m_Shadows: 2054 | m_Type: 0 2055 | m_Resolution: -1 2056 | m_CustomResolution: -1 2057 | m_Strength: 1 2058 | m_Bias: 0.05 2059 | m_NormalBias: 0.4 2060 | m_NearPlane: 0.2 2061 | m_Cookie: {fileID: 0} 2062 | m_DrawHalo: 0 2063 | m_Flare: {fileID: 0} 2064 | m_RenderMode: 0 2065 | m_CullingMask: 2066 | serializedVersion: 2 2067 | m_Bits: 4294967295 2068 | m_Lightmapping: 4 2069 | m_LightShadowCasterMode: 0 2070 | m_AreaSize: {x: 1, y: 1} 2071 | m_BounceIntensity: 1 2072 | m_ColorTemperature: 6570 2073 | m_UseColorTemperature: 0 2074 | m_ShadowRadius: 0 2075 | m_ShadowAngle: 0 2076 | --- !u!4 &1889552589 2077 | Transform: 2078 | m_ObjectHideFlags: 0 2079 | m_CorrespondingSourceObject: {fileID: 0} 2080 | m_PrefabInstance: {fileID: 0} 2081 | m_PrefabAsset: {fileID: 0} 2082 | m_GameObject: {fileID: 1889552587} 2083 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 2084 | m_LocalPosition: {x: -3.09, y: 2.57, z: -1.65} 2085 | m_LocalScale: {x: 1, y: 1, z: 1} 2086 | m_Children: [] 2087 | m_Father: {fileID: 0} 2088 | m_RootOrder: 1 2089 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 2090 | --- !u!1 &1925789618 2091 | GameObject: 2092 | m_ObjectHideFlags: 0 2093 | m_CorrespondingSourceObject: {fileID: 0} 2094 | m_PrefabInstance: {fileID: 0} 2095 | m_PrefabAsset: {fileID: 0} 2096 | serializedVersion: 6 2097 | m_Component: 2098 | - component: {fileID: 1925789619} 2099 | - component: {fileID: 1925789622} 2100 | - component: {fileID: 1925789621} 2101 | - component: {fileID: 1925789620} 2102 | m_Layer: 5 2103 | m_Name: Subtract Right Left 2104 | m_TagString: Untagged 2105 | m_Icon: {fileID: 0} 2106 | m_NavMeshLayer: 0 2107 | m_StaticEditorFlags: 0 2108 | m_IsActive: 1 2109 | --- !u!224 &1925789619 2110 | RectTransform: 2111 | m_ObjectHideFlags: 0 2112 | m_CorrespondingSourceObject: {fileID: 0} 2113 | m_PrefabInstance: {fileID: 0} 2114 | m_PrefabAsset: {fileID: 0} 2115 | m_GameObject: {fileID: 1925789618} 2116 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 2117 | m_LocalPosition: {x: 0, y: 0, z: 0} 2118 | m_LocalScale: {x: 1, y: 1, z: 1} 2119 | m_Children: 2120 | - {fileID: 794253300} 2121 | m_Father: {fileID: 1267959002} 2122 | m_RootOrder: 1 2123 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 2124 | m_AnchorMin: {x: 0, y: 1} 2125 | m_AnchorMax: {x: 0, y: 1} 2126 | m_AnchoredPosition: {x: 59.1, y: -63.2} 2127 | m_SizeDelta: {x: 111.5, y: 24.4} 2128 | m_Pivot: {x: 0.5, y: 0.5} 2129 | --- !u!114 &1925789620 2130 | MonoBehaviour: 2131 | m_ObjectHideFlags: 0 2132 | m_CorrespondingSourceObject: {fileID: 0} 2133 | m_PrefabInstance: {fileID: 0} 2134 | m_PrefabAsset: {fileID: 0} 2135 | m_GameObject: {fileID: 1925789618} 2136 | m_Enabled: 1 2137 | m_EditorHideFlags: 0 2138 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 2139 | m_Name: 2140 | m_EditorClassIdentifier: 2141 | m_Navigation: 2142 | m_Mode: 3 2143 | m_SelectOnUp: {fileID: 0} 2144 | m_SelectOnDown: {fileID: 0} 2145 | m_SelectOnLeft: {fileID: 0} 2146 | m_SelectOnRight: {fileID: 0} 2147 | m_Transition: 1 2148 | m_Colors: 2149 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 2150 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 2151 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 2152 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 2153 | m_ColorMultiplier: 1 2154 | m_FadeDuration: 0.1 2155 | m_SpriteState: 2156 | m_HighlightedSprite: {fileID: 0} 2157 | m_PressedSprite: {fileID: 0} 2158 | m_DisabledSprite: {fileID: 0} 2159 | m_AnimationTriggers: 2160 | m_NormalTrigger: Normal 2161 | m_HighlightedTrigger: Highlighted 2162 | m_PressedTrigger: Pressed 2163 | m_DisabledTrigger: Disabled 2164 | m_Interactable: 1 2165 | m_TargetGraphic: {fileID: 1925789621} 2166 | m_OnClick: 2167 | m_PersistentCalls: 2168 | m_Calls: 2169 | - m_Target: {fileID: 1289435174} 2170 | m_MethodName: SubtractionRL 2171 | m_Mode: 1 2172 | m_Arguments: 2173 | m_ObjectArgument: {fileID: 0} 2174 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 2175 | m_IntArgument: 0 2176 | m_FloatArgument: 0 2177 | m_StringArgument: 2178 | m_BoolArgument: 0 2179 | m_CallState: 2 2180 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 2181 | Culture=neutral, PublicKeyToken=null 2182 | --- !u!114 &1925789621 2183 | MonoBehaviour: 2184 | m_ObjectHideFlags: 0 2185 | m_CorrespondingSourceObject: {fileID: 0} 2186 | m_PrefabInstance: {fileID: 0} 2187 | m_PrefabAsset: {fileID: 0} 2188 | m_GameObject: {fileID: 1925789618} 2189 | m_Enabled: 1 2190 | m_EditorHideFlags: 0 2191 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 2192 | m_Name: 2193 | m_EditorClassIdentifier: 2194 | m_Material: {fileID: 0} 2195 | m_Color: {r: 1, g: 1, b: 1, a: 1} 2196 | m_RaycastTarget: 1 2197 | m_OnCullStateChanged: 2198 | m_PersistentCalls: 2199 | m_Calls: [] 2200 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 2201 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2202 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 2203 | m_Type: 1 2204 | m_PreserveAspect: 0 2205 | m_FillCenter: 1 2206 | m_FillMethod: 4 2207 | m_FillAmount: 1 2208 | m_FillClockwise: 1 2209 | m_FillOrigin: 0 2210 | m_UseSpriteMesh: 0 2211 | --- !u!222 &1925789622 2212 | CanvasRenderer: 2213 | m_ObjectHideFlags: 0 2214 | m_CorrespondingSourceObject: {fileID: 0} 2215 | m_PrefabInstance: {fileID: 0} 2216 | m_PrefabAsset: {fileID: 0} 2217 | m_GameObject: {fileID: 1925789618} 2218 | m_CullTransparentMesh: 0 2219 | --- !u!1 &2055423583 2220 | GameObject: 2221 | m_ObjectHideFlags: 0 2222 | m_CorrespondingSourceObject: {fileID: 0} 2223 | m_PrefabInstance: {fileID: 0} 2224 | m_PrefabAsset: {fileID: 0} 2225 | serializedVersion: 6 2226 | m_Component: 2227 | - component: {fileID: 2055423584} 2228 | - component: {fileID: 2055423586} 2229 | - component: {fileID: 2055423585} 2230 | m_Layer: 5 2231 | m_Name: Text 2232 | m_TagString: Untagged 2233 | m_Icon: {fileID: 0} 2234 | m_NavMeshLayer: 0 2235 | m_StaticEditorFlags: 0 2236 | m_IsActive: 1 2237 | --- !u!224 &2055423584 2238 | RectTransform: 2239 | m_ObjectHideFlags: 0 2240 | m_CorrespondingSourceObject: {fileID: 0} 2241 | m_PrefabInstance: {fileID: 0} 2242 | m_PrefabAsset: {fileID: 0} 2243 | m_GameObject: {fileID: 2055423583} 2244 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 2245 | m_LocalPosition: {x: 0, y: 0, z: 0} 2246 | m_LocalScale: {x: 1, y: 1, z: 1} 2247 | m_Children: [] 2248 | m_Father: {fileID: 536639314} 2249 | m_RootOrder: 0 2250 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 2251 | m_AnchorMin: {x: 0, y: 0} 2252 | m_AnchorMax: {x: 1, y: 1} 2253 | m_AnchoredPosition: {x: 0, y: 0} 2254 | m_SizeDelta: {x: 0, y: 0} 2255 | m_Pivot: {x: 0.5, y: 0.5} 2256 | --- !u!114 &2055423585 2257 | MonoBehaviour: 2258 | m_ObjectHideFlags: 0 2259 | m_CorrespondingSourceObject: {fileID: 0} 2260 | m_PrefabInstance: {fileID: 0} 2261 | m_PrefabAsset: {fileID: 0} 2262 | m_GameObject: {fileID: 2055423583} 2263 | m_Enabled: 1 2264 | m_EditorHideFlags: 0 2265 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 2266 | m_Name: 2267 | m_EditorClassIdentifier: 2268 | m_Material: {fileID: 0} 2269 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 2270 | m_RaycastTarget: 1 2271 | m_OnCullStateChanged: 2272 | m_PersistentCalls: 2273 | m_Calls: [] 2274 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 2275 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2276 | m_FontData: 2277 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 2278 | m_FontSize: 14 2279 | m_FontStyle: 0 2280 | m_BestFit: 0 2281 | m_MinSize: 10 2282 | m_MaxSize: 40 2283 | m_Alignment: 4 2284 | m_AlignByGeometry: 0 2285 | m_RichText: 1 2286 | m_HorizontalOverflow: 0 2287 | m_VerticalOverflow: 0 2288 | m_LineSpacing: 1 2289 | m_Text: Reset Scene 2290 | --- !u!222 &2055423586 2291 | CanvasRenderer: 2292 | m_ObjectHideFlags: 0 2293 | m_CorrespondingSourceObject: {fileID: 0} 2294 | m_PrefabInstance: {fileID: 0} 2295 | m_PrefabAsset: {fileID: 0} 2296 | m_GameObject: {fileID: 2055423583} 2297 | m_CullTransparentMesh: 0 2298 | --- !u!1 &2098958157 2299 | GameObject: 2300 | m_ObjectHideFlags: 0 2301 | m_CorrespondingSourceObject: {fileID: 0} 2302 | m_PrefabInstance: {fileID: 0} 2303 | m_PrefabAsset: {fileID: 0} 2304 | serializedVersion: 6 2305 | m_Component: 2306 | - component: {fileID: 2098958161} 2307 | - component: {fileID: 2098958160} 2308 | - component: {fileID: 2098958159} 2309 | - component: {fileID: 2098958158} 2310 | m_Layer: 0 2311 | m_Name: EventSystem 2312 | m_TagString: Untagged 2313 | m_Icon: {fileID: 0} 2314 | m_NavMeshLayer: 0 2315 | m_StaticEditorFlags: 0 2316 | m_IsActive: 1 2317 | --- !u!114 &2098958158 2318 | MonoBehaviour: 2319 | m_ObjectHideFlags: 0 2320 | m_CorrespondingSourceObject: {fileID: 0} 2321 | m_PrefabInstance: {fileID: 0} 2322 | m_PrefabAsset: {fileID: 0} 2323 | m_GameObject: {fileID: 2098958157} 2324 | m_Enabled: 1 2325 | m_EditorHideFlags: 0 2326 | m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 2327 | m_Name: 2328 | m_EditorClassIdentifier: 2329 | m_ForceModuleActive: 0 2330 | --- !u!114 &2098958159 2331 | MonoBehaviour: 2332 | m_ObjectHideFlags: 0 2333 | m_CorrespondingSourceObject: {fileID: 0} 2334 | m_PrefabInstance: {fileID: 0} 2335 | m_PrefabAsset: {fileID: 0} 2336 | m_GameObject: {fileID: 2098958157} 2337 | m_Enabled: 1 2338 | m_EditorHideFlags: 0 2339 | m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 2340 | m_Name: 2341 | m_EditorClassIdentifier: 2342 | m_HorizontalAxis: Horizontal 2343 | m_VerticalAxis: Vertical 2344 | m_SubmitButton: Submit 2345 | m_CancelButton: Cancel 2346 | m_InputActionsPerSecond: 10 2347 | m_RepeatDelay: 0.5 2348 | m_ForceModuleActive: 0 2349 | --- !u!114 &2098958160 2350 | MonoBehaviour: 2351 | m_ObjectHideFlags: 0 2352 | m_CorrespondingSourceObject: {fileID: 0} 2353 | m_PrefabInstance: {fileID: 0} 2354 | m_PrefabAsset: {fileID: 0} 2355 | m_GameObject: {fileID: 2098958157} 2356 | m_Enabled: 1 2357 | m_EditorHideFlags: 0 2358 | m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 2359 | m_Name: 2360 | m_EditorClassIdentifier: 2361 | m_FirstSelected: {fileID: 0} 2362 | m_sendNavigationEvents: 1 2363 | m_DragThreshold: 5 2364 | --- !u!4 &2098958161 2365 | Transform: 2366 | m_ObjectHideFlags: 0 2367 | m_CorrespondingSourceObject: {fileID: 0} 2368 | m_PrefabInstance: {fileID: 0} 2369 | m_PrefabAsset: {fileID: 0} 2370 | m_GameObject: {fileID: 2098958157} 2371 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 2372 | m_LocalPosition: {x: 0, y: 0, z: 0} 2373 | m_LocalScale: {x: 1, y: 1, z: 1} 2374 | m_Children: [] 2375 | m_Father: {fileID: 0} 2376 | m_RootOrder: 4 2377 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 2378 | --- !u!1 &2133932543 2379 | GameObject: 2380 | m_ObjectHideFlags: 0 2381 | m_CorrespondingSourceObject: {fileID: 0} 2382 | m_PrefabInstance: {fileID: 0} 2383 | m_PrefabAsset: {fileID: 0} 2384 | serializedVersion: 6 2385 | m_Component: 2386 | - component: {fileID: 2133932548} 2387 | - component: {fileID: 2133932547} 2388 | - component: {fileID: 2133932546} 2389 | - component: {fileID: 2133932545} 2390 | - component: {fileID: 2133932544} 2391 | - component: {fileID: 2133932549} 2392 | m_Layer: 0 2393 | m_Name: Main Camera 2394 | m_TagString: MainCamera 2395 | m_Icon: {fileID: 0} 2396 | m_NavMeshLayer: 0 2397 | m_StaticEditorFlags: 0 2398 | m_IsActive: 1 2399 | --- !u!81 &2133932544 2400 | AudioListener: 2401 | m_ObjectHideFlags: 0 2402 | m_CorrespondingSourceObject: {fileID: 0} 2403 | m_PrefabInstance: {fileID: 0} 2404 | m_PrefabAsset: {fileID: 0} 2405 | m_GameObject: {fileID: 2133932543} 2406 | m_Enabled: 1 2407 | --- !u!124 &2133932545 2408 | Behaviour: 2409 | m_ObjectHideFlags: 0 2410 | m_CorrespondingSourceObject: {fileID: 0} 2411 | m_PrefabInstance: {fileID: 0} 2412 | m_PrefabAsset: {fileID: 0} 2413 | m_GameObject: {fileID: 2133932543} 2414 | m_Enabled: 1 2415 | --- !u!92 &2133932546 2416 | Behaviour: 2417 | m_ObjectHideFlags: 0 2418 | m_CorrespondingSourceObject: {fileID: 0} 2419 | m_PrefabInstance: {fileID: 0} 2420 | m_PrefabAsset: {fileID: 0} 2421 | m_GameObject: {fileID: 2133932543} 2422 | m_Enabled: 1 2423 | --- !u!20 &2133932547 2424 | Camera: 2425 | m_ObjectHideFlags: 0 2426 | m_CorrespondingSourceObject: {fileID: 0} 2427 | m_PrefabInstance: {fileID: 0} 2428 | m_PrefabAsset: {fileID: 0} 2429 | m_GameObject: {fileID: 2133932543} 2430 | m_Enabled: 1 2431 | serializedVersion: 2 2432 | m_ClearFlags: 2 2433 | m_BackGroundColor: {r: 0.2784314, g: 0.2784314, b: 0.2784314, a: 0.019607844} 2434 | m_projectionMatrixMode: 1 2435 | m_SensorSize: {x: 36, y: 24} 2436 | m_LensShift: {x: 0, y: 0} 2437 | m_GateFitMode: 2 2438 | m_FocalLength: 50 2439 | m_NormalizedViewPortRect: 2440 | serializedVersion: 2 2441 | x: 0 2442 | y: 0 2443 | width: 1 2444 | height: 1 2445 | near clip plane: 0.3 2446 | far clip plane: 1000 2447 | field of view: 60 2448 | orthographic: 0 2449 | orthographic size: 5 2450 | m_Depth: -1 2451 | m_CullingMask: 2452 | serializedVersion: 2 2453 | m_Bits: 4294967295 2454 | m_RenderingPath: -1 2455 | m_TargetTexture: {fileID: 0} 2456 | m_TargetDisplay: 0 2457 | m_TargetEye: 3 2458 | m_HDR: 0 2459 | m_AllowMSAA: 1 2460 | m_AllowDynamicResolution: 0 2461 | m_ForceIntoRT: 0 2462 | m_OcclusionCulling: 1 2463 | m_StereoConvergence: 10 2464 | m_StereoSeparation: 0.022 2465 | --- !u!4 &2133932548 2466 | Transform: 2467 | m_ObjectHideFlags: 0 2468 | m_CorrespondingSourceObject: {fileID: 0} 2469 | m_PrefabInstance: {fileID: 0} 2470 | m_PrefabAsset: {fileID: 0} 2471 | m_GameObject: {fileID: 2133932543} 2472 | m_LocalRotation: {x: 0.3037333, y: 0.3317402, z: -0.113742515, w: 0.8858652} 2473 | m_LocalPosition: {x: -1.4908745, y: 1.7637774, z: -1.7114321} 2474 | m_LocalScale: {x: 1, y: 1, z: 1} 2475 | m_Children: [] 2476 | m_Father: {fileID: 0} 2477 | m_RootOrder: 2 2478 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 2479 | --- !u!114 &2133932549 2480 | MonoBehaviour: 2481 | m_ObjectHideFlags: 0 2482 | m_CorrespondingSourceObject: {fileID: 0} 2483 | m_PrefabInstance: {fileID: 0} 2484 | m_PrefabAsset: {fileID: 0} 2485 | m_GameObject: {fileID: 2133932543} 2486 | m_Enabled: 1 2487 | m_EditorHideFlags: 0 2488 | m_Script: {fileID: 11500000, guid: 11ce85d160a6b3047bca4f61c331061f, type: 3} 2489 | m_Name: 2490 | m_EditorClassIdentifier: 2491 | m_Name: 2492 | m_EditorClassIdentifier: 2493 | orbitSpeed: 10 2494 | zoomSpeed: 0.75 2495 | -------------------------------------------------------------------------------- /Samples/Demo Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af2face7836395041aae66ace0b0c4bb 3 | timeCreated: 1428182457 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /bin~/.htaccess: -------------------------------------------------------------------------------- 1 | Options +FollowSymLinks 2 | RewriteEngine on 3 | 4 | RewriteCond %{HTTP:Accept-encoding} gzip 5 | RewriteRule (.*)Release(.*)\.js $1Compressed$2\.jsgz [L] 6 | RewriteRule (.*)Release(.*)\.data $1Compressed$2\.datagz [L] 7 | RewriteRule (.*)Release(.*)\.mem $1Compressed$2\.memgz [L] 8 | RewriteRule (.*)Release(.*)\.unity3d $1Compressed$2\.unity3dgz [L] 9 | AddEncoding gzip .jsgz 10 | AddEncoding gzip .datagz 11 | AddEncoding gzip .memgz 12 | AddEncoding gzip .unity3dgz -------------------------------------------------------------------------------- /bin~/Compressed/UnityConfig.jsgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Compressed/UnityConfig.jsgz -------------------------------------------------------------------------------- /bin~/Compressed/bin.datagz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Compressed/bin.datagz -------------------------------------------------------------------------------- /bin~/Compressed/bin.html.memgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Compressed/bin.html.memgz -------------------------------------------------------------------------------- /bin~/Compressed/bin.jsgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Compressed/bin.jsgz -------------------------------------------------------------------------------- /bin~/Compressed/fileloader.jsgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Compressed/fileloader.jsgz -------------------------------------------------------------------------------- /bin~/Release/UnityConfig.js: -------------------------------------------------------------------------------- 1 | function CompatibilityCheck() 2 | { 3 | // Identify user agent 4 | var browser = (function(){ 5 | var ua= navigator.userAgent, tem, 6 | M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; 7 | if(/trident/i.test(M[1])){ 8 | tem= /\brv[ :]+(\d+)/g.exec(ua) || []; 9 | return 'IE '+(tem[1] || ''); 10 | } 11 | if(M[1]=== 'Chrome'){ 12 | tem= ua.match(/\bOPR\/(\d+)/) 13 | if(tem!= null) return 'Opera '+tem[1]; 14 | } 15 | M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?']; 16 | if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]); 17 | return M.join(' '); 18 | })(); 19 | 20 | var hasWebGL = (function(){ 21 | if (!window.WebGLRenderingContext) 22 | { 23 | // Browser has no idea what WebGL is. Suggest they 24 | // get a new browser by presenting the user with link to 25 | // http://get.webgl.org 26 | return 0; 27 | } 28 | 29 | var canvas = document.createElement('canvas'); 30 | var gl = canvas.getContext("webgl"); 31 | if (!gl) 32 | { 33 | gl = canvas.getContext("experimental-webgl"); 34 | if (!gl) 35 | { 36 | // Browser could not initialize WebGL. User probably needs to 37 | // update their drivers or get a new browser. Present a link to 38 | // http://get.webgl.org/troubleshooting 39 | return 0; 40 | } 41 | } 42 | return 1; 43 | })(); 44 | 45 | // Check for mobile browsers 46 | var mobile = (function(a){ 47 | return (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) 48 | })(navigator.userAgent||navigator.vendor||window.opera); 49 | 50 | // Check for WebGL. Allow running without WebGL on development players for running tests on build farm. 51 | if (!0 && !hasWebGL) 52 | { 53 | alert("You need a browser which supports WebGL to run this content. Try installing Firefox."); 54 | window.history.back(); 55 | } 56 | // Show warnings if needed. 57 | else if (mobile) 58 | { 59 | if (!confirm("Please note that Unity WebGL is not currently supported on mobiles. Press Ok if you wish to continue anyways.")) 60 | window.history.back(); 61 | } 62 | else if (browser.indexOf("Firefox") == -1 && browser.indexOf("Chrome") == -1 && browser.indexOf("Safari") == -1) 63 | { 64 | if (!confirm("Please note that your browser is not currently supported for this Unity WebGL content. Try installing Firefox, or press Ok if you wish to continue anyways.")) 65 | window.history.back(); 66 | } 67 | } 68 | 69 | CompatibilityCheck(); 70 | 71 | var didShowErrorMessage = false; 72 | window.onerror = function UnityErrorHandler(err, url, line) 73 | { 74 | console.log ("Invoking error handler due to\n"+err); 75 | if (typeof dump == 'function') 76 | dump ("Invoking error handler due to\n"+err); 77 | if (didShowErrorMessage) 78 | return; 79 | 80 | didShowErrorMessage = true; 81 | if (err.indexOf("DISABLE_EXCEPTION_CATCHING") != -1) 82 | { 83 | alert ("An exception has occured, but exception handling has been disabled in this build. If you are the developer of this content, enable exceptions in your project's WebGL player settings to be able to catch the exception or see the stack trace."); 84 | return; 85 | } 86 | if (err.indexOf("uncaught exception: abort()") != -1) 87 | { 88 | if (err.indexOf("Runtime.dynamicAlloc") != -1) 89 | { 90 | alert ("Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings."); 91 | return; 92 | } 93 | } 94 | if (err.indexOf("Invalid array buffer length") != -1) 95 | { 96 | alert ("The browser could not allocate enough memory for the WebGL content. If you are the developer of this content, try allocating less memory to your WebGL build in the WebGL player settings."); 97 | return; 98 | } 99 | if (err.indexOf("Script error.") != -1 && document.URL.indexOf("file:") == 0) 100 | { 101 | alert ("It seems your browser does not support running Unity WebGL content from file:// urls. Please upload it to an http server, or try a different browser."); 102 | return; 103 | } 104 | alert ("An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:\n"+err); 105 | } 106 | 107 | function SetFullscreen(fullscreen) 108 | { 109 | if (typeof JSEvents === 'undefined') 110 | { 111 | console.log ("Player not loaded yet."); 112 | return; 113 | } 114 | var tmp = JSEvents.canPerformEventHandlerRequests; 115 | JSEvents.canPerformEventHandlerRequests = function(){return 1;}; 116 | Module.cwrap('SetFullscreen', 'void', ['number'])(fullscreen); 117 | JSEvents.canPerformEventHandlerRequests = tmp; 118 | } 119 | -------------------------------------------------------------------------------- /bin~/Release/bin.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Release/bin.data -------------------------------------------------------------------------------- /bin~/Release/bin.html.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/Release/bin.html.mem -------------------------------------------------------------------------------- /bin~/Release/fileloader.js: -------------------------------------------------------------------------------- 1 | 2 | var Module; 3 | if (typeof Module === 'undefined') Module = eval('(function() { try { return Module || {} } catch(e) { return {} } })()'); 4 | if (!Module.expectedDataFileDownloads) { 5 | Module.expectedDataFileDownloads = 0; 6 | Module.finishedDataFileDownloads = 0; 7 | } 8 | Module.expectedDataFileDownloads++; 9 | (function() { 10 | 11 | var PACKAGE_PATH; 12 | if (typeof window === 'object') { 13 | PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/'); 14 | } else { 15 | // worker 16 | PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/'); 17 | } 18 | var PACKAGE_NAME = 'bin.data'; 19 | var REMOTE_PACKAGE_BASE = 'bin.data'; 20 | if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) { 21 | Module['locateFile'] = Module['locateFilePackage']; 22 | Module.printErr('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)'); 23 | } 24 | var REMOTE_PACKAGE_NAME = typeof Module['locateFile'] === 'function' ? 25 | Module['locateFile'](REMOTE_PACKAGE_BASE) : 26 | ((Module['filePackagePrefixURL'] || '') + REMOTE_PACKAGE_BASE); 27 | var REMOTE_PACKAGE_SIZE = 2538840; 28 | var PACKAGE_UUID = 'f81cabfd-2826-4558-b956-a544222134ef'; 29 | 30 | function fetchRemotePackage(packageName, packageSize, callback, errback) { 31 | var xhr = new XMLHttpRequest(); 32 | xhr.open('GET', packageName, true); 33 | xhr.responseType = 'arraybuffer'; 34 | xhr.onprogress = function(event) { 35 | var url = packageName; 36 | var size = packageSize; 37 | if (event.total) size = event.total; 38 | if (event.loaded) { 39 | if (!xhr.addedTotal) { 40 | xhr.addedTotal = true; 41 | if (!Module.dataFileDownloads) Module.dataFileDownloads = {}; 42 | Module.dataFileDownloads[url] = { 43 | loaded: event.loaded, 44 | total: size 45 | }; 46 | } else { 47 | Module.dataFileDownloads[url].loaded = event.loaded; 48 | } 49 | var total = 0; 50 | var loaded = 0; 51 | var num = 0; 52 | for (var download in Module.dataFileDownloads) { 53 | var data = Module.dataFileDownloads[download]; 54 | total += data.total; 55 | loaded += data.loaded; 56 | num++; 57 | } 58 | total = Math.ceil(total * Module.expectedDataFileDownloads/num); 59 | if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')'); 60 | } else if (!Module.dataFileDownloads) { 61 | if (Module['setStatus']) Module['setStatus']('Downloading data...'); 62 | } 63 | }; 64 | xhr.onload = function(event) { 65 | var packageData = xhr.response; 66 | callback(packageData); 67 | }; 68 | xhr.send(null); 69 | }; 70 | 71 | function handleError(error) { 72 | console.error('package error:', error); 73 | }; 74 | 75 | var fetched = null, fetchedCallback = null; 76 | fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) { 77 | if (fetchedCallback) { 78 | fetchedCallback(data); 79 | fetchedCallback = null; 80 | } else { 81 | fetched = data; 82 | } 83 | }, handleError); 84 | 85 | function runWithFS() { 86 | 87 | function assert(check, msg) { 88 | if (!check) throw msg + new Error().stack; 89 | } 90 | Module['FS_createPath']('/', 'Resources', true, true); 91 | 92 | function DataRequest(start, end, crunched, audio) { 93 | this.start = start; 94 | this.end = end; 95 | this.crunched = crunched; 96 | this.audio = audio; 97 | } 98 | DataRequest.prototype = { 99 | requests: {}, 100 | open: function(mode, name) { 101 | this.name = name; 102 | this.requests[name] = this; 103 | Module['addRunDependency']('fp ' + this.name); 104 | }, 105 | send: function() {}, 106 | onload: function() { 107 | var byteArray = this.byteArray.subarray(this.start, this.end); 108 | 109 | this.finish(byteArray); 110 | 111 | }, 112 | finish: function(byteArray) { 113 | var that = this; 114 | Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() { 115 | Module['removeRunDependency']('fp ' + that.name); 116 | }, function() { 117 | if (that.audio) { 118 | Module['removeRunDependency']('fp ' + that.name); // workaround for chromium bug 124926 (still no audio with this, but at least we don't hang) 119 | } else { 120 | Module.printErr('Preloading file ' + that.name + ' failed'); 121 | } 122 | }, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change 123 | this.requests[this.name] = null; 124 | }, 125 | }; 126 | new DataRequest(0, 164616, 0, 0).open('GET', '/mainData'); 127 | new DataRequest(164616, 164964, 0, 0).open('GET', '/methods_pointedto_by_uievents.xml'); 128 | new DataRequest(164964, 464360, 0, 0).open('GET', '/sharedassets0.assets'); 129 | new DataRequest(464360, 2024732, 0, 0).open('GET', '/Resources/unity_default_resources'); 130 | new DataRequest(2024732, 2538840, 0, 0).open('GET', '/Resources/unity_builtin_extra'); 131 | 132 | function processPackageData(arrayBuffer) { 133 | Module.finishedDataFileDownloads++; 134 | assert(arrayBuffer, 'Loading data file failed.'); 135 | var byteArray = new Uint8Array(arrayBuffer); 136 | var curr; 137 | 138 | // Reuse the bytearray from the XHR as the source for file reads. 139 | DataRequest.prototype.byteArray = byteArray; 140 | DataRequest.prototype.requests["/mainData"].onload(); 141 | DataRequest.prototype.requests["/methods_pointedto_by_uievents.xml"].onload(); 142 | DataRequest.prototype.requests["/sharedassets0.assets"].onload(); 143 | DataRequest.prototype.requests["/Resources/unity_default_resources"].onload(); 144 | DataRequest.prototype.requests["/Resources/unity_builtin_extra"].onload(); 145 | Module['removeRunDependency']('datafile_bin.data'); 146 | 147 | }; 148 | Module['addRunDependency']('datafile_bin.data'); 149 | 150 | if (!Module.preloadResults) Module.preloadResults = {}; 151 | 152 | Module.preloadResults[PACKAGE_NAME] = {fromCache: false}; 153 | if (fetched) { 154 | processPackageData(fetched); 155 | fetched = null; 156 | } else { 157 | fetchedCallback = processPackageData; 158 | } 159 | 160 | } 161 | if (Module['calledRun']) { 162 | runWithFS(); 163 | } else { 164 | if (!Module['preRun']) Module['preRun'] = []; 165 | Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it 166 | } 167 | 168 | })(); 169 | -------------------------------------------------------------------------------- /bin~/TemplateData/UnityProgress.js: -------------------------------------------------------------------------------- 1 | function UnityProgress (dom) { 2 | this.progress = 0.0; 3 | this.message = ""; 4 | this.dom = dom; 5 | 6 | var parent = dom.parentNode; 7 | 8 | var background = document.createElement("div"); 9 | background.style.background = "#4D4D4D"; 10 | background.style.position = "absolute"; 11 | parent.appendChild(background); 12 | this.background = background; 13 | 14 | var logoImage = document.createElement("img"); 15 | logoImage.src = "TemplateData/progresslogo.png"; 16 | logoImage.style.position = "absolute"; 17 | parent.appendChild(logoImage); 18 | this.logoImage = logoImage; 19 | 20 | var progressFrame = document.createElement("img"); 21 | progressFrame.src = "TemplateData/loadingbar.png"; 22 | progressFrame.style.position = "absolute"; 23 | parent.appendChild(progressFrame); 24 | this.progressFrame = progressFrame; 25 | 26 | var progressBar = document.createElement("img"); 27 | progressBar.src = "TemplateData/fullbar.png"; 28 | progressBar.style.position = "absolute"; 29 | parent.appendChild(progressBar); 30 | this.progressBar = progressBar; 31 | 32 | var messageArea = document.createElement("p"); 33 | messageArea.style.position = "absolute"; 34 | parent.appendChild(messageArea); 35 | this.messageArea = messageArea; 36 | 37 | 38 | this.SetProgress = function (progress) { 39 | if (this.progress < progress) 40 | this.progress = progress; 41 | this.messageArea.style.display = "none"; 42 | this.progressFrame.style.display = "inline"; 43 | this.progressBar.style.display = "inline"; 44 | this.Update(); 45 | } 46 | 47 | this.SetMessage = function (message) { 48 | this.message = message; 49 | this.background.style.display = "inline"; 50 | this.logoImage.style.display = "inline"; 51 | this.progressFrame.style.display = "none"; 52 | this.progressBar.style.display = "none"; 53 | this.Update(); 54 | } 55 | 56 | this.Clear = function() { 57 | this.background.style.display = "none"; 58 | this.logoImage.style.display = "none"; 59 | this.progressFrame.style.display = "none"; 60 | this.progressBar.style.display = "none"; 61 | } 62 | 63 | this.Update = function() { 64 | this.background.style.top = this.dom.offsetTop + 'px'; 65 | this.background.style.left = this.dom.offsetLeft + 'px'; 66 | this.background.style.width = this.dom.offsetWidth + 'px'; 67 | this.background.style.height = this.dom.offsetHeight + 'px'; 68 | 69 | var logoImg = new Image(); 70 | logoImg.src = this.logoImage.src; 71 | var progressFrameImg = new Image(); 72 | progressFrameImg.src = this.progressFrame.src; 73 | 74 | this.logoImage.style.top = this.dom.offsetTop + (this.dom.offsetHeight * 0.5 - logoImg.height * 0.5) + 'px'; 75 | this.logoImage.style.left = this.dom.offsetLeft + (this.dom.offsetWidth * 0.5 - logoImg.width * 0.5) + 'px'; 76 | this.logoImage.style.width = logoImg.width+'px'; 77 | this.logoImage.style.height = logoImg.height+'px'; 78 | 79 | this.progressFrame.style.top = this.dom.offsetTop + (this.dom.offsetHeight * 0.5 + logoImg.height * 0.5 + 10) + 'px'; 80 | this.progressFrame.style.left = this.dom.offsetLeft + (this.dom.offsetWidth * 0.5 - progressFrameImg.width * 0.5) + 'px'; 81 | this.progressFrame.width = progressFrameImg.width; 82 | this.progressFrame.height = progressFrameImg.height; 83 | 84 | this.progressBar.style.top = this.progressFrame.style.top; 85 | this.progressBar.style.left = this.progressFrame.style.left; 86 | this.progressBar.width = progressFrameImg.width * Math.min(this.progress, 1); 87 | this.progressBar.height = progressFrameImg.height; 88 | 89 | this.messageArea.style.top = this.progressFrame.style.top; 90 | this.messageArea.style.left = 0; 91 | this.messageArea.style.width = '100%'; 92 | this.messageArea.style.textAlign = 'center'; 93 | this.messageArea.innerHTML = this.message; 94 | } 95 | 96 | this.Update (); 97 | } -------------------------------------------------------------------------------- /bin~/TemplateData/default-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/default-cover.jpg -------------------------------------------------------------------------------- /bin~/TemplateData/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/favicon.ico -------------------------------------------------------------------------------- /bin~/TemplateData/fullbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/fullbar.png -------------------------------------------------------------------------------- /bin~/TemplateData/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/fullscreen.png -------------------------------------------------------------------------------- /bin~/TemplateData/loadingbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/loadingbar.png -------------------------------------------------------------------------------- /bin~/TemplateData/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/logo.png -------------------------------------------------------------------------------- /bin~/TemplateData/progresslogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/TemplateData/progresslogo.png -------------------------------------------------------------------------------- /bin~/TemplateData/style.css: -------------------------------------------------------------------------------- 1 | 2 | /**************************************** 3 | ==== RESETS 4 | ****************************************/ 5 | 6 | html,body,div,canvas { margin: 0; padding: 0; } 7 | ::-moz-selection { color: #333; text-shadow: none; } 8 | ::selection { color: #333; text-shadow: none; } 9 | .clear:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } 10 | .clear { display: inline-table; clear: both; } 11 | /* Hides from IE-mac \*/ * html .clear { height: 1%; } .clear { display: block; } /* End hide from IE-mac */ 12 | 13 | /**************************************** 14 | ==== LAYOUT 15 | ****************************************/ 16 | 17 | html, body { width: 100%; height: 100%; font-family: Helvetica, Verdana, Arial, sans-serif; } 18 | body { } 19 | p.header, p.footer { display: none; } 20 | div.logo { width: 196px; height: 38px; float: left; background: url(logo.png) 0 0 no-repeat; position: relative; z-index: 10; } 21 | div.title { height: 38px; line-height: 38px; padding: 0 10px; margin: 0 1px 0 0; float: right; color: #333; text-align: right; font-size: 18px; position: relative; z-index: 10; } 22 | .template-wrap { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } 23 | .template-wrap canvas { margin: 0 0 10px 0; position: relative; z-index: 9; box-shadow: 0 10px 30px rgba(0,0,0,0.2); -moz-box-shadow: 0 10px 30px rgba(0,0,0,0.2); } 24 | .fullscreen { float: right; position: relative; z-index: 10; } 25 | 26 | body.template { } 27 | .template .template-wrap { } 28 | .template .template-wrap canvas { } 29 | -------------------------------------------------------------------------------- /bin~/images/subtract.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karl-/pb_CSG/9b35e1c90ee2d3fe1b7b881a25242f47e975d94b/bin~/images/subtract.PNG -------------------------------------------------------------------------------- /bin~/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Unity WebGL Player | pb_CSG 7 | 10 | 11 | 12 | 13 | 54 | 55 | 56 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "co.parabox.csg", 3 | "displayName": "pb_CSG", 4 | "version": "2.0.0", 5 | "unity": "2018.3", 6 | "description": "A C# port of CSG.js by Evan W (http://evanw.github.io/csg.js/).", 7 | "keywords": [], 8 | "samples": [ 9 | { 10 | "displayName": "CSG Demo Scene", 11 | "description": "Demonstrates usage of CSG class.", 12 | "path": "Samples~" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f730172331ca44ca680262b4054ad977 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------