mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-19 01:07:32 -05:00
親をたどる時、非アクティブなTransformも取得できる方法に修正
This commit is contained in:
parent
3788d1efcd
commit
c634e319a9
|
|
@ -1,4 +1,5 @@
|
|||
using System.Linq;
|
||||
using MeshUtility;
|
||||
using UnityEngine;
|
||||
|
||||
namespace VRM
|
||||
|
|
@ -7,7 +8,7 @@ namespace VRM
|
|||
{
|
||||
public static bool EnableForExport(this Component mono)
|
||||
{
|
||||
if (mono.transform.GetComponentsInParent<Transform>().Any(x => !x.gameObject.activeSelf))
|
||||
if (mono.transform.Ancestors().Any(x => !x.gameObject.activeSelf))
|
||||
{
|
||||
// 自分か祖先に !activeSelf がいる
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ namespace VRM
|
|||
var eraseBones = bones.Select((x, i) =>
|
||||
{
|
||||
// 祖先に削除対象が存在するか
|
||||
bool erase = x.GetComponentsInParent<Transform>().Any(y => y == eraseRoot);
|
||||
bool erase = x.Ancestors().Any(y => y == eraseRoot);
|
||||
return new
|
||||
{
|
||||
i,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user