I have come across numerous threads recently were users were encountering an issue. It appears for static game objects, Unity generates the combined mesh. But if aborting a build the source mesh is overridden with the combined mesh and saved in scene, not reverting back to the original mesh.
Here are some threads created recently:
Does anyone have any additional information regarding this new functionality?
This doesn’t sound right to me, and would be hesitant to download the new versions of Unity.
Edit:
A bug report for this issue was elevated to “Active”.
What needs to happen is that somebody that experiences this bug sends a bug report containing a scene with the combined mesh problem in it, and a good description of the problem. The Unity devs are pretty good at fixing bugs they get to know about. They don’t read all of the threads.
So this is not expected behavior in Unity 5.5? Usually a Unity employee will pop in a thread and encourage people to submit a bug report if they highly suspect something is a bug.
Is the combined mesh being permanently saved in the scene?
What happens if you go to the mesh filter and choose “revert”. Is the combined mesh replaced with the original source mesh?
It was saved in my case.
Reverting indeed helps but it comes with the cost of loosing all specific data in attached behaviours.
Some more horror occurs when you try to undo reverting: it undones into blank plane with default uvs etc. Clearly broken.
What I mean is just revert the Mesh Filter portion, by hitting the gear icon and choosing Revert. This should just restore the mesh inside the Mesh Filter. I think you’re hitting the revert button which is causing the loss of the serialized data in the attached MonoBehaviours.
AFAIK, Unity never was able to reliably handle undoing the “Revert” operation. I think I submitted a bug report a couple of years ago, with no response.
Just tried your fix and it works for that one model, the rest still are combined. I guess that is a temp fix for now. The only problem is, I am not sure how that will effect the combined mesh during runtime and optimizations such as that.
Having the same problem… Reverting allows me to move the objects once again, but it doesn’t clear from the combined mesh. Which is a problem for me because I’m baking navigation in my project.
Hello I am still having this problem, but I couldn’t wait any longer so I tried making a script that could help automate a fix. Below is what I have so far I think it needs a little more work.
This only works if the Model file is the same as your prefab or gameobject in the game that has the combined mesh.
Hope this helps and if you have any questions do not hesitate to ask.
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
public class EditorFixes : MonoBehaviour {
public int meshFilterIndex;
public List<MeshFilter> meshFilterlist;
public void combinedMeshFixStart() {
meshFilterIndex = 0;
meshFilterlist = new List<MeshFilter>( FindObjectsOfType<MeshFilter>() );
for(int i = meshFilterlist.Count - 1; i >= 0; --i) {
if(!meshFilterlist[i].sharedMesh.name.Contains( "Combined" )) {
meshFilterlist.RemoveAt( i );
}
}
print( meshFilterlist.Count );
}
public void combinedMeshFixNext() {
focus( meshFilterlist[meshFilterIndex].gameObject );
string s = meshFilterlist[meshFilterIndex].gameObject.name.Replace( "(Clone)", "" ).Trim();
string[] ss = AssetDatabase.FindAssets( s );
Mesh mm = AssetDatabase.LoadAssetAtPath<Mesh>( AssetDatabase.GUIDToAssetPath( ss[0] ) );
Debug.Log( "changed " + s + " " + mm.name, mm );
meshFilterlist[meshFilterIndex].sharedMesh = mm;
meshFilterIndex = ( meshFilterIndex + 1 ) % meshFilterlist.Count;
if(meshFilterIndex == 0) {
print( "Looped" );
}
}
void focus(GameObject go) {
EditorGUIUtility.PingObject( go );
Selection.activeGameObject = go;
SceneView.lastActiveSceneView.FrameSelected();
}
}
[CustomEditor( typeof( EditorFixes ), true )]
public class LODFixEditor : Editor {
public override void OnInspectorGUI() {
DrawDefaultInspector();
GUILayout.Space( 10 );
if(GUILayout.Button( "Combined Mesh Fix Start" )) {
var myScript = (EditorFixes)target;
myScript.combinedMeshFixStart();
}
if(GUILayout.Button( "Combined Mesh Fix Next" )) {
var myScript = (EditorFixes)target;
myScript.combinedMeshFixNext();
}
}
}
#endif
Has anyone found the way or noticed on how the issue is reproduced? Tried to import some basic combined mesh and play with various settings to get the issue, but sadly, to no results. Any ideas?
(Working with one of these cases right now in QA).