/// <summary> /// 分配一个对象 /// </summary> /// <param name="value"></param> /// <returns></returns> public static VarGameObject Alloc(GameObject value) { //要从对象池获取 VarGameObject var = Alloc(); var.Value = value; return(var); }
public static VarGameObject Alloc() { //要从对象池获取 VarGameObject var = GameEntry.Pool.DequeueVarObject <VarGameObject>(); var.Value = default(GameObject); var.Retain(); return(var); }