Search Unity

ClippingOptions ClipContents vs ClipAndCacheContents?

Discussion in 'UIElements' started by col000r, Nov 1, 2018.

  1. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    654
    I've been wondering about the advantages/disadvantages of using ClipAndCacheContents over ClipContents. The docs just say "Enables clipping and renders contents to a cache texture." When and why would I want that?
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    220
    This is a more advanced feature and will likely go away when we release UIElements in 19.1 as part of the new renderer. That said, this feature is currently used primarily in GraphView to optimize dragging of the potentially complex nodes. It renders the node to a texture and for all transform-only operations it skips the relayout/repaint of the UI elements inside the node. Unless you have dire performance issues and you have floating/draggable elements, I wouldn't touch this setting.