-
Notifications
You must be signed in to change notification settings - Fork 88
Fixing PBShape export using FBX Exporter #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Addons/Fbx.cs
Outdated
|
|
||
| var getMeshForComponent = FbxExporterAssembly.GetTypes() | ||
| .Where(t => t.BaseType == typeof(MulticastDelegate) && t.Name.StartsWith("GetMeshForComponent")) | ||
| .First(t => t.ContainsGenericParameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should replace the reflection here with an optional dependency on FBX Exporter
| if (component != null) | ||
| Object.DestroyImmediate(component); | ||
| // probuilder can't handle mesh assets that may be externally reloaded, just strip pb stuff for now. | ||
| StripProBuilderScripts.DoStrip(pmesh); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 🥇
JoelFortin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tried Export and Convert.
Also note for @vkovec, the warning we get about the temp meta file that needs to be deleted is logged right ?
modrimkus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compared behaviour before/after fix - lgtm.
|
@JoelFortin Yes I don't think the warning was specific to Probuilder, we have made a fix for the next release |
Purpose of this PR
Fixing Probuilder mesh throwing errors with FBX Exporter due to the presence of ProBuilderShape that was not removed.
The PR calls the
StripProBuilderScriptsclass now for more consistency and the code is now also aware of the difference between "FBX Export" that does not replace the PB Object and "Convert to prefab" that creates a prefab, strips PB objects and replace the object in the scene.Links
Fogbugz: https://fogbugz.unity3d.com/f/cases/1334017/
Comments to Reviewers
[List known issues, planned work, provide any extra context for your code.]