UIS - Saving/Loading AttributeManager>Attribute Issues

clintond

New member
Hi Santiago

I'm using UIS and PixelCrushers SaveSystem.

Everything is working as expected, except for SAVE/LOAD Attribute data on a prefab item.

Here's some points:

  • Character Attributes SAVE/LOAD fine.
  • Items within the Inventory SAVE/LOAD fine.
  • Equipped items SAVE/LOAD fine.
The issue is specific to Attributes on items. The Attributes are not being stored/restored.

I spoke with Tony and he suggested this is handled by UIS, not the SaveSystem.

In my specific case, the Attribute is stored on a prefab which is picked up.

Just to re-iterate, everything works fine except for the Attribute on the picked up Item.

Here's the link to the thread I have going with Tony.


Would appreciate any thoughts you have on why this might be happening and perhaps what further I can try to isolate the exact issue.

Thanks.
 
Last edited:
Hey @clintond

I had a look at your post on the pixel crushers forum.

To me it's not quite clear the structure if your flashlight.

Just to clear things up. UIS only saves item attributes for unique and mutable items. It does not save UCC attributes.

For example when saving Ammo. we save the AmmoData on the UIS item. When it is loaded the UCC Character Item takes in the loaded AmmoData to define how much ammo the Character item has inside the weapon

So it's not quite clear to me if your flash light battery is a ITEM float attribute or a UCC attribute of the flashlight prefab. Only the former is saved.

You can sync item attributes to properties on the UCC item instance using the ItemAttributeBinding component. It should all work automatically.

Feel free to send me a video or some screenshot of your flashlight to explain your issue in more detail and show your exact setup. That might help identify the issue
 
Hi Santiago.

Thanks for your reply.

You helped clarify a couple of things, which meant I was able to get it to work with a little bridging script between the UCC AttributeManager Attribute, and the UIS ItemCategory Attribute.

To be clear; the goal was to save a UCC AttributeManager Attribute. The bridging script now syncs this attribute value across to the UIS Attribute value, and the Load/Save works as expected.

For completeness, here is the bridging script:

Thanks again.

--
 

Attachments

Back
Top