File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -206,16 +206,13 @@ public static GameObject Convert (
206
206
207
207
// Create a prefab from the instantiated and componentized unityGO.
208
208
var prefabFileName = Path . ChangeExtension ( projectRelativePath , ".prefab" ) ;
209
- var prefab = PrefabUtility . CreatePrefab ( prefabFileName , unityGO ) ;
209
+ var prefab = PrefabUtility . CreatePrefab ( prefabFileName , unityGO , ReplacePrefabOptions . ConnectToPrefab ) ;
210
210
if ( ! prefab ) {
211
211
throw new System . Exception (
212
212
string . Format ( "Failed to create prefab asset in [{0}] from fbx [{1}]" ,
213
213
prefabFileName , fbxFullPath ) ) ;
214
214
}
215
215
216
- // Connect to the prefab file.
217
- unityGO = PrefabUtility . ConnectGameObjectToPrefab ( unityGO , prefab ) ;
218
-
219
216
// Remove (now redundant) gameobject
220
217
bool actuallyKeepOriginal ;
221
218
switch ( keepOriginal ) {
You can’t perform that action at this time.
0 commit comments