• Resources
  • a script to render a mesh as wireframe

script to add to a meshinstance you want to render as wireframe :

extends MeshInstance



func _ready():
	
	var a = mesh.surface_get_arrays(0)
	var m = mesh.surface_get_material(0)
	mesh.surface_remove(0)
	mesh.add_surface_from_arrays(1, a)
	
	#if there's more than one surface, the surface idx should be the last
	mesh.surface_set_material(0, m)

Moved to resources since it fits better in here, you might want to attach some license to the code snippet. MIT perhaps? :)