Culling faces from models in the unity editor viewport?

I’m playing around making a Minecraft like game. But instead of generating buildings and levels from code I’m modeling them with a pretty decent workflow I have going. But I am in need of removing/deleting faces that are unviewable in the viewport editor. I’ve never tried to make a unity editor extension, can someone give me some info on how I could remove certain faces from a model in the editor NOT when the game plays. How do you find a particular face on a model and delete it? My main concern is that they are already 3d models .fbx to be exact. I’ve never seen any info on culling already made models in unity, only when they are generated procedurally.

I know it can be done though because of tools like probuilder etc… But I think even those are procedural. Info and tutorials would be appreciated.

If you want to cull individual faces, you’ll need to create a new Mesh resource, copy the data from the fbx mesh into it, and then remove all of the backfacing or occluded faces. You’d need to do this every frame that the camera moves.

If you want to cull individual renderer’s, that’s easier. You just need to determine what is occluded (which it sounds like you have a way to do?) and then set the active flag to false.

If you’re not sure how to have a script run in the editor, then add the ExecuteInEditor class attribute. You may also need to manually hook your Update function into EditorApplication.Update.