Can't Add UIS Currency on Quest Complete

Announcements, support questions, and discussion for Quest Machine.
Post Reply
jkaczmar
Posts: 15
Joined: Thu Jun 29, 2023 7:15 pm

Can't Add UIS Currency on Quest Complete

Post by jkaczmar »

I'm having problems getting the UIS Add Currency (or Remove Currency) to work on Quest Complete. It seems to only be a problem with currency. I'm able to change a UCC attribute (e.g. Experience) on Quest Complete. I'm also able to add a UIS Item on Quest Complete.

The currency add/remove is the only issue I'm having. I've tried both leaving the currency owner blank and hard coding it to Player. I've triple checked that my currency name is accurate (e.g. Credits in my case). Any ideas on other stuff to check?
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Add UIS Currency on Quest Complete

Post by Tony Li »

Hi,

Are you using the latest integration package available on Opsive's website?
jkaczmar
Posts: 15
Joined: Thu Jun 29, 2023 7:15 pm

Re: Can't Add UIS Currency on Quest Complete

Post by jkaczmar »

The version I'm using was downloaded on 01/25/2025. Did a more recent one just drop? It's not versioned on the website so it's hard to tell other than looking at byte size of the two files. I can do a quick backup and see if reimporting fixes anything if you think that is the issue.
jkaczmar
Posts: 15
Joined: Thu Jun 29, 2023 7:15 pm

Re: Can't Add UIS Currency on Quest Complete

Post by jkaczmar »

I backed up everything and reimported and it didn't change anything. I think I already had the latest.
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Add UIS Currency on Quest Complete

Post by Tony Li »

Add this script to any GameObject in your scene:

EnableUISDebugging.cs

Code: Select all

using UnityEngine;
using PixelCrushers.UISSupport;
public class EnableUISDebugging : MonoBehaviour
{
    void Start() { UISUtility.debug = true; }
}
Then try again. Check the Console window for messages such as "UISUtility.GetCurrency: Can't find currency named 'Credits'." and "UISUtility.GetCurrencyOwner: Can't find GameObject tagged 'Player' to access Currency Owner."
jkaczmar
Posts: 15
Joined: Thu Jun 29, 2023 7:15 pm

Re: Can't Add UIS Currency on Quest Complete

Post by jkaczmar »

OK, I think I found the issue. It can't find the currency owner on one of the Capsule Colliders buried deep in the Player hierarchy that is also tagged as "Player". I believe it has to be tagged this way as it is the Capsule Collider that UCC uses for surface detection for sounds like pavement, sand, metal, etc. The rest of the Player hierarchy, with the exception of the topmost element in the hiearchy that has much of the code can be Untagged and it is.

For some reason the QM UCC Attribute code and the QM UIS Item code points at the topmost element in the player hierarchy, but the QM UIS Currency code is looking deeper into the player hierarchy, finds an element tagged Player that doesn't have a Currency Owner on it, and then fails.

I would just cheese a fix and move the Currency owner deeper in the hierarchy so that the QM UIS code can find it, but I have a multi-model player for outfit changes so there is one of the these colliders for each model. In other words, that fix wouldn't work.

Any other approaches that you can think of to fix it?
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Add UIS Currency on Quest Complete

Post by Tony Li »

Hi,

You can give a unique name to the "Player"-tagged GameObject that has the CurrencyOwner component, and then specify that name in the quest action.

Or try this patch, which will check all GameObjects tagged "Player" for a CurrencyOwner component:

PixelCrushers_UIS_Patch_2025-03-05.unitypackage
jkaczmar
Posts: 15
Joined: Thu Jun 29, 2023 7:15 pm

Re: Can't Add UIS Currency on Quest Complete

Post by jkaczmar »

I can't change the Tag as its used by UCC and a bunch of other products to find the player, but the patch worked perfectly. Thanks for the help today!
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Add UIS Currency on Quest Complete

Post by Tony Li »

Hi,

Great! BTW, for the alternate (non-patch) approach, you wouldn't have had to change the tag. You'd change the name of the GameObject to a unique name (e.g., "PlayerCurrencyOwner") and then specify that name in the action. But the patch is the easier way to go!
Post Reply