Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
Stop leaking Texture2D objects into the scene.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Frisby authored and Jon Frisby committed Dec 18, 2009
1 parent 2497c63 commit 5b7399a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Resources.cs
Expand Up @@ -85,6 +85,7 @@ public static Texture2D GetTextureResource( string resourceName, Assembly assemb
Texture2D texture; Texture2D texture;


texture = new Texture2D( 4, 4 ); texture = new Texture2D( 4, 4 );
texture.hideFlags = HideFlags.HideAndDontSave;
texture.LoadImage( GetByteResource( resourceName, assembly ) ); texture.LoadImage( GetByteResource( resourceName, assembly ) );


return texture; return texture;
Expand Down

0 comments on commit 5b7399a

Please sign in to comment.