Tanoda
OnDraggedQuizPicture.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using GILES.Interface;
4using UnityEngine;
5using UnityEngine.UI;
6
7public class OnDraggedQuizPicture : MonoBehaviour
8{
9 private InputField _if;
10
11 void Start()
12 {
13 _if = GetComponent<InputField>();
14 }
15
16 void OnSimpleDragAndDropEvent(DragAndDropCell.DropEventDescriptor desc)
17 {
18 if (desc.item.GetComponentInChildren<RawImage>())
19 {
20 _if.text = desc.item.GetComponent<pb_PrefabBrowserItemButton>().asset.name;
21 }
22 desc.permission = false;
23 }
24}
Every item's cell must contain this script