Rewired Integration

Announcements, support questions, and discussion for Quest Machine.
Post Reply
GearedGeek
Posts: 4
Joined: Tue Aug 03, 2021 11:55 pm

Rewired Integration

Post by GearedGeek »

I'm running into an error when trying to get the Rewired integration working with UCC + Quest Machine. I'm not sure where I need to assign the "Input Device Manager Rewired". I have tried assigning it to "Rewired Input Manager" but I get this error,

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.RewiredSupport.InputDeviceManagerRewired.Start () (at Assets/Pixel Crushers/Common/Third Party Support/Rewired Support/InputDeviceManagerRewired.cs:28)
Any chance we can get some type of document on how to set up Rewired Integration? Thanks
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Rewired Integration

Post by Tony Li »

Hi,

Add Quest Machine's Input Device Manager prefab to your scene, or add an Input Device Manager component to your Quest Machine GameObject. Or, if you're using the Dialogue System for Unity, the Dialogue Manager GameObject already has an Input Device Manager component.

In any case, your scene should have exactly one Input Device Manager component. Add the Input Device Manager Rewired component to the same GameObject. That's all you need to do, other than making sure the inputs named on the Input Device Manager component and any UI Button Key Trigger components are defined in your Rewired Input Manager.
GearedGeek
Posts: 4
Joined: Tue Aug 03, 2021 11:55 pm

Re: Rewired Integration

Post by GearedGeek »

I’m sorry but I’m still lost. Can you something like a video or picture of the set up to get this working?

I currently have the Rewired Input Manager in the scene from the UCC Rewired integration. I have the Rewired Input component attached the the character that was also included in the UCC Rewired integration. I also have the Rewired Event System that was added from the Rewired menu in Unity.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Rewired Integration

Post by Tony Li »

Hi,

Check if your scene has an Input Device Manager component. An easy way to do this is to search for "t:InputDeviceManager" in the Hierarchy's search bar:

inputDeviceManagerRewired0.png
inputDeviceManagerRewired0.png (4.59 KiB) Viewed 1997 times

If you don't see one, add the Input Device Manager prefab. It's located in Assets / Plugins / Pixel Crushers / Quest Machine / Prefabs. If you see one already, inspect that GameObject. Either way, add an Input Device Manager Rewired component to it:

inputDeviceManagerRewired1.png
inputDeviceManagerRewired1.png (14.8 KiB) Viewed 1997 times

Finally, check the Input Device Manager component for any input names such as "Submit". Define them as corresponding actions in your Rewired Input Manager, or set them to actions that are already defined in your Rewired Input Manager (e.g., "UIInput").

inputDeviceManagerRewired2.png
inputDeviceManagerRewired2.png (55 KiB) Viewed 1997 times
GearedGeek
Posts: 4
Joined: Tue Aug 03, 2021 11:55 pm

Re: Rewired Integration

Post by GearedGeek »

I found the Input Device Manager prefab in the specific location as you listed. I drag/drop that prefab into my current scene with the Rewired Input Manager and Rewired Event System. Then I added the Input Device Manager Rewired component to that Input Device Manager prefab I just added to the scene.

You mentioned the Submit button. I added a Action in the Rewired Input Manager and assign it to key F. I can run the scene without any errors now but the character doesn't do anything when I move it to the NPC quest giver.

Do I need to check the Rewired Standalone Input Module? It's showing the Submit Button as "UISubmit"?

EDIT: I just tried changing the Submit Button to UISubmit on the Input Device Manager prefab but still nothing happened with the character.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Rewired Integration

Post by Tony Li »

Hi,

What's supposed to happen when the player moves to the NPC quest giver?

Also, are there any errors or warnings in the Console window?
GearedGeek
Posts: 4
Joined: Tue Aug 03, 2021 11:55 pm

Re: Rewired Integration

Post by GearedGeek »

Just like the Quest Machine demo from UCC. The character walks up to the Quest Giver and the player press a key to interact with the Quest Giver. At that point the player can accept the quest.

There are no errors or warnings.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Rewired Integration

Post by Tony Li »

Got it. That interaction trigger has nothing to with Quest Machine, other than the result is that it starts a Quest Machine dialogue.

The interaction trigger itself, however, is handled entirely by UCC. Compare your NPC's configuration with the Knight in the demo scene. Some things to check:
  • Has a rigidbody and collider.
  • Has an Interactable set to ID -1, with Targets list pointing to the QuestGiverInteractableTarget component.
  • Has a QuestGiverInteractableTarget component.
  • Has a QuestGiver component.
  • GameObject is on a layer that at least one of the player's Interact abilities can detect.
Make sure your player has an Interact ability that can detect the NPC.
Post Reply