Unity clicks the mouse to break through the model to change the model's mesh model to punch holes

Effect picture
insert image description here
Download CSG and import it into the project: https://download.csdn.net/download/weixin_44950382/86744963

  • Create a new Plugins folder, cut the csg under the editor into the folder, and delete the original dll file
    insert image description here
    insert image description here
  • Code
    This code is linked to the main camera. The target is the object to be cut. The brush is a brush. This is what the cutout looks like.
using System.Collections;
using System.Collections.Generic

Guess you like

Origin blog.csdn.net/Chj1319261607/article/details/127242858