Unity-Technologies / uaal-example

Other
751 stars 238 forks source link

In iOS, Application.Unload does not unload assemblies. #92

Open tsuixl opened 1 year ago

tsuixl commented 1 year ago

hi.

I need the static variables in the assembly to be unloaded after Application.Unload.

Examples:

private static int s_StaticValue = 0;

public void ChangeValue ()
{
    s_StaticValue = 1;
}

After executing the ChangeValue() function, the value of s_StaticValue becomes 1. However, after Application.Unload, it cannot restore s_StaticValue to its default value of 0.

What operation can restore the Unity assembly to its initial state?

thx!