I’m trying to add a image sprite on my GUI dialog on my rpg project, using this code.
///////////////////////
//show character Avatar
///////////////////////
public void ShowMugShot(Sprite face, bool hasFace)
{
hasMugShot = hasFace;
chrPicture.sprite = face;
}
public void HideMugShot()
{
hasMugShot = false;
pictureBox.SetActive(false);
chrPicture.gameObject.SetActive(false);
chrPicture.enabled = false;
chrPicture.sprite = null;
}
but i received this error, not sure what left…
Assets\2D RPG Kit\Scripts\DialogManager.cs(191,20): error CS1061: ‘bool’ does not contain a definition for ‘sprite’ and no accessible extension method ‘sprite’ accepting a first argument of type ‘bool’ could be found (are you missing a using directive or an assembly reference?)
or wich on is the best method to add one avatar to dialog character?