Destroy textures when slideshow is finished
This commit is contained in:
		
							parent
							
								
									c97ccef80c
								
							
						
					
					
						commit
						bda97c2583
					
				| @ -59,6 +59,14 @@ public class PhotoTransition : MonoBehaviour | |||||||
| 
 | 
 | ||||||
|     public void Reset() |     public void Reset() | ||||||
|     { |     { | ||||||
|  |         foreach (var texture in _imgList) | ||||||
|  |         { | ||||||
|  |             if (texture != null) | ||||||
|  |             { | ||||||
|  |                 Destroy(texture); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         _imgList.Clear(); |         _imgList.Clear(); | ||||||
|         _state = 0; |         _state = 0; | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user