playMaker

Author Topic: problem with material instance  (Read 1679 times)

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
problem with material instance
« on: July 05, 2013, 09:19:22 AM »
hi,

i expose the scene:
i made material for one ennemy type,
when this ennemy enter the scene (camera view) this material is modified.

after this i duplicate the ennemy and problems begin:
-the first ennemy enter in scene and material is modified like i need.
-the second ennemy enter the scene and modify the same material, so the first ennemy is modified too

so i decided to duplicate material and assign each one on different model.
it works nice, cost more memory but not to high because i have only 4 ennemies actually with 4 duplicated material so if one change, the others are not altered.

looks a good idea ? que néni !

i duplicated my fours ennemies and problems restart, this time all ennemies allready inside camera view change there materials !!!

i'm gonna be crazy if i must duplicate materials for each ennemy ...

why does it works nice when instanciate a gameobject and apply random color,
and there, here it is the material party ?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: problem with material instance
« Reply #1 on: July 09, 2013, 04:17:23 AM »
hi

It looks like an issue in the way you control these materials. Isolate the issue with two ennemies only, press pause and degug both, to double check that they don't get both the same command.

bye,

 Jean