-
-
Save Densyakun/43f0d953dbc2228c376e81aca506bb5b to your computer and use it in GitHub Desktop.
【Unity】メッシュの複製コード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Mesh mesh_copy (Mesh mesh) { | |
Mesh m = new Mesh (); | |
m.vertices = mesh.vertices; | |
m.uv = mesh.uv; | |
m.uv2 = mesh.uv2; | |
m.uv3 = mesh.uv3; | |
m.uv4 = mesh.uv4; | |
m.triangles = mesh.triangles; | |
m.bindposes = mesh.bindposes; | |
m.boneWeights = mesh.boneWeights; | |
m.bounds = mesh.bounds; | |
m.colors = mesh.colors; | |
m.colors32 = mesh.colors32; | |
m.normals = mesh.normals; | |
m.subMeshCount = mesh.subMeshCount; | |
m.tangents = mesh.tangents; | |
return m; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment