Hey Guys,
Im not sure if this is the correct place to post this. But We are making a mobile game and are trying to achieve the following effect…
We will have a bar with a wanted board inside. Each wanted poster will have 5 mughshots of characters to go after. We would like to have a way to either update the textures or add an element indicating that the character has been killed.
I have attached an image for reference
Even though the images attached are 2D what we are doing is in a 3D scene
Why not just make another plane in front of each wanted poster and make it appear when the guy was killed.
Something like this should work:
using UnityEngine;
using System.Collections;
public class Wall : MonoBehaviour {
public Renderer[] killedRender;
public bool[] killed;
public Texture2D killedMarker;
// Update is called once per frame
void Update () {
UpdateKilled();
}
void UpdateKilled()
{
for(int i = 0; i < killedRender.Length;i++)
{
killedRender[i].enabled = killed[i];
}
}
}
Just call the “UpdateKilled()” function when you need to update the status (On mobile at scene start would be a nice idea)
Awesome! Ill send this over to our dev’s and see if we can figure it out. Thanks!