playMaker

Author Topic: How to change Sprite Renderer [SOLVED]  (Read 3791 times)

rainexplorer

  • Junior Playmaker
  • **
  • Posts: 65
How to change Sprite Renderer [SOLVED]
« on: November 11, 2017, 04:53:17 PM »
Hi,

I want to change my Sprite Renderer, but cannot find it (not working so far).



Any suggestion on this ?
« Last Edit: November 12, 2017, 08:17:48 AM by djaydino »

rainexplorer

  • Junior Playmaker
  • **
  • Posts: 65
Re: How to change Sprite Renderer
« Reply #1 on: November 11, 2017, 05:28:13 PM »
please ignore, i solve it myself by using :




and SET previous STATE to FINISH (before, i use custom DONE but not work)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to change Sprite Renderer
« Reply #2 on: November 12, 2017, 08:17:35 AM »
Hi,
There is also an action called 'Swap Sprite' on the Ecosystem
It has a 'Reset On Exit' which can be very useful in some cases if you need to swap back to the previous sprite :)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: How to change Sprite Renderer [SOLVED]
« Reply #3 on: May 11, 2019, 10:51:57 AM »
To hide objects with sprites I am setting their sprite renderer sprite parameter to 'none'.
I was wondering if it might be faster to just set the color of the sprite renderer to transparent, while I want the object to be invisible?

Does anybody have any idea which might be less demanding:
- changing the sprite parameter,
- or changing the color parameter,
of the sprite renderer?

Thanks in advance,
szomaza


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to change Sprite Renderer [SOLVED]
« Reply #4 on: May 11, 2019, 11:12:07 AM »
Hi.
Probably setting to none will be less demanding as there is nothing to render,
But i think it is very low on cpu to see any difference (maybe very large amount of sprites)
Another possibility is to enable disable the component.

To be sure, make a test scene and make a sprite whit the fsm setup (use a template to change the fsm setup easier for all duplicated objects) and duplicate 1000 times then play and look at the profile.
if still to small of a difference, duplicate another 1000 or more, until you can notice a difference.