MD Package Technical & APi Documentation
MD_MeshBase
Namespace: MDPackage
Base mesh class for all the gameObject instances with mesh-related behaviour. Implement this base class to any class that will work with Unity meshes using the package's tools.
In the MD Package, the nested inheritation continues to the MD_ModifierBase (modifiers) and MD_GeometryBase (geometry and primitives).
Properties
// Currently cached mesh filter
public MeshFilter MbMeshFilter { get; protected set; }

// Update current mesh every frame?
public bool MbUpdateEveryFrame { get; set; }

// Automatically recalculate mesh normals?
public bool MbRecalculateNormals { get; set; }
// Recalculate mesh normals using the smoothing angle technique?
public bool MbUseNormalSmoothingAngle { get; set; }
public float MbNormalSmoothingAngle { get; set; }
// Recalculate mesh bounds automatically?
public bool MbRecalculateBounds { get; set; }
Methods
// Process complete mesh update - process calculation, pass data to the mesh and recalculate surface
public void MDMeshBase_ProcessCompleteMeshUpdate()

// Protected Methods

// Check if all the required components are present
protected bool MDMeshBase_CheckForMeshFilter(bool checkMeshFilterMesh = false)
// Async method for safe self-destroy
protected async void MDMeshBase_DestroySelf()

// Inheritance

// Initialize and cache all the required fields - required to call if inherited from this class
public virtual void MDMeshBase_InitializeBase(bool affectUpdateEveryFrameField = true, bool checkMeshFilterMesh = false)
// Implement this method for updating the target mesh with a new mesh data (vertices, triangles, uvs)
public abstract void MDMeshBase_UpdateMesh();
// Implement this method for processing certain mesh calculations
public abstract void MDMeshBase_ProcessCalculations();
// Recalculate mesh bounds & normals
public virtual void MDMeshBase_RecalculateMesh(bool forceNormals = false, bool forceBounds = false)