Ejemplo n.º 1
0
    public void OnPointerDown(PointerEventData data)
    {
        SetToggles(true);
        GameObject stickerGO = Instantiate(stickerPrefab);

        stickerGO.transform.SetParent(GetComponentInParent <Canvas>().transform, false);
        stickerGO.transform.position = gameObject.transform.position;

        _currentStickerChild = stickerGO.GetComponent <Sticker>();

        _currentStickerChild.SetParentButton(this);
        _currentStickerChild.StartDrag(data);
    }