예제 #1
0
    // recycle selef
    public void __Recycle()
    {
        if (m_isReleased)
        {
            return;
        }

        s_pool.Release((T)this);
        m_isReleased = true;
    }
    public void Stop(bool bRelease = true)
    {
        if (!IfPerformance)
        {
            return;
        }

        LogPoint();

        s_pool.Release(this);
    }
예제 #3
0
        /// <summary>
        /// Update the renderer's vertices.
        /// </summary>
        protected virtual void UpdateGeometry()
        {
            var vbo = s_VboPool.Get();

            if (rectTransform != null && rectTransform.rect.width >= 0 && rectTransform.rect.height >= 0)
            {
                OnFillVBO(vbo);
            }


            var components = ComponentListPool.Get();

            GetComponents(typeof(IVertexModifier), components);

            for (var i = 0; i < components.Count; i++)
            {
                (components[i] as IVertexModifier).ModifyVertices(vbo);
            }
            ComponentListPool.Release(components);

            canvasRenderer.SetVertices(vbo);
            s_VboPool.Release(vbo);
        }
예제 #4
0
 public static void Release(List <T> toRelease)
 {
     s_ListPool.Release(toRelease);
 }
예제 #5
0
 public static void Release(List<Component> toRelease)
 {
     s_ComponentListPool.Release(toRelease);
 }
예제 #6
0
 public static void Release(List <Canvas> toRelease)
 {
     s_CanvasListPool.Release(toRelease);
 }