We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80cc5c6 commit b61b4f1Copy full SHA for b61b4f1
Assets/FbxExporters/Editor/ReviewLastSavedModel.cs
@@ -249,7 +249,11 @@ private static void OnPlay()
249
return;
250
}
251
252
+ // Right before we enter playmode, unload the last saved model if there is one.
253
+ // Unsubscribe from hierarchy window changed event so that unloading the model doesn't
254
+ // trigger a new one to be added right before playing.
255
if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode && !UnityEditor.EditorApplication.isPlaying) {
256
+ UnityEditor.EditorApplication.hierarchyWindowChanged -= UpdateLastSavedModel;
257
UnloadModel (LastModel);
258
LastModel = null;
259
0 commit comments