Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: rainexplorer on November 11, 2017, 04:53:17 PM

Title: How to change Sprite Renderer [SOLVED]
Post by: rainexplorer on November 11, 2017, 04:53:17 PM
Hi,

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

(https://i.imgur.com/YkovoAv.png)

Any suggestion on this ?
Title: Re: How to change Sprite Renderer
Post by: rainexplorer on November 11, 2017, 05:28:13 PM
please ignore, i solve it myself by using :


(https://i.imgur.com/i0pZ96s.png)

and SET previous STATE to FINISH (before, i use custom DONE but not work)
Title: Re: How to change Sprite Renderer
Post by: djaydino on November 12, 2017, 08:17:35 AM
Hi,
There is also an action called 'Swap Sprite' on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
It has a 'Reset On Exit' which can be very useful in some cases if you need to swap back to the previous sprite :)
Title: Re: How to change Sprite Renderer [SOLVED]
Post by: szomaza 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

Title: Re: How to change Sprite Renderer [SOLVED]
Post by: djaydino 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.