ActiveSelf#

ExportTransform.ActiveSelf: boolean#

GameObjcet のアクティブ状態を取得します。

GameObject に以下のコンポーネントがアタッチされていた場合、アクティブ状態と各コンポーネントの有効/無効は連動しています。

  • MeshRenderer

  • Rigidbody

  • Collider

  • Animation

  • AudioSource

また、親のアクティブ状態が false の場合、自身のアクティブ状態によらず非アクティブとしてふるまいます。
親を考慮したアクティブ状態を取得するには ExportTransform.ActiveInHierarchy() を使用してください。

Example#

-- Parent と Child が親子関係にあるとする
local parent = vci.assets.GetTransform("Parent")
local child = vci.assets.GetTransform("Child")

parent.SetActive(false) -- Parent は無効設定
child.SetActive(true) -- Child は有効設定

--> Parent も Child も無効状態になり、非表示状態になる

print(Child.ActiveSelf) --> true. Child 自身は有効設定だが...
print(child.ActiveInHierarchy) --> false. Child は実際には無効状態となる.