Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Raw Image UGUI Masking Problem

Discussion in 'UGUI & TextMesh Pro' started by AtahanOzturk, Jul 7, 2020.

  1. AtahanOzturk

    AtahanOzturk

    Joined:
    Aug 18, 2015
    Posts:
    9
    upload_2020-7-6_19-9-56.png

    For a game I'm making I'm using the new DOTS system to handle drawing what usually would be sprites using a particle shader and a texture with UV coordinates. However this means when using the regular UI to display the same items I am forced to use the RawImage component instead of Image, and as you can see in the picture, it doesn't work with masks.

    Are there workarounds to this? Should I write custom shader code? What would the performance hit be?
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    I did a quick test - for me raw images work with masks without problem (both, Image Masks and RectMask2D).
    Maybe it has to do with some import settings of the textures?