Author Topic: shared material doesnt work  (Read 1753 times)


  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
shared material doesnt work
« on: February 19, 2015, 05:58:57 AM »
Get Material --> Get Shared Material (checkbox set)
when i try to store material in variable i see an instance of material and ofcourse i cant change parametrs on all object with that material, because its not shared, its still local (instance).

maybe there is something that i do not understand?


ok, few mins of thinking and my college found bug.

else if (!getSharedMaterial && go.renderer.materials.Length > materialIndex.Value)
is correct.

else if (go.renderer.materials.Length > materialIndex.Value && !getSharedMaterial)
not correct.

if i try to get shared material from material index 1 or 2 or 3... it will made instance because getSharedMaterial alway be 0.

need to check string 67 and 74 in script GetMaterial.cs

i hope you understood me.
« Last Edit: February 19, 2015, 06:46:11 AM by zelmund »


  • Administrator
  • Hero Member
  • *****
  • Posts: 15377
  • Official Playmaker Support
    • View Profile
Re: shared material doesnt work
« Reply #1 on: March 08, 2015, 11:39:51 PM »

 that's very odd. do you have a small repro package that I can test and verify with.

 because And condition statements by definition don't really care about the order, both needs to resolve to true to pass, and so swapping the conditions for the if doesnt really change the behavior.

 I may miss something obvious or a technic in c# that I need to learn, but as is I am sceptical that this change makes a difference. I may very well be wrong, but I need a repro to validate this and forward an update :)