MD Package Technical & APi Documentation
MDG_MeshPaintingRuntime
Namespace: MDPackage.Geometry
Complete mesh painting solution at runtime. Paint primitive meshes using various settings at runtime.
Suitable for PC and mobile.
Read more here (Online documentation slide)
Properties
// Selected mesh type for painting (Quad, TriangularPrism, Cube)
public MDG_MeshPaintingSource.PaintingMeshType PaintingMeshType { get; set; }
public string DefaultMeshName { get; set; }
public string DefaultPaintedObjectName { get; set; }

// Brush Settings

// Target brush gameObject as a visual representation
public GameObject BrushGameObject { get; set; }
public float BrushSize { get; set; }
public float BrushSmoothMovement { get; set; }
public float BrushSmoothRotation { get; set; }

// Painting Settings

// The lower the value, the more dense the painted mesh will be
public float MinVertexDistance { get; set; }

// Selected painting mode (ScreenSpace, RaycastHit, CustomTransformAnchor)
public PaintingMode CurrentPaintingMode { get; set; }
// Painting mode screen space settings container
public PaintingModeScreenSpace CurrentPaintingModeScreenSpace { get; }
// Painting mode raycast settings container
public PaintingModeRaycast CurrentPaintingModeRaycast { get; }
// Painting mode custom transform settings container
public PaintingModeCustomTransform CurrentPaintingModeCustomTransform { get; }

public bool AddMeshColliderOnRelease { get; set; }
// Main material for the painted mesh
public Material PaintingMaterial { get; set; }

// Source code object for the mesh painting
public MDG_MeshPaintingSource MeshPaintingSourceInstance { get; }

// Input Hookups

// Use this input hookup for cursor/touch screen position
public Vector3 InputHook_GenericScreenPosition { get; set; }
// Use this input hookup for generic button down
public bool InputHook_GenericButtonDown { get; set; }
Public Methods
public void ChangeBrushSize(float size)

public void ChangePaintingMeshType(float meshType)

public void ChangePaintingMaterial(Material material)