Features
MD [Mesh Deformation] is a collection of methods with mesh manipulation in Unity for beginners & advanced users. The package contains primitive vertex editor (PC,VR,Mobile), collection of various well-known modifiers, mesh collider refresher, shader-based deformation, physically based meshes, advanced shapes generator and many more. MD Package has many detailed examples, source code & realtime support. Leading on the market for 6 years, verified by many users.
Documentation
The Mesh Deformation package contains a full visual documentation which describes each component.
APi
Application programming interface for each component in the package
Essentials
Essential base component for simple vertex manipulation
Available Methods
public void MPE_UpdateMesh()
Update current mesh state - sync mesh vertices with the generated points & recalculate normals

public void MPE_ShowHideVertices(bool Activation)
Show/ Hide generated points - only if the instance exists
public void MPE_IgnoreRaycastVertices(bool IgnoreRaycast)
Set ‘Ignore Raycast’ layer for generated points or vice-versa

public void MPE_CreateVerticeEditor(bool PassTheVerticeLimit=false)
Create vertice editor – points, if the parameter is true, the recommended vertice limitation will be ignored
public void MPE_ClearVerticeEditor()
Clear created vertice editor – points

public void MPE_CombineMesh()
Combine current mesh with it's submeshes/ children. This will create a brand new game object (safer way to combine)
public void MPE_CombineMeshQuick()
Quick mesh combination with it’s submeshes without any notification and new instance (Less safer way to combine, rather use the method above)

public void MPE_CreateNewReference()
Create a new mesh reference & new game object; all the components on this object will be lost
public void MPE_RestoreMeshToOriginal()
Restore current mesh to the initial state
public void MPE_ConvertFromSkinnedToFilter()
Convert current Skinned Mesh Renderer to the Mesh Filter (if possible)

public void MPE_SmoothMesh(float Intensity)
Smooth current mesh by the specified value; internal built-in modifier
public void MPE_SubdivideMesh(float Level)
Subdivide current mesh by the specified level; internal built-in modifier
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MeshProEditor mpe; // Assign the proper object

     private void Start()
     {
          mpe.MPE_CreateNewReference(); // Create a new mesh reference right after the start
          mpe.MPE_CreateVerticeEditor(); // Generate points on the mesh right after the start
     }
}
Complete vertex manipulation at runtime
Available Methods
If AXIS MODE is enabled
public void AXIS_SwitchTarget(MD_MeshProEditor Target)
Axis method - switch current target for editing
public void AXIS_Undo()
Axis method - undo selection

If AXIS MODE is disabled
public void NON_AXIS_SwitchControlMode(int index)
Switch current control mode by index [1-Grab/Drop,2-Push,3-Pull]
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MeshEditorRuntime mer; // Assign the proper object
    public MeshProEditor target;

     private void Start()
     {
          mer.SwitchTarget(target); // Switches current target for editing
     }
}
Complete vertex manipulation at runtime in VR
Available Methods
public void VREditor_SwitchControlMode(int index)
Change current control mode by index - Move,Pull,Push

public bool VREditor_GetControlInput()
Get current built-in control VR input of the specified attributes. Returns true if pressed

public void GlobalReceived_SetControlInput(bool setInputTo)
Set control input from 3rd party source (such as SteamVR, Oculus or other)
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MeshEditorRuntimeVR mervr; // Assign the proper object

     private void Start()
     {
          if(mervr.VREditor_GetControlInput() == true)
             print("Player is pressing the input...");
     }
}
Essential mesh collider refresher
Available Methods
public void MeshCollider_UpdateMeshCollider()
Update current mesh collider manually
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MeshColliderRefresher mcr; // Assign the proper object

     private void Start()
     {
          mcr.MeshCollider_UpdateMeshCollider();
     }
}
Main global preferences of the package
Available Methods
public static bool CreateNewReference
Boolean static variable; Create new mesh reference if any modifier/ mesh deformator is applied to an object. Recommended to True

public static bool PopupEditorWindow
Popup editor windows if any important notification occurs. Recommended to True

public static bool AutoRecalcNormals
Auto recalculate normals as default

public static bool AlternateNormalsRecalc
If disabled, meshe normals will be recalculated through defaults Unity RecalculateNormals

