mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:42:55 +02:00
fix null object error on cancel export
This commit is contained in:
parent
3c78e48f88
commit
d8b4419fd0
2 changed files with 12 additions and 9 deletions
|
@ -1531,6 +1531,7 @@ class ExportProjectWindow : EditorWindow {
|
|||
|
||||
float GetAvatarHeight() {
|
||||
// height of an avatar model can be determined to be the max Y extents of the combined bounds for all its mesh renderers
|
||||
if (avatarPreviewObject != null) {
|
||||
Bounds bounds = new Bounds();
|
||||
var meshRenderers = avatarPreviewObject.GetComponentsInChildren<MeshRenderer>();
|
||||
var skinnedMeshRenderers = avatarPreviewObject.GetComponentsInChildren<SkinnedMeshRenderer>();
|
||||
|
@ -1542,6 +1543,8 @@ class ExportProjectWindow : EditorWindow {
|
|||
}
|
||||
return bounds.max.y;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void SetAvatarScale(float actualScale) {
|
||||
// set the new scale uniformly on the preview avatar's transform to show the resulting avatar size
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue