using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace YKMoon
{
///
/// Mono基础.//
///
public class YKMono : MonoBehaviour
{
///
/// Cached transform.
///
public Transform trans {
get {
if(m_Trans == null) {
m_Trans = this.transform;
}
return m_Trans;
}
}
private Transform m_Trans;
///
/// Cached RectTransform.
///
public RectTransform rectTrans { get { return trans as RectTransform; } }
protected virtual void Awake() { }
public GameObject CreateChildGameObject(string name)
{
GameObject go = new GameObject(name);
go.transform.SetParent(this.trans);
return go;
}
}
}