mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 14:29:38 -05:00
Added ExportSetting to allow HideFlags
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UniGLTF
|
||||
{
|
||||
@@ -45,5 +46,12 @@ namespace UniGLTF
|
||||
/// Keep VertexColor
|
||||
/// </summary>
|
||||
public bool KeepVertexColor;
|
||||
|
||||
/// <summary>
|
||||
/// https://github.com/vrm-c/UniVRM/issues/1582
|
||||
///
|
||||
/// Allowed hide flags for MeshFilters to be exported
|
||||
/// </summary>
|
||||
public HideFlags MeshFilterAllowedHideFlags = HideFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace UniGLTF
|
||||
else if (renderer is MeshRenderer mr)
|
||||
{
|
||||
var filter = mr.GetComponent<MeshFilter>();
|
||||
if (filter != null && filter.hideFlags == HideFlags.None)
|
||||
if (filter != null && settings.MeshFilterAllowedHideFlags.HasFlag(filter.hideFlags))
|
||||
{
|
||||
if (filter.sharedMesh != null && filter.sharedMesh.vertexCount > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user