Update InputGlyphImage.cs
This commit is contained in:
parent
5e256faf03
commit
ca4d33698f
@ -2,10 +2,10 @@
|
|||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public sealed class InputGlyphImage : MonoBehaviour
|
|
||||||
public sealed class InputGlyphImage : InputGlyphBehaviourBase
|
public sealed class InputGlyphImage : InputGlyphBehaviourBase
|
||||||
{
|
{
|
||||||
[SerializeField] private InputActionReference actionReference;
|
[SerializeField] private InputActionReference actionReference;
|
||||||
|
[SerializeField] private string compositePartName;
|
||||||
[SerializeField] private Image targetImage;
|
[SerializeField] private Image targetImage;
|
||||||
[SerializeField] private bool hideIfMissing = false;
|
[SerializeField] private bool hideIfMissing = false;
|
||||||
[SerializeField] private GameObject hideTargetObject;
|
[SerializeField] private GameObject hideTargetObject;
|
||||||
@ -36,7 +36,7 @@ public sealed class InputGlyphImage : InputGlyphBehaviourBase
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasSprite = GlyphService.TryGetUISpriteForActionPath(actionReference, string.Empty, CurrentCategory, out Sprite sprite);
|
bool hasSprite = GlyphService.TryGetUISpriteForActionPath(actionReference, compositePartName, CurrentCategory, out Sprite sprite);
|
||||||
if (_cachedSprite != sprite)
|
if (_cachedSprite != sprite)
|
||||||
{
|
{
|
||||||
_cachedSprite = sprite;
|
_cachedSprite = sprite;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user