Author Topic: Changing Texure  (Read 1504 times)


  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Changing Texure
« on: May 31, 2012, 07:34:51 AM »
Am trying to change a texture/material to match the selection from another GameObject.
I wish to change the texture/material by name 1,2,3.......30,31,32 etc.

I have tried all work arounds, but am stuck.

I could create a large switch table, but this is cumbersome.
Don't really get the 'set material float'
tried 'convert material to object' then 'set object value' but no luck

anybody help




  • 1.2 Beta
  • Full Member
  • *
  • Posts: 228
    • View Profile
Re: Changing Texure
« Reply #1 on: June 01, 2012, 04:10:23 PM »
An easy way would be to be to either use the set material texture action to assign a new shader to the object, or you could have the object have the same textures on both objects and simply change the index of the currently active texture

eg: cube 1 and 2 both have 2 textures on and green

the first texture is material index _0 (red) and the second texture is material index _1 (green)

so when you click on the first object, it checks which material index is active, then sets cube 2 to have the same index number