Also, this pseudocode represents the logic I want my subtitle panels to follow:
Code: Select all
speakerHasPortraitImage ? usePortraitSubtitleUI() : usePlainSubtitleUI();
Code: Select all
speakerHasPortraitImage ? usePortraitSubtitleUI() : usePlainSubtitleUI();
Code: Select all
void OnConversationLine(Subtitle subtitle)
{
string fieldValue = Field.LookupValue(subtitle.dialogueEntry.fields, "PortraitEmotion"); // Will be empty string if no field.
bool speakerHasPortraitImage = !string.IsNullOrEmpty(fieldValue);
if (speakerHasPortraitImage)
{
// Set pic=# value:
subtitle.formattedText.pic = // some value according to your logic
// Can also change which subtitle panel to use:
subtitle.formattedText.subtitlePanelNumber = //something according to your logic
}
}