Prefabs with mirror

Hello I am trying to assign an image to a character that is as prefab, this project is using mirror to make it of several instances, but when I try to assign the image for the life bar this appears and so it does not work, is there something I should configure,

Thank you very much.

Can you please post the content of LifeBar.cs script and the type of the reference you are trying to assign to “Bar Life”?

1 Like

Hello, thanks for answer me, this is the script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class LifeBar : MonoBehaviour
{
[Header(“Interfaz”)]
public Image barLife;

public int lifeActual;
public int lifeMax;

private void Update()
{
barLife.fillAmount = lifeActual / lifeMax;
}
}