edited April 23 in ORK Support
Hey, I'm currently trying to start using animated versions of my character portraits during dialogue schematics. I set up a prefab that's a sprite with an animator component, and it works/animates fine if I drop it into a scene for testing. However, when I set up a schematic with an Actor that uses that prefab as its portrait, it doesn't display at all.

Here's my schematic, and my prefab, for reference:

image

image

Any ideas on what I'm doing wrong?
Post edited by LostForest on
Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • edited April 22
    Bump, still having trouble with this. Any insight would be super appreciated!
    Post edited by LostForest on
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • Portraits are part of the UI, i.e. they need to use UI components to be visible there.

    I.e. for sprite, you need to use an Image component (and animate that). Also, you need to add a portrait content to the UI box (prefab) to display portraits. E.g. via the scene hierarchy context menu: Makinom > UI Box > Portrait > Portrait (Empty) if you only use prefabs.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yes, I've already done that and have a Portrait (Empty) attached to the dialogue box prefab. See here:

    image

    Do I need to create a dummy animator component for it? As I said already, if I simply use a plain sprite in the schematic, it works fine. But using the prefab displays nothing at all.
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • No - you create a UI prefab with an Image and Animator handling the sprite animation and use that as the portrait prefab. The portrait component of your UI box will spawn the prefab.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited April 26
    Alright I've created this prefab in my UI prefabs folder. It has a sprite set as the Image component, and the sprite's animation controller for the Animator.

    image

    I have it set in my schematic and it still isn't working. What have I done wrong?
    Post edited by LostForest on
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • I spy a UI Portrait component on it - this component should be used on your UI box, not the prefab of your animated portrait.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Alright I removed the UI Portrait component from the portrait prefab, double-checked to make sure there was one on the UI Box prefab, double-checked the animator, double-checked the schematic, and still no success :\

    Here's my portrait prefab:
    image

    Here's my UI Dialogue prefab:
    image

    And the schematic, just for good measure:
    image
    image

    Any ideas?

    Thank you for all your patience! I truly appreciate it.
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • Hm, check the spawned UI box while the dialogue is displayed when testing - if it's working correctly, the portrait's prefab should be spawned as a child object of your UI box's portrait child object.
    Might be that it's just positioned wrong and displayed outside of the canvas/camera view. In that case you'd need to adjust the portrait prefab's position.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I'm having this same problem, pretty much same setup. The prefab displays fine if using a portrait prefab that is set as the ORK Player but defining one within the schematic (even using the very same portrait prefab that the player has) causes it to not appear.
  • edited April 27
    Ok I've solved it. Not sure if this method will work for you or is intended but here's what worked for me.

    1. Make a Combatant in ORK and set it up with your Portrait Prefab.

    2. Add a Add Combatant component to the NPC in your scene to the object you are interacting with. Set the Combatant to the one you want displayed as the portrait.

    3. Within your Schematic, setup an Actor with Actor Type Machine Object but don't Add a Portrait here. Then in your show dialogue node select Show Portraits, with the Machine Object Actor selected and then the portrait type you want defined.

    Should appear then if your portrait UI is setup in the correct position. That's what worked for me. Defining one within the Schematic Settings itself though and calling it via the Dialogue node as a portrait still won't work though. But this workaround setup works for my use case.

    Hope it helps.
    Post edited by supportreport1 on
  • AT LONG LAST, I finally figured out the issue. The sprite in the prefab was being spawned off-camera like you thought, GiL. Specifically, it was being spawned the width of the image itself, so once I gave it an position transform of its own width, it has finally showed up!

    Thank you thank you thank you, GiL! You're the best!

    Also, thanks for the additional help, SupportReport! If I run into other trouble with it down the line, I'll keep your advice handy too
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • @supportreport1
    Tested it and it's definitely working.

    Check your UI box's portrait setup - e.g. if you have Sprite Disable If Empty enabled and no sprite prefab is displayed, the game object the Image component is on will be disabled.
    If that's the same game object as the portrait component it'll also disable the spawned prefab.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I reverted back to test it out and still have the same problem even after disabling Sprite Disable If Empty.

    Only displays if it's pulled from a combatant.
Sign In or Register to comment.