LoginSignup
0
0

More than 5 years have passed since last update.

GameObject

Last updated at Posted at 2015-04-10

選択オブジェクトの子階層を含めてStatic化する

ただし、非アクティブなオブジェクトは対象外となる。
対象としたい場合は <Transform>(true) で実行する。

foreach (var go in Selection.objects.OfType<GameObject>())
{
    foreach (var tf in go.GetComponentsInChildren<Transform>())
        {
            tf.gameObject.isStatic = true;
        }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0