playMaker

Author Topic: is Material instance possible?  (Read 1854 times)

mekoid

  • Playmaker Newbie
  • *
  • Posts: 35
is Material instance possible?
« on: April 20, 2015, 04:12:53 AM »
Hi
How do you create a new material with PM actions during the game play?
I have a material that has 2 variables input. And a lot of objects need to use this material , but with different variable values when occasionally something happens.

So it seems inevitably they need the material duplicates on the creation of the happening events separately.

But I couldnt find the suitable action that can do the job. So far my solution would be pre-create those duplicates to a enough number and grab them when needed. But it doesnt seem to be efficient enough.

So if anyone has any good ideas please let me know. Thanks in advance.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: is Material instance possible?
« Reply #1 on: April 20, 2015, 08:12:49 AM »
Why does it not seem efficient enough? Creating them beforehand is certainly the optimal way to do it.

You can assign the color or texture of a material at runtime, but I don't think there is any support for creating new materials.. At least, that I know of.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mekoid

  • Playmaker Newbie
  • *
  • Posts: 35
Re: is Material instance possible?
« Reply #2 on: April 21, 2015, 06:40:46 AM »
I see. Thanks for the reply. I am kinda new to Unity. Just curious that ppl with more experience would say.

Why is it not efficient enough IMO? Let's say we have 100 objects that need the unique material. And we need to create the 100 materials beforehand. Yeah I know that's Unity's problem.