add AddListener helper for IL2CPP, cleanup some unity extensions

This commit is contained in:
sinaioutlander
2020-11-13 23:14:57 +11:00
parent eedb7dd76f
commit eb693eceb5
23 changed files with 136 additions and 282 deletions

View File

@ -177,11 +177,7 @@ namespace UnityExplorer.Inspectors.GameObjects
mainColors.normalColor = new Color(0.07f, 0.07f, 0.07f);
mainColors.highlightedColor = new Color(0.2f, 0.2f, 0.2f, 1);
mainBtn.colors = mainColors;
#if CPP
mainBtn.onClick.AddListener(new Action(() => { OnChildListObjectClicked(thisIndex); }));
#else
mainBtn.onClick.AddListener(() => { OnChildListObjectClicked(thisIndex); });
#endif
Text mainText = mainButtonObj.GetComponentInChildren<Text>();
mainText.alignment = TextAnchor.MiddleLeft;