Search Unity

PressableRoundButton material color reset to default when entering Play Mode

Discussion in 'VR' started by Brandgage-1, Jun 6, 2019.

  1. Brandgage-1

    Brandgage-1

    Joined:
    Nov 15, 2017
    Posts:
    32
    Hello!,

    Currently experiencing an issue where something is setting the Albedo color of the "Cylinder" Gameobject found inside the "PressableRoundButton" prefab. You can see in the first screenshot that I have it's albedo color set to white, and when I enter play mode it turns back to the color of the original abedo color of the "ColorButtonProximity" Material, which is 0088C0 with 255 alpha. I am able to change the color of "ColorButtonProximity" to something else and the bug will still persist.
    I have checked the scripts on the PressableRoundButton and could not find anything that could be causing this.
    Interestingly, it is related to the prefab though, as moving the cylinder out of it prefab instance, then deleting the prefab instance, then entering play mode, the cylinder color will be the original color of it's own prefab pre-play mode.

    Thanks!
     

    Attached Files:

  2. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Did this button come from MRTK?
     
  3. Brandgage-1

    Brandgage-1

    Joined:
    Nov 15, 2017
    Posts:
    32
  4. julenka

    julenka

    Joined:
    Jul 27, 2015
    Posts:
    2
    This is happening because the Interactable component on the button is setting the cylinder to the "Default" color in the interactable profile, which is cyan. To change it, find the Interactable component that's on the root of the button. Then, change the profile. You need to change Cylinder.Default.Color to White to have the material be white after you hit play. To learn more about interactable, see the mrtk documentation

    upload_2019-6-20_22-51-42.png
     
    zhorela and Brandgage-1 like this.
  5. Brandgage-1

    Brandgage-1

    Joined:
    Nov 15, 2017
    Posts:
    32
    @julenka Oh my! Thanks so much Idk how I managed to miss this!