Ensure material and texture references are cleaned up on destroy

pull/413/head
Simon (Darkside) Jackson 2018-09-25 15:28:08 +01:00
parent f6d7d19951
commit ee391cab7f
1 changed files with 6 additions and 0 deletions

View File

@ -371,6 +371,12 @@ namespace UnityEngine.UI.Extensions
pSystem = null;
Initialize();
}
void OnDestroy()
{
currentMaterial = null;
currentTexture = null;
}
}
#endif
}