playMaker

Author Topic: Set material texture [SOLVED]  (Read 2196 times)

ca

  • Playmaker Newbie
  • *
  • Posts: 4
Set material texture [SOLVED]
« on: October 16, 2019, 07:06:26 AM »
Hello,

I want to make the player have some motion so I want to set two pictures using “set material texture “ to change second by second, but it doesn’t work!
« Last Edit: October 18, 2019, 04:39:10 AM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Set material texture
« Reply #1 on: October 16, 2019, 01:34:11 PM »
Hi.
Is this for 2d character?
if so you can use sprites and the animator with some animations

ca

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Set material texture
« Reply #2 on: October 16, 2019, 08:40:16 PM »
yes 2D. thank you!
because it is so simple just two pic exchange both.
so, I set two states in a FSM on the game object,
state A:
set Material texture use textureA
wait 1 sec
state B:
set Material texture use textureB
wait 1 sec

and, I can do it 2-3 year ago with old unity, but nowadays updated unity to 2019.2 then it doesn't work.

thank again!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Set material texture
« Reply #3 on: October 17, 2019, 03:48:38 AM »
Hi.
if 2D you should use Set Sprite action

and swap the sprite image on the sprite renderer not the material.


ca

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Set material texture
« Reply #4 on: October 17, 2019, 08:24:18 AM »
which action will use?
UI Image Set Sprite?
but it still doesn't work :(
thank you!!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Set material texture
« Reply #5 on: October 17, 2019, 01:49:00 PM »
Hi.
Ui image is for canvas ui images.

Sorry i thought the sprite actions where already included in the latest PM version.
The sprite actions will come in the next update.

For now you can get some sprite actions from the  Ecosystem you can find 'Set Sprite' / 'Swap Sprite' actions.

ca

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Set material texture
« Reply #6 on: October 17, 2019, 09:07:22 PM »
Oh I see.
I never use the Ecosystem before you told me.
I found set sprite now and it work perfect!

thank you!!