Search Unity

Question What is CreateMainTextureForRS() ?

Discussion in 'iOS and tvOS' started by joshuacwilde, Sep 3, 2020.

  1. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    You can see here in Instruments that this method is allocating over 100 MB. What is the purpose of this method? It doesn't appear to be for regular textures as it is only called 27 times (as can be seen in the screenshot) and this is captured while running a scene with easily 100 or more different textures.
     

    Attached Files:

  2. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    nothing like googling a question and finding your own open answer...
     
  3. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    it allocates metal resources for render textures and friends
     
  4. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    Ok this is good to know! So if we wanted to optimize this,what would be your suggestion?