PortraitGenerator

Used to render portrait sprites from actor skins.

Static methods

Method

Description

GetTeamActorPortraitSprite(team)

Get the portrait sprite for the runtime generated actor portrait.

RenderSkinPortrait(mesh, materials, teamMaterialIndex, team)

Renders a portrait using the specified skin.

RenderTeamPortrait(team)

Renders a portrait using the specified team skin.

ResetPortraitRenderOffset()

Resets the camera offset for the next portrait render.

SetPortraitRenderOffset(positionOffset, rotationOffset)

Set a camera offset for the next portrait render.

Details

class PortraitGenerator
static Sprite GetTeamActorPortraitSprite(Team team)

Get the portrait sprite for the runtime generated actor portrait.

static Texture RenderSkinPortrait(Mesh mesh, array<Material> materials, int teamMaterialIndex, Team team)

Renders a portrait using the specified skin.

static Texture RenderTeamPortrait(Team team)

Renders a portrait using the specified team skin.

static void ResetPortraitRenderOffset()

Resets the camera offset for the next portrait render. This is automatically done after rendering any portrait.

static void SetPortraitRenderOffset(Vector3 positionOffset, Quaternion rotationOffset)

Set a camera offset for the next portrait render.