I have a script that load a 2048px texture from a Resources folder follow an index (FrameINT):

#pragma strict
var OBJ : GameObject;
var TextName : String = "";
var FrameINT : int ;
var FrameOLD : int;
var Tempo : float = 0.0;
var velocity : float = 0.05;

function Awake () {
OBJ.renderer.material.SetTexture("_MainTex", Resources.Load(TextName + Manager.SceneNumber.ToString()+ "_" + Manager.Frames.ToString(), Texture));

function Start () {

function Update () {
FrameOLD = FrameINT;
FrameINT = Manager.Frames;

if ( !Manager.FadeON && FrameOLD  != FrameINT){
OBJ.renderer.material.SetTexture("_MainTex", Resources.Load(TextName + Manager.SceneNumber.ToString()+ "_" + FrameINT.ToString(), Texture));

if (Manager.FadeON){

function AssignTexture () {
OBJ.renderer.material.SetTexture("_MainTexture2", Resources.Load(TextName + Manager.SceneNumber.ToString() + "_" + FrameINT.ToString(), Texture));

	if (Tempo < 1.0){
	Tempo = Tempo + velocity;
	OBJ.renderer.material.SetFloat("_Blend", Tempo);
	else if (Tempo >= 1.0){
	OBJ.renderer.material.SetTexture("_MainTex", Resources.Load(TextName + Manager.SceneNumber.ToString() + "_" +         FrameINT.ToString(), Texture));
	Tempo = 0.0;
	OBJ.renderer.material.SetFloat("_Blend", Tempo);

	Manager.FadeON = false;
	Manager.TouchON = true;


This system work great and give me possibility to load a large number of big size texture.
At first, the application works fine, but with each new load gets too slow.
I try to use :


to unload unused assets but seem not to work.
There is a right way to unload unused texture and speed up my application?

The UnloadUnusedAssets and UnloadAsset is the right way to unload assets. For it work, you have to be sure that there is no references.

You said that it become slow. I don’t think that could be the use of memory, use of memory don’t make a game slow until you fill it and the SO start to paginate.

In your code there is many Resource.Load, and even inside a Update function. With “big size texture” it could really get things slow. The Resouces.Load is a very slow operation, and wich I know, there is no cache optimization from unity3d.

Try to profiling deep and see what is really slowing down. This could help:


What is the tools that unity Pro has to solve the problem?
Thnaks @Sisso