namespace UnityEditor.Polybrush
{
///
/// Tool enum for brush modes.
///
internal enum BrushTool
{
None = 0,
RaiseLower = 1,
Smooth = 2,
Paint = 3,
Prefab = 4,
Texture = 5
}
///
/// Utility class for BrushTool enum
///
internal static class BrushToolUtility
{
///
/// Return the Brush Mode type corresponding to a BrushTool enum value
///
///
/// The Type of the tool
internal static System.Type GetModeType(this BrushTool tool)
{
switch(tool)
{
case BrushTool.RaiseLower:
return typeof(BrushModeRaiseLower);
case BrushTool.Smooth:
return typeof(BrushModeSmooth);
case BrushTool.Paint:
return typeof(BrushModePaint);
case BrushTool.Prefab:
return typeof(BrushModePrefab);
case BrushTool.Texture:
return typeof(BrushModeTexture);
}
return null;
}
}
}