using System;
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
}
///
/// Defines the 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 has.
///
enum EntityType
{
///
/// The "Detail" flag.
///
Detail,
///
/// The "Occluder" flag.
///
Occluder,
///
/// The "Trigger" flag.
///
Trigger,
///
/// The "Collider" flag.
///
Collider,
///
/// The "Mover" flag.
///
Mover
}
///
/// Determines what kind of collider this object has.
///
enum ColliderType
{
///
/// The object has no collider.
///
None,
///
/// The object's collider shape is a box.
///
BoxCollider,
///
/// The object's collider shape matches the mesh shape.
///
MeshCollider
}
///
/// Indicates the axis used for projecting UVs.
///
public enum ProjectionAxis
{
///
/// Projects on the positive x-axis.
///
X,
///
/// Projects on the positive y-axis.
///
Y,
///
/// Projects on the positive z-axis.
///
Z,
///
/// Projects on the negative x-axis.
///
XNegative,
///
/// Projects on the negative y-axis.
///
YNegative,
///
/// Projects on the negative z-axis.
///
ZNegative
}
///
/// Indicates which grid axis is active.
///
enum HandleAxis
{
///
/// X-axis is active.
///
X = 1 << 0,
///
/// Y-axis is active.
///
Y = 1 << 1,
///
/// Z-axis is active.
///
Z = 1 << 2,
///
/// All axes are active simultaneously.
///
Free = 1 << 3
}
///
/// Describes the axis in human-readable terms.
///
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
};
///
/// Defines 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
{
///
/// Selects any mesh element that touches the drag rectangle.
///
Partial,
///
/// Selects only those mesh elements that are completely enveloped by the drag rect.
///
Complete
}
///
/// Describes why a is out of sync with its component.
///
public enum MeshSyncState
{
///
/// The MeshFilter mesh is null.
///
Null,
///
/// The MeshFilter mesh is not owned by the ProBuilderMesh component.
/// To fix this, use .
///
/// This is only used in the Editor.
[Obsolete("InstanceIDMismatch is no longer used. Mesh references are not tracked by Instance ID.")]
InstanceIDMismatch,
///
/// The mesh is valid, but does not have a UV2 channel.
///
/// This is only used in the Editor.
Lightmap,
///
/// The mesh is in sync.
///
InSync,
///
/// The component data is not up to date with the compiled mesh.
///
NeedsRebuild
}
///
/// Defines a bitmask describing the mesh attributes.
///
[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 rebuilds and applies mesh attributes to the UnityEngine.Mesh asset.
///
///
[System.Flags]
public enum RefreshMask
{
///
/// Rebuild textures channel.
///
UV = 0x1,
///
/// Rebuild colors.
///
Colors = 0x2,
///
/// Recalculate and apply normals.
///
Normals = 0x4,
///
/// Recalculate and apply tangents.
///
Tangents = 0x8,
///
/// Re-assign the MeshCollider sharedMesh.
///
Collisions = 0x10,
///
/// Recalculate bounds.
///
Bounds = 0x16,
///
/// Refresh all optional mesh attributes.
///
All = UV | Colors | Normals | Tangents | Collisions | Bounds
};
///
/// Describes the different methods of face extrusion.
///
///
public enum ExtrudeMethod
{
///
/// Extrude each face separately.
///
IndividualFaces = 0,
///
/// Merge adjacent faces as a group along the averaged normals.
///
VertexNormal = 1,
///
/// Merge adjacent faces as a group, but extrude faces from each face normal.
///
FaceNormal = 2
}
}