Unity-Technologies / uaal-example

Other
733 stars 233 forks source link

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

Open tsuixl opened 9 months ago

tsuixl commented 9 months 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!