Thanks for your reply, I checked the DisplayPanelManagerHandler, but still no idea about disable user input when I open inventory panel, this is my settings:You can learn how we handle input by reading this page and it's child pages:
![]()
Input - Opsive
The built-in input uses the Input Manager for its input which has mouse, keyboard, and limited controller support. You may install the required Inputs for . . .opsive.com
For the Gamplay Panel specifically, I think you will find the options you need on the DisplayPanelManagerHandler component which is usually located on the Canvas gameobject next to the DisplayPanelManager component
protected IPlayerInput m_CharacterInput;
public IPlayerInput CharacterInput {
get => m_CharacterInput;
set => m_CharacterInput = value;
}
/// <summary>
/// Initialize all the properties.
/// </summary>
protected virtual void Awake()
{
if (m_CharacterInput == null) {
m_CharacterInput = GetComponent<IPlayerInput>();
}
EventHandler.RegisterEvent<bool>(gameObject, EventNames.c_CharacterGameObject_OnEnableGameplayInput_Bool, HandleEnableGameplayInput);
}
private void HandleEnableGameplayInput(bool enable)
{
enabled = enable;
}
/// <summary>
/// Update tick.
/// </summary>
public void Update()
{
var movementInput = new Vector3(CharacterInput.GetAxis(m_Character.HorizontalInput), 0, m_Character.CharacterInput.GetAxis(m_Character.VerticalInput));
//Do stuff here.
}
Hello, it works for me! Thanks!Sorry I was wrong it's on the DisplayPanelManager component:
View attachment 12640
Now if I understand correctly you want to enable/disable the input on your character.
If you are using the input system we provide with Opsive assets then you can use the IPlayerInput interface to check input. If you are using your own code to control input and you will need a way to know when UIS is trying to pause the input.
And you are right that's OnEnableGamePlayInput.
Here is an example:
Code:protected IPlayerInput m_CharacterInput; public IPlayerInput CharacterInput { get => m_CharacterInput; set => m_CharacterInput = value; } /// <summary> /// Initialize all the properties. /// </summary> protected virtual void Awake() { if (m_CharacterInput == null) { m_CharacterInput = GetComponent<IPlayerInput>(); } EventHandler.RegisterEvent<bool>(gameObject, EventNames.c_CharacterGameObject_OnEnableGameplayInput_Bool, HandleEnableGameplayInput); } private void HandleEnableGameplayInput(bool enable) { enabled = enable; } /// <summary> /// Update tick. /// </summary> public void Update() { var movementInput = new Vector3(CharacterInput.GetAxis(m_Character.HorizontalInput), 0, m_Character.CharacterInput.GetAxis(m_Character.VerticalInput)); //Do stuff here. }
NOTE: the parameter "gameobject" in the line:
EventHandler.RegisterEvent<bool>(gameObject, EventNames.c_CharacterGameObject_OnEnableGameplayInput_Bool, HandleEnableGameplayInput);
}
needs to the the same gameobject that the Input component is.
I removed it last night, now it looks fine. Thanks.Probably because of this component
View attachment 12653
Try click passthrough. If that does not work, remove that component. That should fix it for you