6 [RequireComponent(typeof(Collider), typeof(MeshRenderer))]
9 [SerializeField]
private Brush brush;
11 [SerializeField]
private int wait = 3;
13 private int waitCount;
15 private bool cantPaint;
19 GetComponent<MeshRenderer>().material.color = brush.
Color;
27 private void OnTriggerStay(Collider other)
29 if (other.gameObject.layer == 20)
40 var canvas = other.gameObject.GetComponent<
InkCanvas>();
44 canvas.
Paint(brush, other.ClosestPoint(transform.position));
Class managing brush information.
Color Color
The color of the brush.
Texture paint to canvas. To set the per-material.
bool Paint(Brush brush, Vector3 worldPos, Func< PaintSet, bool > materialSelector=null, Camera renderCamera=null)
Paint processing that use world-space surface position.