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?
Can't Add UIS Currency on Quest Complete
Re: Can't Add UIS Currency on Quest Complete
Hi,
Are you using the latest integration package available on Opsive's website?
Are you using the latest integration package available on Opsive's website?
Re: Can't Add UIS Currency on Quest Complete
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.
Re: Can't Add UIS Currency on Quest Complete
I backed up everything and reimported and it didn't change anything. I think I already had the latest.
Re: Can't Add UIS Currency on Quest Complete
Add this script to any GameObject in your scene:
EnableUISDebugging.cs
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."
EnableUISDebugging.cs
Code: Select all
using UnityEngine;
using PixelCrushers.UISSupport;
public class EnableUISDebugging : MonoBehaviour
{
void Start() { UISUtility.debug = true; }
}
Re: Can't Add UIS Currency on Quest Complete
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?
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?
Re: Can't Add UIS Currency on Quest Complete
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
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
Re: Can't Add UIS Currency on Quest Complete
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!
Re: Can't Add UIS Currency on Quest Complete
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!
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!