Search Issue Tracker

Won't Fix

Votes

0

Found in

3.5.3f1

Issue ID

483471

Regression

No

Unloading native unity assets produces a crash

Asset Loading

-

Won't fix:
Developers responsible for the area decided not to fix this issue, because addding safeguard preventing from unloading assets created/owned by the editor/engine is quite non-trivial in this case and there is a proper workaround of clearing the references of resources and using UnloadUnusedAssets instead.

To reproduce:
1. Create new project
2. Create c# script with following content:

Object[] textures = Resources.FindObjectsOfTypeAll(typeof(Texture));
for(int i = 0; i < textures.Length; i++)
{
if(textures[i].name == string.Empty)
{
continue;
}

if(textures[i].name != "LOADING")
{
Debug.Log("UnloadAsset: textures[i].name = "+textures[i].name);
Resources.UnloadAsset( textures[i] );
}

3. Attach it to camera and run

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.