主要部分:
public GameObject prefab; //使用预制添加子物体
void Start () {
//f 为需要添加自物体的对象
GameObject fg = GameObject.Find("f");
//第一种 clone
//GameObject _Instance = Instantiate(prefab);
//_Instance.transform.parent =fg.transform;
//第二种 从Resources里进行加载
GameObject pfb = Resources.Load("name") as GameObject;
GameObject _Instance = Instantiate(pfb);
_Instance.transform.parent = f.transform;
}