Skip to content

Instantly share code, notes, and snippets.

@LightGive
Forked from tsubaki/GraphicCast.cs
Last active May 9, 2018 08:35
Show Gist options
  • Save LightGive/6e07773be82c544c1833f9b981a32ddc to your computer and use it in GitHub Desktop.
Save LightGive/6e07773be82c544c1833f9b981a32ddc to your computer and use it in GitHub Desktop.
GraphicRaycasterの当たり判定だけを使う
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace UnityEngine.UI
{
public class GraphicCast : Graphic
{
//廃止
//protected override void OnFillVBO (System.Collections.Generic.List<UIVertex> vbo)
//{
// base.OnFillVBO (vbo);
// vbo.Clear();
//}
protected override void OnPopulateMesh(UI.VertexHelper vh)
{
base.OnPopulateMesh(vh);
vh.Clear();
}
#if UNITY_EDITOR
[CustomEditor(typeof(GraphicCast))]
class GraphicCastEditor : Editor
{
public override void OnInspectorGUI()
{
}
}
#endif
}
}
@LightGive
Copy link
Author

テラシュールさんのコード、OnFillVBOが古くなって廃止されたので新しいバージョン用に書き換えました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment