How to make sprite invisible?

I need change property of sprite to invisible, for a time. I not able to find in documentation.

You can use msg.post("#sprite", “disable”) or go.set("#sprite", “tint”, vmath.vector4(1,1,1,0))

and then when you want it to appear again use:
msg.post("#sprite", “enable”) or go.set("#sprite", “tint”, vmath.vector4(1,1,1,1)) depending on your initial choice

2 Likes

This is the preferred way. A disabled component will have virtually zero impact on performance. Setting alpha to 0 will still result in a lot of computations in the engine.

8 Likes

Has keyword list from learn document? like “disable”.

The API reference shows all of the messages you can send to various components. I also made several changes to the manuals:

3 Likes