public static bool AutoRecalcBounds
Auto recalculate bounds as default

public static bool VertexLimit
Maximum vertex count limit to edit. Recommended value is 2000
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     private void Start()
     {
          MD_GlobalPreferenes.CreateNewReference = true; // Create new mesh references after adding new modifiers. However it's recommended to keep the preferences untouched.
          // It's mostly editor-related feature for much user-friendly use
     }
}
Modifiers
Mesh modifier - bend any object to the specific direction
Available Methods
public void Bend_ProcessBend()
Process the bend effect itself. Essential method when the UpdateEveryFrame is disabled

public void Bend_RegisterCurrentState()
Refresh & register current mesh state. This will refresh original vertices to the current state

public void Bend_BendObject(Slider entry)
Bend object by the UI Slider value
public void Bend_BendObject(float entry)
Bend object by the float value
Example
using UnityEngine;
using UnityEngine.UI;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_Bend bend; // Assign the proper object
     public Slider slider; // Assign the proper object

     private void Start()
     {
          bend.Bend_BendObject(slider); // Bend mesh by the included slider value
     }
}
Mesh modifier - twist any object to the specific direction
Available Methods
public void Twist_ProcessTwist()
Process the twist effect itself. Essential method when the UpdateEveryFrame is disabled

public void Twist_RegisterCurrentState()
Refresh & register current mesh state. This will refresh original vertices to the current state

public void Twist_TwistObject(Slider entry)
Twist object by the UI Slider value
public void Twist_TwistObject(float entry)
Twist object by the float value
Example
using UnityEngine;
using UnityEngine.UI;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_Twist twist; // Assign the proper object
     public Slider slider; // Assign the proper object

     private void Start()
     {
          twist.Twist_TwistObject(slider); // Twist mesh by the included slider value
     }
}
Mesh modifier - physically based mesh noise solution
Available Methods
public void MeshNoise_UpdateVerticalNoise()
Process vertical noise - update mesh vertically (Y) only

public void MeshNoise_UpdateGeneralNoise()
Process general noise - update mesh to all directions (XYZ)

public void MeshNoise_ChangeIntensity(Slider entry)
Change overall noise intensity by the UI Slider value
public void MeshNoise_ChangeIntensity(float entry)
Change overall noise intensity by the float value
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_Noise noise; // Assign the proper object

     private void Start()
     {
          noise.MeshNoise_UpdateGeneralNoise();
     }
}
Mesh modifier - FreeFormDeformation solution
Available Methods
public void FFD_UpdateMesh()
Update current mesh by the FFD modifier (if the UpdateEveryFrame is disabled)

public void FFD_RegisterWeights()
Register current weights and 'bake' the mesh

public void FFD_RefreshFFDGrid()
Refresh selected FFD type & its grid

public void FFD_ClearFFDGrid()
Clear FFD grid (if there is any)
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_FFD ffd; // Assign the proper object

     private void Start()
     {
          ffd.FFD_UpdateMesh();
     }

     public void CustomMethod_ClearGrid()
     {
          ffd.FFD_ClearFFDGrid();
     }

     public void CustomMethod_RefreshGrid()
     {
          ffd.FFD_RefreshFFDGrid();
     }
}
Mesh modifier - deform mesh by registered nodes & weights
Available Methods
public void Effector_UpdateMesh()
Update current mesh by the MeshEffector modifier (if the UpdateEveryFrame is disabled)

public void Effector_ApplyWeights()
Apply & register effector weights
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_MeshEffector me; // Assign the proper object

     private void Start()
     {
          me.Effector_UpdateMesh();
     }

     public void CustomMethod_ApplyWeights()
     {
          me.Effector_ApplyWeights();
     }
}
Mesh modifier - deform mesh with any external source such as rigidbody
Available Methods
public void MeshDamage_ModifyMesh(Vector3 point, float radius, float force, Vector3 direction, bool continuousEffect = false)
Modify current mesh manually by point, radius and force. Continuous effect won't bound the mesh from it's initial state

public void MeshDamage_RefreshVertices()
Refresh vertices & register brand new original vertices state

