Page 1 of 1
Rewired Integration
Posted: Wed Aug 04, 2021 12:00 am
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
Re: Rewired Integration
Posted: Wed Aug 04, 2021 7:58 am
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.
Re: Rewired Integration
Posted: Wed Aug 04, 2021 10:27 am
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.
Re: Rewired Integration
Posted: Wed Aug 04, 2021 11:04 am
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 (4.59 KiB) Viewed 1981 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 (14.8 KiB) Viewed 1981 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 (55 KiB) Viewed 1981 times
Re: Rewired Integration
Posted: Wed Aug 04, 2021 11:19 am
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.
Re: Rewired Integration
Posted: Wed Aug 04, 2021 1:24 pm
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?
Re: Rewired Integration
Posted: Wed Aug 04, 2021 2:56 pm
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.
Re: Rewired Integration
Posted: Wed Aug 04, 2021 3:59 pm
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.