Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RenderTexture change in runtime

1 REPLY 1
SOLVED
Reply
Message 1 of 2
samc.work
513 Views, 1 Reply

RenderTexture change in runtime

My application needs to change the renderTexture of swf in runtime.

 

I try to add the myRTT component and destroy it in order to change the texture.

This way works but I found that the memory usage is continue to increase.

 

I found that the Destroy function inside SFRTT.cs is commented out and there is no coding

to remove the flash content in memory even I destroy the myRTT component.

 

Could you advise how can I solve the issues?

 

1 REPLY 1
Message 2 of 2
adam.petrone
in reply to: samc.work

It's not enough to uncomment the SFRTT.Destroy method. You also need to call RTTMovie.Destroy(). That should solve the memory leak. 

This is what the final method should look like in SFRTT:

 

 

    public virtual void OnDestroy()
    {
        renderer.material.mainTexture = null;
        RenderTexture = null;
	RTTMovie.Destroy();
        RTTMovie = null;
    }

 

Regards,

-Adam 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report