0
\$\begingroup\$

I don't know exactly how to put this into words, so googling did nothing really for me.

Imagine a bowling game. On the oldern bowling lanes there was only a scheme of the pins above the lane, lighting up all the pins that are still standing, while the ones that already fell, were not lit anymore.

How can I achieve this in Unity? Is there any way to do this, without having to make something stupid like creating hundreds of textures, with all the possible combinations and swap them out?

I'm still very new to Unity, so I'd love to know the best approach to something like this.

Thank you very much in advance

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

This depends very much on how you are displaying the pin status to the user. If you are using the UI features it could be as easy as setting up a prefab using a game object with an Image Component and a custom script that controls the Image component's image based on the status of an associated pin.

In a 2D Game you can create a prefab with a sprite for the pin statuses and render them over a background at the appropriate location.

If you are attempting to create a texture that gets applied to a mesh, you could do something similar and render that to a texture to be applied to the mesh whenever the pin status changes.

References:

\$\endgroup\$
1
  • \$\begingroup\$ Thanks, I think this gives me an idea on how to approach this. I haven't looked into UI / 2D very far, but I think I understand the concept now. This will come in very hand, when I try to make floating scoreboards etc. So thank you very much, I will dig into this now. \$\endgroup\$
    – LilaQ
    Commented Apr 13, 2016 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .