Skip to content

Instantly share code, notes, and snippets.

@Suzeep
Created January 21, 2015 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Suzeep/a730d2b7892d4c2cc914 to your computer and use it in GitHub Desktop.
Save Suzeep/a730d2b7892d4c2cc914 to your computer and use it in GitHub Desktop.
アタッチしたオブジェクトのTransformを全取得するスクリプト その2。
using UnityEngine;
using System.Collections.Generic;
public class TransformList : MonoBehaviour
{
// Start
void Start()
{
Transform[] obj_list = this.GetComponentsInChildren<Transform>();
for( int i=0; i < obj_list.Length; ++i ){
m_List.Add( obj_list[i] );
}
}
// member
public List<Transform> m_List = new List<Transform>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment