Edit: got it. A simple google search helps… Sorry folks…
I’m tearing my hair out missing something simple I suppose… It pops up on play but in the root of the hierarchy. The console error is “Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.”
Here we go. Thanks folks!
using UnityEngine;
public class EnemyHealthController : MonoBehaviour
{
public GameObject canvas;
public GameObject enemyHealthBarPrefab;
void Start()
{
Instantiate(enemyHealthBarPrefab);
enemyHealthBarPrefab.transform.SetParent(canvas.transform, true);
}
}