public GameObjectPool LoadOnlyPrefab(resourceCell cell, int entityResType) { GameObjectPool pool = null; pool = AddGameObjectPool(cell.prefabpath, entityResType); return(pool); }
public GameObjectPool PrefabAndTexture(resourceCell cell, int entityResType) { GameObjectPool pool = null; pool = AddGameObjectAndTexturePool(cell, entityResType); return(pool); }
protected GameObjectPool AddGameObjectAndTexturePool(resourceCell cell, int entityResType) { var go = ResourceManager.GetInstance().LoadGameObject(cell.prefabpath); go.transform.position = Const.Invisible_Postion; var pool = new GameObjectPool(); pool.SetSeed(go); var texture = ResourceManager.GetInstance().LoadObject <Texture>(cell.texturepath); var smr = go.GetComponentInChildren <SkinnedMeshRenderer>(); smr.material.SetTexture("_MainTex", texture); gameObjectPools.Add(entityResType, pool); return(pool); }