Unity updating textblock text in RenderToTexture mode
Hi;
I can not update a textblock's text that is rendered on a plane with a rendertarget assigned to it.
When setting a new value, the previous text is not cleared.
Probably it is a clearing issue of the target buffer but could not figure out how to clear it. I have set my GUI camera's clear flag to DepthOnly and set the target textures depthbuffer to 16bit, but no luck.
What is the correct way to achieve this.
Thanks.
I can not update a textblock's text that is rendered on a plane with a rendertarget assigned to it.
When setting a new value, the previous text is not cleared.
Probably it is a clearing issue of the target buffer but could not figure out how to clear it. I have set my GUI camera's clear flag to DepthOnly and set the target textures depthbuffer to 16bit, but no luck.
What is the correct way to achieve this.
Thanks.
Devrim Demirkan
[email protected]
[email protected]
-
-
sfernandez
Site Admin
- Posts: 3197
- Joined:
Re: Unity updating textblock text in RenderToTexture mode
Try to set the Background of xaml root element to Transparent. For example:
Setting the background on the root element is the way we let the user decide if surface must be cleared or not. This only occurs if root element fills the entire screen.
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="Transparent">
<TextBlock x:Name="txt" Text="Some text"/>
</Grid>
Re: Unity updating textblock text in RenderToTexture mode
Hi Fernandez;
Thanks for the quick reply.
That did the trick. I can now update by textblocks.
cheers.
Thanks for the quick reply.
That did the trick. I can now update by textblocks.
cheers.
Devrim Demirkan
[email protected]
[email protected]
Who is online
Users browsing this forum: Bing [Bot] and 11 guests