Created
March 22, 2014 10:03
-
-
Save baba-s/9704072 to your computer and use it in GitHub Desktop.
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 System; | |
| using UnityEngine; | |
| /// <summary> | |
| /// Transform型の拡張メソッドを管理するクラス | |
| /// </summary> | |
| public static partial class TransformExtensions | |
| { | |
| /// <summary> | |
| /// 子となっているオブジェクトをゲームオブジェクトの名前から取得します | |
| /// </summary> | |
| /// <param name="transform">Transform型のインスタンス</param> | |
| /// <param name="name">ゲームオブジェクトの名前</param> | |
| /// <returns>子となっているオブジェクト</returns> | |
| public static GameObject FindGameObject(this Transform transform, string name) | |
| { | |
| return transform.Find(name).gameObject; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment