private void Start() { try{ charName = this.transform.parent.GetComponent <CharIconPanel>().MyName; }catch (Exception e) { DebugLogger.LogError(e + "MyParent isnt CharIconPanel "); throw; } WorldImg = transform.parent.parent.parent.parent.GetComponentInChildren <WorldImg>(); img = this.GetComponent <Image>(); txt = GetComponentInChildren <Text>(); }
public override void OnSelect() { base.OnSelect(); WorldImg.OnSelect(charName, 0); }
public override void RemoveSelect() { base.RemoveSelect(); WorldImg.Remove(charName, 0); }