public void Initialize(int index, Transform parent, GameObject prefab, BattleActor actor) { this.index = index; goRef = MonoBehaviour.Instantiate(prefab); goRef.transform.SetParent(parent); goRef.transform.localScale = Vector3.one; goRef.transform.localPosition = Vector3.zero; sprite = actor.LoadSprite(); controller = goRef.GetComponent <TurnOrderHeroController>(); //Debug.Log("Actor null: " + (actor is BossActor)); controller.Initialize(sprite, (actor is BossActor)); rt = goRef.GetComponent <RectTransform>(); }