How to remove a part of a mesh?

I wan’t to remove a part of a mesh? Is that possible with script?

I have no idea and it would be pretty nice to learn and to implemnt in a game!! :slight_smile:

hi, yes it’s possible to edit mesh inside unity during Editing OR in your game as a gameplay during Runtime . you can remove/edit part of mesh with scripting.

first thing is to have some basics 3D knowledge (vertices/Triangles/UV etc…), google is your friend to learn 3D basics.

Mesh Class is the second thing to start with. the reference page has already 3 good examples :

  1. Building a mesh from scratch
  2. Modifying vertex attributes every
    frame
  3. Continously changing the mesh
    triangles and vertices

these some tutorials , google it for more examples :

mesh generation examples : 1,2

mesh deformation examples : 1

mesh cut examples : 1

and the assets store got already some packages that do that.

If I wanted to remove part of a mesh I would use blender or a similar modelling software or have a modeler separate the mesh for me. When you have a separated mesh broken into different parts you could enabled/disable them via script. It’s the easiest/fastest solution. If you absolutely need to separate a mesh in unity for your game there are assets available for you to look into. Here’s one I found on the asset store. Unity Asset Store - The Best Assets for Game Making @Vubb3

So basicly my idea was to make like a house editor. Using a grid to place a door. The problem would be that the wall i still there. So in wan’t to remove it. I now i could use like 100 diffrent templates and change beetween them but i would take way to long time to build and it and make sure that everything is referenced the right way.