public void MeshDamage_RepairMesh(float speed)
"Repair" deformed mesh by the specified speed value

public void MeshDamage_ModifyMesh(MDM_RaycastEvent RayEvent)
Modify current mesh bycustom RaycastEvent
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_MeshDamage meshToFix; // Assign the proper object
     public float customRadius = 0.5f;
     public float customForce = 0.05f;

     private void Update()
     {
          // If the left mouse button is pressed
          if(Input.GetMouseButtonDown(0))
          {
                 // Create main camera instance & ray origin (from cursor)
                 Camera c = Camera.main;
                 Ray r = c.ScreenPointToRay(Input.mousePosition);
                 if(Physics.Raycast(r, out RaycastHit h))
                 {
                         if(h.collider)
                         {
                                  // If the hit object contains MeshDamage modifier, process the impact with custom values
                                  MDM_MeshDamage md = h.collider.gameObject.GetComponent<MDM_MeshDamage>();
                                  if(md) md.MeshDamage_ModifyMesh(h.point, customRadius, customForce, c.transform.forward);
                         }
                 }
          }
          if(Input.GetKey(KeyCode.F)) // Repair mesh while holding the F key
               meshToFix.MeshDamage_RepairMesh(0.5f);
     }
}
Mesh modifier - traditional simple mesh morphing solution
Available Methods
public void Morpher_ChangeMeshIndex(int entry)
Change current target morph mesh index

public void Morpher_SetBlendValue(Slider entry)
Set current blend value by the UI Slider value

public void Morpher_SetBlendValue(float entry)
Set current blend value by the float value

public void Morpher_RefreshTargetMeshes()
Refresh target meshes assigned in the morpher - target meshes must be registered

public void Morpher_UpdateMorpher()
Update & refresh current morpher manually (If the UpdatePerFrame is disable or just for manual purposes)
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_Morpher m; // Assign the proper object
     public Mesh[] targetMeshes;

     private void Start()
     {
          m.ppTargetMorphMeshes = targetMeshes;
          m.Morpher_RefreshTargetMeshes();
          m.Morpher_UpdateMorpher();
     }
}
Mesh modifier - simple physically-based surface simulator
Available Methods
public void InteractiveSurface_ModifyMesh(Vector3 AtPoint, float Radius, Vector3 Direction)
Modify mesh surface with specific point, size and vertice direction

public void InteractiveSurface_ResetSurface()
Reset current surface (Reset all vertices to the starting position)

public void InteractiveSurface_ModifyMesh(MDM_RaycastEvent RayEvent)
Modify current mesh by custom RaycastEvent
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_InteractiveSurface m; // Assign the proper object
     public float radius = 0.5f;

     public void CustomMethod_ResetSurface()
     {
          m.InteractiveSurface_ResetSurface();
     }

     private void Update()
     {
          // Draw with cursor onto specified InteractiveSurface by clicking the left mouse button
          if(Input.GetMouseButton(0))
          {
                 // Create main camera instance & ray origin (from cursor)
                 Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
                 if(Physics.Raycast(r, out RaycastHit hit))
                 {
                         if(hit.collider && hit.collider.gameObject == m.gameObject)
                         {
                                 m.InteractiveSurface_ModifyMesh(hit.point, radius, Vector3.down); // Interact the surface downwards
                         }
                 }
          }
     }
}
Mesh modifier - simple surface simulator via RenderTexture (GPU)
Available Methods
public void SurfTracking_ResetSurface()
Reset current surface (Clear the RT)
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_SurfaceTracking m; // Assign the proper object

     public void CustomMethod_ResetSurface()
     {
          m.SurfTracking_ResetSurface();
     }
}
Mesh modifier - arrange mesh vertices by the surface
Available Methods
public void MeshFit_ShowHidePoints()
Show/Hide generated points

public void MeshFit_GeneratePoints()
Generate points on the mesh

public void MeshFit_RestoreOriginal()
Restore current mesh to its original/initial state

public void MeshFit_ClearPoints()
Clear generated points (if possible)

public void MeshFit_BakeMesh()
Reset the mesh matrix transform (Set scale to 1 and keep the shape)

