Created
June 29, 2021 14:09
-
-
Save hackertron/01c7cfd71484992145cea3072b9dc95b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class UIHandler : MonoBehaviour | |
{ | |
public Button btn; | |
public GameObject furniture; | |
// Start is called before the first frame update | |
void Start() | |
{ | |
btn = GetComponent<Button>(); | |
btn.onClick.AddListener(SelectObject); | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
} | |
void SelectObject() | |
{ | |
Datahandler.Instance.furniture = furniture; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment