Search Unity

Sprites dark on iPhone 4G with Unity 3?

Discussion in 'iOS and tvOS' started by aerende, Aug 11, 2010.

  1. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    I have a bunch of Sprites with Diffuse and Transparent/Diffuse shaders that look fine in Unity 3 on my Mac, but when they run on the iPhone 4 they are black. Other sprites with the same shaders are not black. Does anyone know what could cause this or is this a Unity 3 bug?

    1) The Render Settings are the same for levels that have the black and non-black sprites.
    2) The camera settings are the same for the levels that have the black and non-black settings.

    Anything else that I could check that might be causing this?
     
  2. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    check the textures, potentially you had them on compressed and now need to fix the import settings
     
  4. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @Jessy: How do you check that GetPixels/SetPixels is set on the texture? I.E. I couldn't find this attribute on the texture in Unity3.
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    its there but only if you set the texture to the right type, which means Advanced (which makes sense cause you need some more than standard knowledge on the matter to not kill your apps performance with it)
     
  6. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @dreamora:

    1) I have the Texture Type set to Advanced but I don't see GetPixels/SetPixels. Can you tell me where it is?

    2) Also I have the box checked that says "Override for the iPhone" Is that correct?
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    1. Right there :) "Read / Write enabled"

    2. you edit it on the default settings, assuming its an iphone project
     
  8. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @dreamora:

    I clicked the "Read/Write enabled" button on the Texture and applied it and still the texture is black on the iPhone 4G.


    1) I have "Generate Mip Maps" checked. That shouldn't be a problem, right?
     
  9. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Hello aerende,
    please submit a bug report with simple repro project.
    Thanks!
     
  10. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @ mantasp:

    Thanks, I submitted a bug report.