Search Unity

All materials and textures being loaded into scene even tough its empty

Discussion in 'Editor & General Support' started by xandelee, Oct 5, 2020.

  1. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
    Currently on Unity 2020.1.6f1, but happens also on the 2019 versions

    Even tough i'm on a blank scene (no references to prefabs and not else at all) ALL my textures and materials from the project are being loaded into the RAM as shown in the profiler.
    I made a build to the android to test and the memory is indeed being used.

    What may be causing this? is this a unity bug?
    I searched for topics related but didnt no found anyone with the same problem.

    You can see it on the screenshot.
     

    Attached Files:

    Last edited: Oct 5, 2020
    Eristen likes this.
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Do your textures and materials happen to be stored inside a folder called "Resources"?
     
    Eristen likes this.
  3. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
    No, the Resources folder does not even exist since all my objects needs to be store in memory. (Remembering the scene in question shown in the screenshot is blank, no scripts and no references AT ALL)

    And even if they were i believe a script should call Resouces.Load for them to be loaded to the ram.
     
  4. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
    Took a look at the editor.log of the build and the textures seems to be coming from the URP, says its 4.4mb in the build size but strangely the profiler shows over a thousand textures and 103mb

    Build Report
    Uncompressed usage by category (Percentages based on user generated assets only):
    Textures 4.4 mb 24.6%
    Meshes 0.0 kb 0.0%
    Animations 0.0 kb 0.0%
    Sounds 0.0 kb 0.0%
    Shaders 1.3 mb 7.1%
    Other Assets 574.8 kb 3.2%
    Levels 5.1 kb 0.0%
    Scripts 2.0 mb 11.1%
    Included DLLs 9.5 mb 53.7%
    File headers 59.7 kb 0.3%
    Total User Assets 17.8 mb 100.0%
    Complete build size 84.7 mb
    Used Assets and files from the Resources folder, sorted by uncompressed size:
    1.0 mb 1.2% Assets/Repositorio/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset
    878.6 kb 1.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader
    344.5 kb 0.4% Assets/Repositorio/TextMesh Pro/Fonts/LiberationSans.ttf
    341.4 kb 0.4% Assets/Repositorio/TextMesh Pro/Sprites/EmojiOne.png
    262.6 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/SMAA/AreaTex.tga
    260.9 kb 0.3% Assets/Repositorio/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Thin02.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Thin01.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium06.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium05.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium04.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium03.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium02.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium01.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Large02.png
    256.1 kb 0.3% Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Large01.png
    79.7 kb 0.1% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Fonts/Perfect DOS VGA 437.ttf
    59.0 kb 0.1% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI BitField.prefab
    38.3 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF-Surface.shader
    34.8 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/BokehDepthOfField.shader
    23.9 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/Bloom.shader
    23.6 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/FinalPost.shader
    23.5 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile.shader
    21.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/LutBuilderHdr.shader
    19.6 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/GaussianDepthOfField.shader
    19.2 kb 0.0% Resources/unity_builtin_extra
    18.0 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF.shader
    18.0 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF Overlay.shader
    17.0 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF-Surface-Mobile.shader
    15.5 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/CameraMotionBlur.shader
    15.5 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile Masking.shader
    14.9 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader
    13.5 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile Overlay.shader
    12.1 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/LutBuilderLdr.shader
    12.0 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_Bitmap-Mobile.shader
    9.7 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_Bitmap.shader
    9.6 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_Bitmap-Custom-Atlas.shader
    7.5 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Shaders/TMP_Sprite.shader
    6.7 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/PaniniProjection.shader
    6.5 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Color.prefab
    6.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/Blit.shader
    6.1 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Vector4.prefab
    5.6 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/Sampling.shader
    5.3 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/CopyDepth.shader
    5.2 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Vector3.prefab
    4.6 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/StopNaN.shader
    4.5 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Panel.prefab
    4.3 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Vector2.prefab
    4.1 kb 0.0% Assets/Repositorio/MeshBaker/Resources/Shaders/UnlitWithAlpha.shader
    4.0 kb 0.0% Assets/Repositorio/MeshBaker/Resources/Shaders/NormalMapShader.shader
    4.0 kb 0.0% Assets/Repositorio/MeshBaker/Resources/Shaders/AlbedoShader.shader
    3.5 kb 0.0% Packages/com.unity.render-pipelines.universal/Shaders/Utils/FallbackError.shader
    3.2 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset
    3.0 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Resources/DebugUI Canvas.prefab
    2.4 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Foldout.prefab
    2.1 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset
    1.7 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI ToggleHistory.prefab
    1.7 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Toggle.prefab
    1.6 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat
    1.5 kb 0.0% Assets/Repositorio/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat
    1.4 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Group.prefab
    1.1 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/SMAA/SearchTex.tga
    1.1 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Textures/UIFoldoutOpened.png
    1.1 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Textures/UIFoldoutClosed.png
    1.1 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Textures/UICheckMark.png
    1.1 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Button.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI EnumHistory.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI EnumField.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI FloatField.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI Value.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI UIntField.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI IntField.prefab
    0.9 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Resources/DebugUI Persistent Canvas.prefab
    0.8 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Textures/UIElement8px.png
    0.7 kb 0.0% Packages/com.unity.render-pipelines.universal/Runtime/Data/PostProcessData.asset
    0.5 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Textures/White1px.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI VBox.prefab
    0.4 kb 0.0% Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUI HBox.prefab
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_9.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_8.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_7.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_6.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_5.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_4.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_31.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_30.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_3.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_29.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_28.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_27.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_26.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_25.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_24.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_23.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_22.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_21.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_20.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_2.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_19.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_18.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_17.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_16.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_15.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_14.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_13.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_12.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_11.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_10.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_1.png
    0.4 kb 0.0% Packages/com.unity.render-pipelines.universal/Textures/BlueNoise16/L/LDR_LLL1_0.png
     
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    Hi,
    Memory Usage in the Editor can be funky due to it being the Editor. E.g. you might have some shaders that aren't stripped or some editor tools and scripts that reference some textures, etc.

    Could you please check that this also happens if you make a development build and profile that? Also, the Memory Profiler Package might provide further insights into what references lead to these textures to be held in memory.