Ensure material and texture references are cleaned up on destroy
parent
f6d7d19951
commit
ee391cab7f
|
@ -371,6 +371,12 @@ namespace UnityEngine.UI.Extensions
|
||||||
pSystem = null;
|
pSystem = null;
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
currentMaterial = null;
|
||||||
|
currentTexture = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
Loading…
Reference in New Issue