Esempio n. 1
0
    private void LoadPanel()
    {
        var testPanel             = GameObject.FindGameObjectWithTag("TestPanel");
        var testPanelEventTrigger = testPanel.GetComponentInChildren <EventTrigger>();

        UIHelper.AddEventTrigger(testPanelEventTrigger, DisplayDebugText, EventTriggerType.PointerEnter);
    }
Esempio n. 2
0
    private void LoadCharacter()
    {
        GameObject characterObject = (GameObject)Instantiate(characterPrefab);

        var characterPanel = UIHelper.getGameObjectWithName(characterObject, "PanelOverlay", typeof(RectTransform));

        //var characterEventTrigger = characterPanel.AddComponent<EventTrigger>();

        var characterEventTrigger = characterObject.GetComponentInChildren <EventTrigger>();

        UIHelper.AddEventTrigger(characterEventTrigger, DisplayDebugText, EventTriggerType.PointerEnter);



        characterObject.transform.position = new Vector3(2.5f, 2.5f, -1);
    }