playMaker

Author Topic: Switching a 2D Sprites Texture[SOLVED]  (Read 6702 times)

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Switching a 2D Sprites Texture[SOLVED]
« on: November 20, 2013, 10:18:54 PM »
Hey there,

is there any way to switch a 2D Sprites Texture in Unity 4.3 at the moment (or comming up soon)?

Greets
Peter
« Last Edit: November 28, 2013, 04:56:47 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Switching a 2D Sprites Texture
« Reply #1 on: November 20, 2013, 11:39:15 PM »
Hi,

 Yes, totally, you simply set a different sprite in the SpriteRenderer Component, that's all there is to it.

 You can do that in unity by using "Set Property" action ( drag the spriteRenderer onto the state action stack and select "set property", locate the "sprite/sprite" property and select the sprite asset you want to switch to.


bye,

 Jean

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Switching a 2D Sprites Texture
« Reply #2 on: November 23, 2013, 12:55:28 AM »
Thanks alot! I just where always drag&dropping the object from the Hierachyview, didnt know i couldt get/set single components of an object, awsome :-)