Rendertexture[] as images in toolbar?

Can I use an Array of RenderTexture[ ] as the images inside a Toolbar? If so how?

I can get it (Toolbar) working with normal textures, and I can get RenderTextures working as images in buttons etc… that update realtime, which is ACE btw :slight_smile:

But I cant seem to work out how to get it working with a collection of Rendertexture[ ]

Cheers :slight_smile:

I don’t know if this will work, but this sure sounds worthy of a wish list item if it doesn’t. I wonder how much overhead it would add?

Anyone from UT wanna chime in here about this? Is this possible or can this be added?

I assume you’ve attempted building your own array at runtime?

If that doesn’t work, you could try copying the contents of the rendertexture into new Texture2Ds and building a new array out of those. Will probably add some overhead, but should work…?

I think that would add way too much overhead, considering there are a few images i want (each a realtime rendertexture) in the toolbar. I dont even think it would get evaluated quick enough to keep the “trick” of the motion smooth.

I also want to use this technique in other GUI related areas of my game, so I really need a clean and simple solution… like it just working!

But, thanks for the thought :slight_smile:

Actually, I’m not so sure it would be that slow. I’d definitely test it before dismissing the idea, as I think it can be implemented in a few lines of code (<10 or so) and packed in it’s own subroutine or helper class.

Assuming - of course - that there’s no exisiting magical way to make it happen automagically. :wink:

Also, assuming that the resolution you need for the buttons is relatively small, rendering will be very fast.

Instead of passing in an array of Textures, create an array of GUIContent, and assign the RenderTextures to the ‘image’ property of each one…

Awesome! Got it… I knew there would be an easy way to do this! Thanks heaps:-)