// ์Šคํƒœํ‹ฑ ํด๋ž˜์Šค๋กœ ๋ญํ•˜๋‚˜ ๋Œ€์ถฉ ๋งŒ๋“ค๊ณ ~ย 


public static class ExtensionMethodย 

{ย 

// ์š”๋ž˜ ์น˜๋ฉด ๋จ.ย 

// transformย 

public static void SetTag_AllChildren(this Transform a_objParent, string a_strTag)ย 

{ย 

ย a_objParent.tag = a_strTag;ย 


if( a_objParent.childCount > 0 )ย 

{ย 

foreach( Transform t in a_objParent ) { SetTag_AllChildren(t, a_strTag); } }ย 

}ย 

}ย 





// ์‹ค์ œ ์‚ฌ์šฉ ์˜ˆ // gameObject.transform.SetTag_AllChildren("Wall");


// ๋‚ด ๋ธ”๋กœ๊ทธ

// https://blog.naver.com/azulionet/221261165620


// ํ™•์žฅ ๋ฉ”์†Œ๋“œ ์“ฐ๋ฉด ํŽธํ•ด์š”~

// ์Šคํƒœํ‹ฑ ํด๋ž˜์Šค๋กœ public ํ•จ์ˆ˜๋กœ ๋งŒ๋“ค๊ณ , this ํ‚ค์›Œ๋“œ๋กœ ๋ถ™์ด๋ฉด ๋