Hey there.

I'm crafting my game menus and another issue has struck me.
I have only the group leader in the field, but in menu I need to show the character models of group and non group members.

I tried doing It as usual, creating a camera inside the character prefab that outputs into a render texture, and setting this render texture to an avatar type (Full mody model).

The issue is that the field leader profile is rendered, but other characters don't.

OFC after 5 minutes I realized that since they are not instantiated there was no cameras to render the texture.

Is there anyway to setup this?
  • You can use ORK's prefab view portraits for this. They spawn prefabs for your combatants (or items, equipment, etc.) and handle the camera/texture stuff.

    The default prefab view settings can be found in UI > UI Settings > ORK UI Settings > Prefab View Settings. You can define the camera (prefab) and render texture stuff here.
    To use a prefab view portrait to a combatant, add a regular portrait and enable Use Prefab View in it. It'll use the prefab of the combatant but can optionally also use a defined 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!
  • Thank you @gamingislove !

    I just got it working! I fumbled along until I discovered the offset (prefabs were spawning on top of each other), and now works like a charm!

    image
  • Hm, that's strange - the default setup in a new project should already spawn them with an offset of -10 on the Y-axis to prevent that.
    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!
  • Sorry to necro this thread, but can you please explain how to setup a Camera Prefab? Is it literally just a camera object dragged into the asset folder? Anything special that needs to be tweaked on it?
  • Basically, yes, that's all that's needed.
    However, you might want to change some settings on it, e.g. having a fully transparent background color or only rendering specific layers (via the culling mask).
    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!
  • Hmnm, I can't get anything to show.

    Any idea on where I'm missing something?
    UI settings
    Prefab Settings
    Hud Settings
    Result
  • edited August 21
    You didn't set a Render Texture in the prefab view camera settings.
    The prefab view works with a camera putting what it sees into a render texture, which is displayed by your UI.
    Post edited by gamingislove on
    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!
  • ah thanks, I've created on (just default settings) and assigned it. However, it's still not displaying anything.
    I saw in another thread the portrait content had to have a RawImage type, so i've added that as well to the HUD.

    I note that while the game is running, the portrait content is grayed out, like it's disabled?
  • I've found that I need to create another portrait, instead of creating a new portrait set. That's fixed the issue.
Sign In or Register to comment.