MD Package Technical & APi Documentation
MDM_SculptingLite :: MD_ModifierBase
Namespace: MDPackage.Modifiers
A lite version of a complete sculpting solution for mesh renderers in Unity editor / at runtime.
Visit link for pro version.

The input is not handled by default, as the Unity Engine has many options for handling input and controls in general.
MD-Package components that contain some input features consist of 'Input Hookup' properties that handle the input in a generic way.
You can set these properties from your own input system. The component will display more information about the input setup, so please follow up on this information.
You can find all the input-hookup properties below.
Read more here (Online documentation slide)
Public Methods
// Essentials

// Sculpt current mesh by specific parameters
public void Sculpting_DoSculpting(Vector3 worldPosition, Vector3 directionLocal, float radius, float intensity, BrushStatus brushState)
// Setup essential sculpting fields manually (This is helpful if you don't wont to go through field-by-field)
public void Sculpting_SetupEssentials(float radius, float intensity, bool showBrush, Vector3 brushPosition, Vector3 brushRotationDirection, BrushStatus status, SculptingMode mode)
// Capture & record any button control UP/has been released to update mesh collider, recalculate bounds/normals and pause thread (if possible)
public void Sculpting_RecordControlUp()
// Capture & record any button control DOWN/has been pressed to record history and resume thread (if possible)
public void Sculpting_RecordControlDown()

// History Management

// Record current vertex positions to the history
public void Sculpting_RecordHistory()
// Make a step forward/backward in the history by the specified 'jumpToRecord' index. Type -1 for default = jump to the latest history record
public void Sculpting_Undo(int jumpToRecordIndex)
// Default undo method - make a step backward by ^1
public void Sculpting_Undo()

// Mesh Collider

// Refresh mesh collider at runtime
public void Sculpting_RefreshMeshCollider()

// Brush Management

// Change brush size by float value/ UI.Slider value
public void Sculpting_ChangeBrushSize(float size)
// Change brush strength by float value/ UI.Slider value
public void Sculpting_ChangeBrushIntensity(float strength)
// Change stylize intensity by float value/ UI.Slider value
public void Sculpting_ChangeStylizeIntensity(float intens)
// Change smooth intensity by float value/ UI.Slider value
public void Sculpting_ChangeSmoothIntensity(int intens)
// Change brush state by index value [0 = None, 1 = Raise, 2 = Lower, 3 = Revert...]
public void Sculpting_ChangeBrushStatus(int StateIndex)
Public Fields and Properties
// Input Hookups - use these to hookup your own input system

// Use this input hookup for cursor/touch world screen position
public Vector3 InputHook_CursorScreenPosition { get; set; }

public bool InputHook_Lower { get; set; }
public bool InputHook_Raise { get; set; }
public bool InputHook_Revert { get; set; }
public bool InputHook_Noise { get; set; }
public bool InputHook_Smooth { get; set; }
public bool InputHook_Stylize { get; set; }

public bool InputHook_GenericNonPCButton { get; set; }

// Essentials
public bool sculptingMobileSupport = false;

public bool sculptingRecalculateNormalsOnRelease = true;
public bool sculptingUpdateColliderAfterRelease = true;

// Brush
public bool sculptingUseBrushProjection = true;
public GameObject sculptingBrushProjection;
public bool sculptingBrushProjectionAutomaticallyCreated = false;

public float sculptingBrushSize = 0.5f;
public float sculptingBrushIntensity = 0.05f;

public BrushStatus sculptingBrushStatus = BrushStatus.None;

//VerticesDirection   Sets the direction by vertice normals
//BrushDirection   Sets the direction by brush rotation
//CustomDirection   Sets the direction by custom euler values
//CustomDirectionObject  Sets the direction by specific object's local direction
//InternalScriptDirection Sets the direction by internal script (programmer may declare an input for the direction right in the Sculpting method)
public SculptingMode sculptingMode = SculptingMode.BrushDirection;

public Vector3 sculptingCustomDirection;

public bool sculptingEnableHeightLimitations = false;
public Vector2 sculptingHeightLimitations;
public bool sculptingEnableDistanceLimitations = false;
public float sculptingDistanceLimitation = 1.0f;

public CustomDirObjDirection sculptingCustomDirObjDirection;
public GameObject sculptingCustomDirectionObject;
public InterpolationType sculptingInterpolationType = InterpolationType.Exponential;

// > Runtime settings - input
public bool sculptingUseInput = true;
public bool sculptingVRInput = false;
public bool sculptingUseRaiseFunct = true;
public bool sculptingUseLowerFunct = true;
public bool sculptingUseRevertFunct = false;
public bool sculptingUseNoiseFunct = false;
public bool sculptingUseSmoothFunct = false;
public bool sculptingUseStylizeFunct = false;