public void MeshFit_UpdateMeshState()
Update mesh state manually
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_MeshFit m; // Assign the proper object

     public void CustomMethod_UpdateMeshManually()
     {
          m.MeshFit_UpdateMeshState();
     }
}
Mesh modifier - complete slime-mesh solution
Available Methods
public void MeshSlime_ModifyMesh(Vector3 worldPoint)
Modify mesh on the specified world point

public void MeshSlime_ModifyMesh(MDM_RaycastEvent entry)
Modify mesh on the specified Raycast event
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_MeshSlime m; // Assign the proper object

     public void CustomMethod_MakeSlimeBlob(Vector3 position)
     {
          m.MeshSlime_ModifyMesh(position);
     }
}
Mesh modifier - complete sculpting solution
Available Methods
public void SS_Funct_RestoreOriginal()
Restore mesh to its initial/original state

public void SS_Funct_BakeMesh()
Bake mesh transform and matrix, register the scale to 1:1

public void SS_Funct_DoSculpting(Vector3 WorldPoint, Vector3 Direction, float Radius, float Strength, SS_State_Internal State)
Process sculpting on the current mesh

public void SS_Funct_RefreshMeshCollider()
Refresh the current mesh collider

public void SS_Funct_ChangeBrushState(int StateIndex)
Change brush state = 0 – none, 1 – raise, 2 – lower, 3 – revert, 4 - noise, 5 - stylize, 6 - smooth

public void SS_Funct_SetBasics(float Radius, float Strength, bool showBrush, Vector3 BrushPoint, Vector3 BrushDirection)
Set basic parameters for current sculpting object (Call this if you would like to setup a brand new sculpting editor in real-time. This method contains all the required params for proper sculpting)

public void SS_Funct_ChangeRadius(Slider UI or float)
Change radius of sculpt brush

public void SS_Funct_ChangeStrength(Slider UI or float)
Change strength of sculpt brush

public void SS_Funct_RecordToHistory()
Record current vertex position to the history (if possible)

public void SS_Funct_Undo()
Step back undo (if possible)
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_SculptingLite m; // Assign the proper object
     public float brushSize = 3;
     public float brushIntens = 1;
     public Vector3 sculptingDir = Vector3.up; // You can customize your own direction (for example towards another vector [vec1-vec2])

     private void Update()
     {
          // Sculpt with cursor with the left mouse button
          if(Input.GetMouseButton(0))
          {
                 // Create main camera instance & ray origin (from cursor)
                 Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
                 if(Physics.Raycast(r, out RaycastHit hit))
                 {
                         if(hit.collider && hit.collider.gameObject == m.gameObject)
                         {
                                 m.SS_Funct_DoSculpting(hit.point, sculptingDir, brushSize, brushIntens, SS_State_Internal.Raise); // Process sculpting with custom params
                         }
                 }
          }
     }
}
Mesh modifier - complete mesh cutting solution
Available Methods
public void MeshCut_Cut()
Default mesh cutting (the most preferred method) - call this method to process the cut feature

public void MeshCut_Cut(MDM_MeshCut_Cutter cutterInput)
Mesh cutting with required cutter input

public void MeshCut_Cut(Vector3 position, Vector3 normal, List<(MeshFilter f, MeshCollider c)> availableMeshes)
Main method for mesh cutting with required point-location, normal vector &  available meshes to process

public void MeshCut_RefreshMeshCollider()
Refresh mesh collider to all created chunks (if possible)
Example
using UnityEngine;
using MD_Plugin;

public class ExampleMonoBehaviour
{
     public MDM_MeshCut m; // Assign the proper object
     public MeshFilter targetMesh;
    public MeshCollider targetMeshCol;

     private void Update()
     {
          // Cut horizontally with cursor; with the left mouse button
          if(Input.GetMouseButton(0))
          {
                 // Create main camera instance & ray origin (from cursor)
                 Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
                 if(Physics.Raycast(r, out RaycastHit hit))
                 {
                         if(hit.collider && hit.collider.gameObject == m.gameObject)
                         {
                                 m.MeshCut_Cut(hit.point, Vector3.up, new List<(MeshFilter, MeshCollider)> {(targetMesh, targetMeshCol)}); // Process cut horizontally
                         }
                 }
          }
     }
}