private void SafeInit() { if (!_ResourceInited) { //GNewUITools.SetVisible(transform, false); if (renderTextureSrc == null) { renderTextureSrc = Resources.Load("ImgModelSupport/ModelTexture") as RenderTexture; } if (imageModelCameraSrc == null) { imageModelCameraSrc = Resources.Load("ImgModelSupport/GUICamera") as GameObject; } //_RenderTexturePool = TimedPoolManager.Instance.GetUnityTimedPool(NUM_MAX_RT, RT_POOL_TIME, null, OnDeleteObject); //if (_RenderTexturePool == null) return; _CameraPool = TimedPoolManager.Instance.GetUnityTimedPool(NUM_MAX_CAM, CAM_POOL_TIME, null, OnDeleteObject); if (_CameraPool == null) { return; } _ResourceInited = true; } }
public UnityTimedPool GetUnityTimedPool(int max_count, float life_time, UnityEngine.Events.UnityAction <System.Object> on_pool, UnityEngine.Events.UnityAction <System.Object> on_delete) { UnityTimedPool pool = new UnityTimedPool(max_count, life_time, on_pool, on_delete); _ListPool.Add(pool); pool.SetValid(true); return(pool); }