Search Unity

Third Party Material issue with Photon

Discussion in 'Multiplayer' started by StealThePixels, Nov 18, 2015.

  1. StealThePixels

    StealThePixels

    Joined:
    Apr 2, 2015
    Posts:
    68
    Hi,
    i am instantiating some characters from Prefabs/Resources folder, they already have a material set but when Photon instanciates them they appear in magenta color like in the picture attached.

    I used the same code to instanciate another character prefab and it worked well, the only difference with the above is that the material is in a Resources folder, while the prefab with the issue has a material not in Resources.

    Am i required to put also the material in Resources otherwise Photon will not set it properly?
     

    Attached Files:

  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    I guess you have to put these the materials with the character in a Resources folder.
    Actually, I never stumbled over this, but it makes sense. Internally, this is loaded as Resource.

    If that's a major problem, we can find ways around that.
     
  3. StealThePixels

    StealThePixels

    Joined:
    Apr 2, 2015
    Posts:
    68
    I've tried moving the material to resources but when the character was spawned, the instance had no material even if the prefab was linked to the material in resources.

    I had to set the material by script.
    Well at least it worked in some way

    Thanks