playMaker

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

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
Switching a 2D Sprites Texture[SOLVED]
« on: November 20, 2013, 08: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, 02:56:47 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13432
  • Official Playmaker Support
    • View Profile
Re: Switching a 2D Sprites Texture
« Reply #1 on: November 20, 2013, 09: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: 234
    • View Profile
    • Peter Hann .de
Re: Switching a 2D Sprites Texture
« Reply #2 on: November 22, 2013, 10:55:28 PM »
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 :-)