Search Unity

Canvas group with 3d elements

Discussion in 'UGUI & TextMesh Pro' started by sp-sergio-gil, Jan 7, 2019.

  1. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    Is there any easy way of combining the ui canvas group alpha value to all the 3D elements than a UI can have attached (particles, 3d models,...)?
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    I don't think so.. I'm pretty sure UI components (such as Canvas and CanvasGroup) can only affect the rendering of UI components that use Canvas Renderers. Because MeshRenderers and ParticleSystems do not use CanvasRenderers, I'm pretty sure they cannot use values from an CanvasGroup unless you write a script that copies the alpha value of the CanvasGroup to the color value of your Renderer's material.

    If you're a graphics wizard, it may be that CanvasGroups set uniform values that can be accessed in a shader, but I'm not sure.
     
  3. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    I was thinking in having a specific Canvas Group that could track all of this uniforms changes but I don't know if this is the correct solution