GameObject CreateTextOverlayInstance(ConstellationInfo constellation, Transform parentCanvas, Transform parent3d)
        {
            var instance = GameObject.Instantiate(overlayPrefab);

            instance.transform.SetParent(parentCanvas, false);
            instance.GetComponent <ConstellationOverlayText>().SetConstellation(constellation, parent3d);
            instance.name = constellation.name;
            return(instance);
        }
Example #2
0
 public void SetConstellation(ConstellationInfo info, Transform parent3d)
 {
     constellationInfo = info;
     text.text         = constellationInfo.name;
     this.parent3d     = parent3d;
 }