public GameObject LoadSoldier(string name) { if (mSoldiers.ContainsKey(name)) { return(GameObject.Instantiate(mSoldiers[name])); } GameObject asset = mResourcesFactory.LoadAsset(ResourcesFactory.SoldierPath + name) as GameObject; mSoldiers.Add(name, asset); return(GameObject.Instantiate(asset)); }