Prefab Doesn't Store Public Fields?

I have created AI characters. As each character is hit by a raycast from the player, I show their name and healthbar on a canvas. As the player looks away, the canvas clears. Seems simple, and it works, as long as all of the objects are in scene, and I manually place the UI elements into the public field slots.

I want to start with an empty level and spawn prefab AI characters in. When I do, their public fields for UI elements are empty. What can I do to ensure that these fields hold the entries for the canvas and UI elements?

EDIT: Attaching the Enemy script from updated comment.

<Deleted for brevity>
            void Start () 
         {
     //        HealthBarCanvas = GetComponent<EnemyHealthBars> ();
             healthBarSlider = GetComponent<EnemyHealthBars> ().healthBarSlider;
             healthBarText = GetComponent<EnemyHealthBars> ().healthBarText;
             HealthBarCanvas.SetActive (false);
         }
         
         // Update is called once per frame
         void Update () 
         {
             Ray ray = PlayerCamera.ViewportPointToRay (new Vector3(0.5f,0.5f,0));
     
             if (Physics.Raycast (ray, out hit, lookDistance))
             {
                 if (hit.collider.gameObject.tag == AITag && updateTimer > 0.5f)
                 {
                     currentlyLookingAtTarget = true;
                     currentTarget = hit.collider.gameObject;
                     currentAISystem = currentTarget.GetComponent<AI> ();
 
                     updateTimer = 0;
                 }
     
                 if (hit.collider.gameObject.tag == AITag)
                 {
                     updateTimer += Time.deltaTime;
                     lookAwayTimer = 0;
                 }
     
                 if (hit.collider.gameObject.tag != AITag)
                 {
                     lookAwayTimer += Time.deltaTime;
     
                     if (lookAwayTimer > lookAwaySeconds)
                     {
                         currentlyLookingAtTarget = false;
                         currentTarget = null;
                     }
                 }
             }
    
             if (deathTimerActive)
             {
                 deathTimer += Time.deltaTime;
     
                 if (deathTimer > 1)
                 {
                     HealthBarCanvas.SetActive (false);
                     currentlyLookingAtTarget = false;
                     deathTimerActive = false;
                     currentTarget = null;
                 }
             }
     
             if (currentlyLookingAtTarget && !deathTimerActive)
             {
                 HealthBarCanvas.SetActive(true);//HealthBarCanvas.SetActive(true);
                 healthBarSlider.value = currentAISystem.currentHealth;
     
                 if (currentAISystem.currentHealth <= 0)
                 {
                     deathTimerActive = true;
                 }
             }
     
             if (!currentlyLookingAtTarget)
             {
                 HealthBarCanvas.SetActive (false);
             }
         }
     }

This is because prefabs exist outside of the scene, meaning they cannot store references to items that are in the scene as it has no knowledge of the scene. This is also why you will notice that if you set references to items that are not within the prefab itself, those values remain in bold when you apply changes, because they cannot be saved with the prefab.

To get around this, you will have to do one of two things, one is to have prefabs locate those items and store the references after they are instantiated, you could do this based on tags, names, component searches. OR what I see as the better method, is to have a script that manages your UI (for arguments sake lets call it UiController), this can be placed on the object in the scene, and hold references to the GUI elemnents, then instead of your enemy objects directly effecting the UI display, they simply find and make method calls to this UiController (again via a find by name, find by type, etc). and the UiController responds by updating the necessary UI elements.