Advertisement
thomazrb

Controlador Item

Mar 26th, 2021
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class ControladorItem : MonoBehaviour
  7. {
  8.     private int id;
  9.  
  10.     public void Click()
  11.     {
  12.         string texto = GetComponentInChildren<Text>().text;
  13.         transform.parent.GetComponent<ControladorScrollView>().Seleciona(texto, id);
  14.     }
  15.  
  16.     public void SetaId(int numero)
  17.     {
  18.         id = numero;
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement