Last active
March 28, 2022 07:04
-
-
Save ina-amagami/7512a1f30ed4dd778993fb06ef1acafd to your computer and use it in GitHub Desktop.
uGUIで描画を行わない、入力をとるだけの専用コンポーネント
This file contains 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 UnityEngine; | |
using UnityEngine.UI; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class HideImage : Graphic | |
{ | |
public override Material material | |
{ | |
get => null; | |
set {} | |
} | |
public override Material materialForRendering => null; | |
public override void SetAllDirty() | |
{ | |
SetLayoutDirty(); | |
} | |
public override void SetVerticesDirty() { } | |
public override void SetMaterialDirty() { } | |
protected override void UpdateGeometry() { } | |
protected override void OnPopulateMesh(VertexHelper vh) { } | |
} | |
#if UNITY_EDITOR | |
[CustomEditor(typeof(HideImage))] | |
public class HideImageEditor : Editor | |
{ | |
public override void OnInspectorGUI() | |
{ | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment