Hi. Can I, for example, do something like this:

1. Make a model of character with all armors avaible in the game, export to Unity and make some of them unvisible
2. Then in ORK Framework make Event with: Check Equipment (if helmet equipped) -> Success -> Object Visible (Found Objects - Value: "Helmet_Arkadian_Mesh" Set Visible - Yes).
3. When helmet is not equipped -> Object Visible -> Found Objects - Value: "Helmet_Arkadian_Mesh" Set Visible - No.

What do you think? I'm going to do this to check by myself, but I want to know, if this is going to do some bugs? :P

Thanks for answers :) And sorry for my english.
  • The main issue that you might encounter here is that you'll need to respond to an "equipment changed" event (programming event, not ORK Event) so that you're not having to run these checks every update "tick."

    Luckily, ORK's Equipment Viewer component already handles all of this for you. You assign an equipment slot to an Equipment Viewer, and it listens for EquipmentChanged events. When it handles such an event, it checks to see if the item in its assigned slot has changed. If it has, then it instantiates the associated Viewer Prefab for the weapon/armor and destroys the old one.

    Now the intent is for the EVs to display the weapon/armor models on the character. But you can also just assign an empty GameObject as the Viewer Prefab. And on that GO, you can place a simple component that will enable or disable the mesh that you want to hide or display. You could have a public string field on that component where you specify the name of the mesh, and all you'd need is a few lines of code in the Start() method to search for that mesh, store the reference, and turn it on. Then probably one line of code in OnDestroy() to turn it off.

    This is essentially the pattern I use for hooking up UMA slots with ORK, so I know it works. If you need help with the component, I can assist with that.
Sign In or Register to comment.