using UnityEngine; using System.Collections; namespace UnityEngine.ProBuilder { /// /// Defines what objects are selectable for the scene tool. /// [System.Flags] public enum SelectMode { /// /// No selection mode defined. /// None = 0 << 0, /// /// Objects are selectable. /// Object = 1 << 0, /// /// Vertices are selectable. /// Vertex = 1 << 1, /// /// Edges are selectable. /// Edge = 1 << 2, /// /// Faces are selectable. /// Face = 1 << 3, /// /// Texture coordinates are selectable. /// TextureFace = 1 << 4, /// /// Texture coordinates are selectable. /// TextureEdge = 1 << 5, /// /// Texture coordinates are selectable. /// TextureVertex = 1 << 6, /// /// Other input tool (Poly Shape editor, Bezier editor, etc) /// InputTool = 1 << 7, /// /// Match any value. /// Any = 0xFFFF } /// /// Element selection mode. /// enum ComponentMode { /// /// Vertices are selectable. /// Vertex = 0x0, /// /// Edges are selectable. /// Edge = 0x1, /// /// Faces are selectable. /// Face = 0x2 } /// /// Defines what the current tool interacts with in the scene view. /// ' internal enum EditLevel { /// /// The transform tools interact with GameObjects. /// Top = 0, /// /// The current tool interacts with mesh geometry (faces, edges, vertices). /// Geometry = 1, /// /// Tools are affecting mesh UVs. This corresponds to UVEditor in-scene editing. /// Texture = 2, /// /// A custom ProBuilder tool mode is engaged. /// Plugin = 3 } /// /// Determines what GameObject flags this object will have. /// enum EntityType { Detail, Occluder, Trigger, Collider, Mover } enum ColliderType { None, BoxCollider, MeshCollider } /// /// Axis used in projecting UVs. /// public enum ProjectionAxis { /// /// Projects on x axis. /// X, /// /// Projects on y axis. /// Y, /// /// Projects on z axis. /// Z, /// /// Projects on -x axis. /// XNegative, /// /// Projects on -y axis. /// YNegative, /// /// Projects on -z axis. /// ZNegative } enum HandleAxis { X = 1 << 0, Y = 1 << 1, Z = 1 << 2, Free = 1 << 3 } /// /// pb_ShapeEditor enum. /// [System.Obsolete("See pb_ShapeType")] enum Shape { Cube, Stair, Prism, Cylinder, Plane, Door, Pipe, Cone, Sprite, Arch, Icosahedron, Torus, Custom } /// /// Human readable axis enum. /// public enum Axis { /// /// X axis. /// Right, /// /// -X axis. /// Left, /// /// Y axis. /// Up, /// /// -Y axis. /// Down, /// /// Z axis. /// Forward, /// /// -Z axis. /// Backward } /// /// Describes the winding order of mesh triangles. /// public enum WindingOrder { /// /// Winding order could not be determined. /// Unknown, /// /// Winding is clockwise (right handed). /// Clockwise, /// /// Winding is counter-clockwise (left handed). /// CounterClockwise } /// /// Describes methods of sorting points in 2d space. /// public enum SortMethod { /// /// Order the vertices clockwise. /// Clockwise, /// /// Order the vertices counter-clockwise. /// CounterClockwise }; /// /// A flag which sets the triangle culling mode. /// [System.Flags] public enum CullingMode { /// /// Both front and back faces are rendered. /// None = 0 << 0, /// /// Back faces are culled. /// Back = 1 << 0, /// /// Front faces are culled. /// Front = 1 << 1, /// /// Both front and back faces are culled. /// FrontBack = Front | Back, } /// /// Defines the behavior of drag selection in the scene view for mesh elements. /// public enum RectSelectMode { /// /// Any mesh element touching the drag rectangle is selected. /// Partial, /// /// Mesh elements must be completely enveloped by the drag rect to be selected. /// Complete } /// /// Describes why a @"UnityEngine.ProBuilder.ProBuilderMesh" is considered to be out of sync with it's UnityEngine.MeshFilter component. /// public enum MeshSyncState { /// /// The MeshFilter mesh is null. /// Null, /// /// The MeshFilter mesh is not owned by the ProBuilderMesh component. Use @"UnityEngine.ProBuilder.ProBuilderMesh.MakeUnique" to remedy. /// /// This is only used in editor. InstanceIDMismatch, /// /// The mesh is valid, but does not have a UV2 channel. /// /// This is only used in editor. Lightmap, /// /// The mesh is in sync. /// InSync } /// /// Mesh attributes bitmask. /// [System.Flags] public enum MeshArrays { /// /// Vertex positions. /// Position = 0x1, /// /// First UV channel. /// Texture0 = 0x2, /// /// Second UV channel. Commonly called UV2 or Lightmap UVs in Unity terms. /// Texture1 = 0x4, /// /// Second UV channel. Commonly called UV2 or Lightmap UVs in Unity terms. /// Lightmap = 0x4, /// /// Third UV channel. /// Texture2 = 0x8, /// /// Vertex UV4. /// Texture3 = 0x10, /// /// Vertex colors. /// Color = 0x20, /// /// Vertex normals. /// Normal = 0x40, /// /// Vertex tangents. /// Tangent = 0x80, /// /// All ProBuilder stored mesh attributes. /// All = 0xFF }; enum IndexFormat { Local = 0x0, Common = 0x1, Both = 0x2 }; /// /// Selectively rebuild and apply mesh attributes to the UnityEngine.Mesh asset. /// /// [System.Flags] public enum RefreshMask { /// /// Textures channel will be rebuilt. /// UV = 0x1, /// /// Colors will be rebuilt. /// Colors = 0x2, /// /// Normals will be recalculated and applied. /// Normals = 0x4, /// /// Tangents will be recalculated and applied. /// Tangents = 0x8, /// /// Re-assign the MeshCollider sharedMesh. /// Collisions = 0x10, /// /// Refresh all optional mesh attributes. /// All = UV | Colors | Normals | Tangents | Collisions }; /// /// Describes the different methods of face extrusion. /// public enum ExtrudeMethod { /// /// Each face is extruded separately. /// IndividualFaces = 0, /// /// Adjacent faces are merged as a group along the averaged normals. /// VertexNormal = 1, /// /// Adjacent faces are merged as a group, but faces are extruded from each face normal. /// FaceNormal = 2 } }