Skip to content

Instantly share code, notes, and snippets.

View KorStrix's full-sized avatar
🧭
Fast is fine, but accuracy is final

Strix KorStrix

🧭
Fast is fine, but accuracy is final
View GitHub Profile
@KorStrix
KorStrix / NonDrawingGraphic.cs
Created June 3, 2020 05:45 — forked from capnslipp/NonDrawingGraphic.cs
A UnityEngine.UI.Graphic subclass that provides only raycast targeting, skipping all drawing.
/// @creator: Slipp Douglas Thompson
/// @license: Public Domain per The Unlicense. See <http://unlicense.org/>.
/// @purpose: A UnityEngine.UI.Graphic subclass that provides only raycast targeting, skipping all drawing.
/// @why: Because this functionality should be built-into Unity.
/// @usage: Add a `NonDrawingGraphic` component to the GameObject you want clickable, but without its own image/graphics.
/// @intended project path: Assets/Plugins/UnityEngine UI Extensions/NonDrawingGraphic.cs
/// @interwebsouce: https://gist.github.com/capnslipp/349c18283f2fea316369
using UnityEngine;
using UnityEngine.UI;
// Tips from https://forum.unity3d.com/threads/c-script-template-how-to-make-custom-changes.273191/
using UnityEngine;
using System.Linq;
#if UNITY_EDITOR
using UnityEditor;
/// <summary>
/// 스크립트를 생성할 때 스크립트의 Keyword를 컨버팅합니다.
/// </summary>
#region Header
/* ============================================
* 작성자 : Strix
* 작성일 : 2019-10-21 오후 6:42:02
* 개요 :
*
* 에디터 폴더에 있어야 정상 동작합니다.
*
* 참고한 원본 코드 링크
* https://slway000.tistory.com/74
#region Header
/* ============================================
* Aurthor : Strix
* Initial Creation Date : 2020-02-05
* Summary :
* Template : For Unity Editor V1
============================================ */
#endregion Header
using UnityEngine;