Beispiel #1
0
    protected override void OnDestroyManager()
    {
        meshInstancedArgs.Dispose();
        trailElementBuffer?.Dispose();
        segmentBuffer?.Dispose();

        if (trailElements.IsCreated)
        {
            trailElements.Dispose();
        }
        if (segments.IsCreated)
        {
            segments.Dispose();
        }
    }
    protected override void OnDestroy()
    {
        m_MeshInstancedArgs.Dispose();
        if (m_TrailElementBufferInShader != null)
        {
            m_TrailElementBufferInShader.Dispose();
        }
        if (m_SegmentBufferInShader != null)
        {
            m_SegmentBufferInShader.Dispose();
        }

        if (m_TrailElements.IsCreated)
        {
            m_TrailElements.Dispose();
        }
        if (m_Segments.IsCreated)
        {
            m_Segments.Dispose();
        }
    }