Search Unity

Question Is this a bug or whats the fix?

Discussion in 'Prefabs' started by Pam76, Mar 19, 2023.

  1. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    Hello everyone, I am new here so forgive my basic questions. The mini nature pack 3D vegetation downloaded from Unity's asset store to my project 3D URP template shows all prefabs as pink only when you zoom in to the scene of the terrain. I cannot understand this. Tried to fix it by going through innumerable forums, videos & blogs. I have not been able to find a solution yet. I have tried selecting the prefabs and converting them to URP rendering pipeline. Changed the mesh renderer to URP lit but still no change. Kindly help me out.
     
  2. Rubben44

    Rubben44

    Joined:
    Sep 5, 2021
    Posts:
    11
    Hi! So have you tried updating their material (not the prefab itself) to URP?
     
  3. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    Thanks Rubben for your reply, yes tried updating material as well to URP. But strangely, when my camera is far away, the trees look fine but the moment I zoom in, they turn pink :(
     
  4. Rubben44

    Rubben44

    Joined:
    Sep 5, 2021
    Posts:
    11
    If you try to change the Scriptable Render Pipeline from Edit -> Project Settings -> Graphics from URP to None (Built-in) does now the material applied on the prefab is looking normal?
     
  5. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
  6. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    Hi Rubben, I have tried even doing this, changed it back and forth a couple of times without any change
     
  7. Rubben44

    Rubben44

    Joined:
    Sep 5, 2021
    Posts:
    11
    I see that you are placing the trees down by using terrain's tools, if you try and drag a prefab to the scene from the project, would it look ok?
     
  8. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    UnitySc3.jpg

    I just tried as suggested, the prefab looks completely pink even when I zoom out :(
     
  9. Rubben44

    Rubben44

    Joined:
    Sep 5, 2021
    Posts:
    11
    Try and make a new material and add the tree texture to that material that you created and apply it on one of the prefabs and see if it works
     
  10. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    Hi, I created a new material but unable to reference the tree texture to the new material, how do you that? UnitySc4.jpg
     
  11. Rubben44

    Rubben44

    Joined:
    Sep 5, 2021
    Posts:
    11
    So one way to reference the texture to the material is by dragging them ( Ex. You drag that Diffuse texture into the Base Map and the normal in the normal map in the inspector) and another way is to click on the little circle in the left of the Base Map and a selection menu should pop up from where you would be able select the proper texture.
     
    Pam76 likes this.
  12. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    Thanks Rubben, now I know how to reference textures to materials. And I tried to apply the prefab asset of the tree to the material but failed. Cannot find an option to apply it. But on changing the material option to shader graph that has changed my prefab quite a bit as below. Now on zooming out, the trees become a poly green but on zooming in they become grey. UnitySc5.jpg
     
  13. Rubben44

    Rubben44

    Joined:
    Sep 5, 2021
    Posts:
    11
    Hm... Interesting... Try not to change the material from the shader graph but only to one tree. I see that you have that tree prefab in your hierarchy, try and unpack it and drag the new material that you created from the project menu to it and see if it make any change
     
  14. Pam76

    Pam76

    Joined:
    Mar 12, 2023
    Posts:
    8
    Thanks so much Rubben, it worked. UnitySC6.jpg
     
    Rubben44 likes this.