Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Application.GarbageCollectUnusedAssets() for Unity3?

Discussion in 'iOS and tvOS' started by aerende, Jul 26, 2010.

  1. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    I'm using Unity 3 and it appears that Application.GarbageCollectUnusedAssets() is no longer available.

    What should I use instead with Unity 3?
     
  2. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,970
    Probably Resources.UnloadUnusedAssets().
     
  3. acme3D

    acme3D

    Joined:
    Feb 4, 2009
    Posts:
    186
    I trie to use Resources.UnloadUnusedAssets() but I get this message:

    Assets/Scripts/SimpleFlip.js(282,41): BCE0004: Ambiguous reference 'Resources': UnityEngine.Resources, System.Resources.
     
  4. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Are you importing System.Resources in your script? If so, you can still get around it by explicitly stating which Resources class you want:-
    Code (csharp):
    1. UnityEngine.Resources.UnloadUnusedAssets();
     
unityunity