Created
January 21, 2015 03:18
-
-
Save Suzeep/a730d2b7892d4c2cc914 to your computer and use it in GitHub Desktop.
アタッチしたオブジェクトのTransformを全取得するスクリプト その2。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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