Skip to content

Instantly share code, notes, and snippets.

@dyguests
Created July 31, 2021 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyguests/a133fe3609d2126f89e45ac3e147a2b9 to your computer and use it in GitHub Desktop.
Save dyguests/a133fe3609d2126f89e45ac3e147a2b9 to your computer and use it in GitHub Desktop.
Unity Button without Image.
// https://stackoverflow.com/questions/36888780/how-to-make-an-invisible-transparent-button-work
// file Touchable.cs
// Correctly backfills the missing Touchable concept in Unity.UI's OO chain.
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor(typeof(Touchable))]
public class Touchable_Editor : Editor
{ public override void OnInspectorGUI(){} }
#endif
public class Touchable:Text
{ protected override void Awake() { base.Awake();} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment