bassically i have a button and when its clicked i want to find the name of the button and set the Selectedobject variable, but im not sure how to approach this
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class setSeletedObject : MonoBehaviour {
public string SelectedObject:
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
SetSelectedObject();{
SelectedObject = ;
}
}