I'm using a sliced sprite as the background image for a menu that has content of varying sizes at any given time. Because of this I need to resize the sliced sprite so it is the same height as the content using dimensions. Here's a picture of the menu:
http://imgur.com/Ol6fYDB The see through trapezoid is the sliced sprite, and it would need to be the same height as everything from the top of the large "Test" with the symbols next to it to the very bottom "Test Test Test".
I'm at a loss as to how this would be done. I'm using Renderer.bounds to position everything, but the size it gives me for the content (the combined bounds for everything from the big "Test" to the bottom "Test Test Test") is so far off of what the pixel dimensions are for the sliced sprite. For example, the y size of the content in the picture linked is 0.2991996, but the y pixel size of the sliced sprite is 280.
I have my UI camera set up as Orthographic with a size of 1, and the sprite collection size is set at Explicit with the default ortho size of 1 and target height of 640. Perhaps using a different combination would make this easier?