I have a scene with gameobjects that have combined meshes. Whenever I try to make that gameobject into a prefab, the prefab loses the combined mesh. Is there a way to make a gameobject with a combined mesh into a prefab?
That isn’t the answer… check this out:
using UnityEditor;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class MeshSaverEditor {
[MenuItem("CONTEXT/MeshFilter/Save Mesh...")]
public static void SaveMeshInPlace (MenuCommand menuCommand) {
MeshFilter mf = menuCommand.context as MeshFilter;
Mesh m = mf.sharedMesh;
SaveMesh(m, m.name, false, true);
}
[MenuItem("CONTEXT/MeshFilter/Save Mesh As New Instance...")]
public static void SaveMeshNewInstanceItem (MenuCommand menuCommand) {
MeshFilter mf = menuCommand.context as MeshFilter;
Mesh m = mf.sharedMesh;
SaveMesh(m, m.name, true, true);
This file has been truncated. show original
it’s simple and works.
yup, goto make does child objects for it to be part of the prefab