Duplicate UI-Schema does not work if Demo folder was not imported

Gugbert

New member
I would expect that the inventory solution works without the need of importing demo code or assets. To keep things clean and memory usage low, I never import demo stuff in my main project. But then I cannot duplicate the UI-schema. Tested with UIS 1.2.9 and Unity 2020.3 and 2021.3.
 
That is most likely a bug since I remember expressively making the schemas independent from the demo assets a few versions ago.
I'll make sure to fix it in the next update
 
It seems to be the Category Item View Set Equipment scriptable object, which references the Empty Equipment Item View.prefab and the Item View With Amount.prefab.

For those who don't want to wait for an official fix, here is a workaround ( at least it worked for me ):
Import the following file from the Demo Folder:
  • Empty Equipment Item View.prefab

Move this file to UIDesignerSchemas/RPGSchema/Prefabs or the UIDesignerSchemas/ClassicSchema/Prefabs whichever you want to use.
If you want to copy both schemas, you need, to copy it into both folders, and set the appropriate fields in the Category Item View Set Equipment.asset in the UIDesignerSchemas/RPGSchema and the UIDesignerSchemas/ClassicSchema.

If you want to copy the Classic schema, in the Equipment Item View Slots Container.prefab , you must set the Item Slot Set to none. (see screenshot)

In the Category Item View Set Equipment.asset replace Item View With Amount in Category/Item View Prefab with Empty Equipment Item View.prefab ( see screenshot )

For the sake of consistency I renamed Category Item View Set Equipment to Category Item View Set For Equipment and Empty Equipment Item View.prefab to Item View For Equipment.prefab ( but that is not necessary ).

Then you can copy the schema.

The reason why I replaced the Item View With Amount is that this prefab references more Demo stuff and, there is still a bug in the deep copy of the Category Item View Set.asset ( https://opsive.com/forum/index.php?...chema-using-prefabs-from-classic-schema.6715/ and https://opsive.com/forum/index.php?...d-prefab-is-taken-from-the-wrong-schema.7391/).

@Sangemdoko:
The prefab in Empty Item View is not copied if it is different from the one in Category/Item View Prefab and therefore still references the original location. If both prefabs are the same it works.
 

Attachments

  • categ item view.JPG
    categ item view.JPG
    45.5 KB · Views: 10
  • item slot set.JPG
    item slot set.JPG
    161.2 KB · Views: 9
Last edited:
Top