Add support for images in dialogue windows (#19)

- Extend editor nodes with custom DialogueContent data type that holds either image or text
- Extend the dialogue importer to correctly process the new content into updated RuntimeDialogue content
- Update SpeechBubble to be able to display either text or image
- Add a custom property drawer for the DialogueContent to allow easy switching in graph authoring

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #19
This commit is contained in:
2025-10-08 09:34:58 +00:00
parent 7b949c5cb8
commit 3807ac652c
19 changed files with 1128 additions and 461 deletions

View File

@@ -309,7 +309,7 @@ PrefabInstance:
objectReference: {fileID: 517425340}
- target: {fileID: 6254953093500072797, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6303063351359542479, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: m_Sprite
@@ -603,7 +603,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6254953093500072797, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6350287859698694726, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: m_Name
@@ -777,7 +777,7 @@ PrefabInstance:
objectReference: {fileID: 11400000, guid: 9de0c57af6191384e96e2ba7c04a3d0d, type: 2}
- target: {fileID: 6254953093500072797, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6303063351359542479, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: m_Sprite
@@ -972,11 +972,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 2.55
value: 0.6806664
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.17
value: 1.4252888
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@@ -1068,6 +1068,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.SpeechBubble
textDisplay: {fileID: 677854361}
imageDisplay: {fileID: 0}
displayMode: 1
typewriterSpeed: 0.02
typingSoundSource: {fileID: 0}
@@ -1286,7 +1287,7 @@ PrefabInstance:
objectReference: {fileID: 11400000, guid: a84cbe9804e13f74e857c55d90cc10d1, type: 2}
- target: {fileID: 6254953093500072797, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6303063351359542479, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: m_Sprite
@@ -1411,7 +1412,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -1832,6 +1833,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.SpeechBubble
textDisplay: {fileID: 614125440}
imageDisplay: {fileID: 0}
displayMode: 1
typewriterSpeed: 0.02
typingSoundSource: {fileID: 0}
@@ -1970,7 +1972,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 592045584872845087, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
@@ -2281,7 +2283,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
propertyPath: characterToInteract
value: 1
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -2892,11 +2894,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 2.55
value: 0.5560436
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.17
value: 1.3006666
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.x