// Selected input features
public NoiseTypes sculptingNoiseTypes = NoiseTypes.XYZ;
[Range(0.01f,0.99f)] 
public float sculptingStylizeIntensity = 0.65f;
[Range(0.01f, 1f)] 
public float sculptingSmoothIntensity = 0.5f;
public SmoothingType sculptingSmoothingType = SmoothingType.HcFilter;

// > Other essentials
public Camera sculptingCameraCache;
public bool sculptingFromCursor = true;
public Transform sculptingOriginTransform;
public LayerMask sculptingLayerMask = ~0;

// History
public bool sculptingRecordHistory = false;
public List<HistoryRecords> SculptingHistoryRecords { get; }
public int SculptingMaxHistoryRecords { get; set; }
Examples
The following paragraphs contain SculptingLite modifier used in a practical example - create a sculpting editor at runtime.
Hence the custom input handling. You can adapt your own input system.
using UnityEngine;
using MDPackage.Modifiers;

[RequireComponent(typeof(MeshFilter))]
public class SampleScript : MonoBehaviour
{
private MDM_SculptingLite sculpting;

private void Start()
 {
  // Add/create a sculptingLite modifier to this object
  sculpting = gameObject.AddComponent<MDM_SculptingLite>();
  // Use normals smoothing angle for smoother results
  sculpting.useNormalSmoothingAngle = true;
  // Update collider
  sculpting.Sculpting_RefreshMeshCollider();
  // Choose the following sculpting input features
  sculpting.sculptingUseInput = true;
  sculpting.sculptingUseRaiseFunct = true;
  sculpting.sculptingUseLowerFunct = true;
  sculpting.sculptingUseRevertFunct = true;
  // Set brush base settings
  sculpting.sculptingBrushIntensity = 0.5f;
  sculpting.sculptingBrushSize = 1f;
 }

// Handle input - adapt your own input system
private void Update()
 {
  if (sculpting == null)
   return;

  // Only PC-mouse
  sculpting.InputHook_CursorScreenPosition = Input.mousePosition;
  sculpting.InputHook_Raise = Input.GetKey(KeyCode.Mouse0);
  sculpting.InputHook_Lower = Input.GetKey(KeyCode.Mouse1);
  sculpting.InputHook_Revert = Input.GetKey(KeyCode.Mouse2);
 }
}
The following paragraphs contain SculptingLite modifier used in a practical example - create a custom sculpting raycast at runtime.
using UnityEngine;
using MDPackage.Modifiers;

[RequireComponent(typeof(MeshFilter))]
public class SampleScript : MonoBehaviour
{
private MDM_SculptingLite sculpting;

// Cache camera!
public Camera mainCam;
 [Space]
public float brushSize = 0.35f;
public float brushIntensity = 0.1f;

private void Start()
 {
  // Add/create a sculptingLite modifier to this object
  sculpting = gameObject.AddComponent<MDM_SculptingLite>();
  // Disable input by default as we are going to use a 'custom sculpting'
  sculpting.sculptingUseInput = false;
  // Update collider
  sculpting.Sculpting_RefreshMeshCollider();
 }

private void Update()
 {
  if (sculpting == null || mainCam == null)
   return;

  // Create a raycast from camera
  Ray r = mainCam.ScreenPointToRay(Input.mousePosition);
  if (Physics.Raycast(r, out RaycastHit h, 1000))
  {
   // If the raycast hits the sculpting object, process the sculpting
   if (h.collider && h.collider.gameObject == sculpting.gameObject)
   {
    // Set any brush status - Raise/Lower/Revert/Smooth...
    MDM_SculptingLite.BrushStatus status = MDM_SculptingLite.BrushStatus.None;
    if (Input.GetMouseButton(0))
     status = MDM_SculptingLite.BrushStatus.Raise;
    else if (Input.GetMouseButton(1))
     status = MDM_SculptingLite.BrushStatus.Lower;

    // This is required to call to refresh the mesh collider and recalculate bounds/normals
    if (status == MDM_SculptingLite.BrushStatus.None)
     sculpting.Sculpting_RecordControlUp();
    else
     sculpting.Sculpting_RecordControlDown();

    // Process custom sculpting on hit point, hit normal direction, custom brush size and intens, finally a sculpting brush status
    sculpting.Sculpting_DoSculpting(h.point, h.normal, brushSize, -brushIntensity, status);
   }
   else
    sculpting.Sculpting_RecordControlUp();
  }
  else
   sculpting.Sculpting_RecordControlUp();
 }
}