Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Materials properties in assets doesnt match with properties in scene

Discussion in 'High Definition Render Pipeline' started by NewMagic-Studio, May 15, 2023.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    Hi,
    Before playing the scene, in editor, i see a material in assets is opaque, but in scene i change it to transparent and doesn't change in asset, it is like if Unity is instantiating the materials once are in an object, not sure if this is a bug or a new way Unity is doing things that i didn't realize
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    629
    Is anything else possibly affecting the material (script or animation) ?
    The default behaviour when something tries to change the material of an object (using Renderer.material api) is to indeed instanciate the material, to avoid altering the asset.
     
  3. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    Yes, in runtime yes, but this happens in editor before playing the app
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    629
    It also happens in editor whenever an editor script tries to access Renderer.material