Add audio to dialogues
This commit is contained in:
@@ -26,6 +26,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: 4728896231509914993, guid: 27419b0e3639a3e4184d676890da073a, type: 3}
|
_image: {fileID: 4728896231509914993, guid: 27419b0e3639a3e4184d676890da073a, type: 3}
|
||||||
|
_audio: {fileID: 8300000, guid: 975d8d57c80dbbd478eff9545f015f8f, type: 3}
|
||||||
- rid: 4008004961021984848
|
- rid: 4008004961021984848
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -33,6 +34,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -1125559343802010594, guid: 46b2fe6896b27cc4c8bd9f0da3f0de50, type: 3}
|
_image: {fileID: -1125559343802010594, guid: 46b2fe6896b27cc4c8bd9f0da3f0de50, type: 3}
|
||||||
|
_audio: {fileID: 8300000, guid: 975d8d57c80dbbd478eff9545f015f8f, type: 3}
|
||||||
- rid: 4008004961021984849
|
- rid: 4008004961021984849
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -40,6 +42,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -642587728066523507, guid: 95d6dbee5cb1f694c971791ee60cad14, type: 3}
|
_image: {fileID: -642587728066523507, guid: 95d6dbee5cb1f694c971791ee60cad14, type: 3}
|
||||||
|
_audio: {fileID: 8300000, guid: 975d8d57c80dbbd478eff9545f015f8f, type: 3}
|
||||||
- rid: 4008004961021984850
|
- rid: 4008004961021984850
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -47,6 +50,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -8438005379329254897, guid: fe735eb4f8856904caec179520dcb92f, type: 3}
|
_image: {fileID: -8438005379329254897, guid: fe735eb4f8856904caec179520dcb92f, type: 3}
|
||||||
|
_audio: {fileID: 8300000, guid: 975d8d57c80dbbd478eff9545f015f8f, type: 3}
|
||||||
- rid: 4008004961021984866
|
- rid: 4008004961021984866
|
||||||
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
|
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -454384845472657506, guid: bbfabe7e36be4f341a775b4323900b5b, type: 3}
|
_image: {fileID: -454384845472657506, guid: bbfabe7e36be4f341a775b4323900b5b, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799721
|
- rid: 4008004961314799721
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -435,6 +436,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799723
|
- rid: 4008004961314799723
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -446,6 +448,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799725
|
- rid: 4008004961314799725
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -479,6 +479,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -3811075571101519331, guid: cf5af87e6a25e9442b89f069b894a5fd, type: 3}
|
_image: {fileID: -3811075571101519331, guid: cf5af87e6a25e9442b89f069b894a5fd, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799811
|
- rid: 4008004961314799811
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -490,6 +491,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799813
|
- rid: 4008004961314799813
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -501,6 +503,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799815
|
- rid: 4008004961314799815
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -479,6 +479,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: 21300000, guid: 34b9ddb77aae2df4ab489b7bb8f16cff, type: 3}
|
_image: {fileID: 21300000, guid: 34b9ddb77aae2df4ab489b7bb8f16cff, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799855
|
- rid: 4008004961314799855
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -490,6 +491,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799857
|
- rid: 4008004961314799857
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -501,6 +503,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799859
|
- rid: 4008004961314799859
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -479,6 +479,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -8203946286166492161, guid: 6cb19dd8ad625c543abe9aa233cd676d, type: 3}
|
_image: {fileID: -8203946286166492161, guid: 6cb19dd8ad625c543abe9aa233cd676d, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799899
|
- rid: 4008004961314799899
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -490,6 +491,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799901
|
- rid: 4008004961314799901
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -501,6 +503,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
_image: {fileID: -5941552768301239376, guid: 300528d856c15824989bade57a7e04e4, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799903
|
- rid: 4008004961314799903
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: 1487011052474782424, guid: f489e2c9ce64ff34aa3c7a91a4edbd77, type: 3}
|
_image: {fileID: 1487011052474782424, guid: f489e2c9ce64ff34aa3c7a91a4edbd77, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 4008004961314799763
|
- rid: 4008004961314799763
|
||||||
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -167,6 +168,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: 1487011052474782424, guid: f489e2c9ce64ff34aa3c7a91a4edbd77, type: 3}
|
_image: {fileID: 1487011052474782424, guid: f489e2c9ce64ff34aa3c7a91a4edbd77, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7772910664224079994
|
- rid: 7772910664224079994
|
||||||
type: {class: GraphModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
|
type: {class: GraphModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -1123,6 +1123,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Hey boy, go on and pick up that ass over there!
|
_text: Hey boy, go on and pick up that ass over there!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976304
|
- rid: 7545629632211976304
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1130,6 +1131,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: "Go on, it's right there!\t\t"
|
_text: "Go on, it's right there!\t\t"
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976305
|
- rid: 7545629632211976305
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1137,6 +1139,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: I need ASS!
|
_text: I need ASS!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976306
|
- rid: 7545629632211976306
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1144,6 +1147,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: C'mon, don't be like this!
|
_text: C'mon, don't be like this!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976307
|
- rid: 7545629632211976307
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1151,6 +1155,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Yessss, that's the stuff, now chop it!
|
_text: Yessss, that's the stuff, now chop it!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976308
|
- rid: 7545629632211976308
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1158,6 +1163,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: 6282751622250221668, guid: 204325ac88be74d4d882a078c64cf5e1, type: 3}
|
_image: {fileID: 6282751622250221668, guid: 204325ac88be74d4d882a078c64cf5e1, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976309
|
- rid: 7545629632211976309
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1165,6 +1171,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Chop it!!
|
_text: Chop it!!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976310
|
- rid: 7545629632211976310
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1172,6 +1179,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Good, shit now cook!
|
_text: Good, shit now cook!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976311
|
- rid: 7545629632211976311
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1179,6 +1187,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: 6282751622250221668, guid: 204325ac88be74d4d882a078c64cf5e1, type: 3}
|
_image: {fileID: 6282751622250221668, guid: 204325ac88be74d4d882a078c64cf5e1, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976312
|
- rid: 7545629632211976312
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1186,6 +1195,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: What exactly are you cooking?!
|
_text: What exactly are you cooking?!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976313
|
- rid: 7545629632211976313
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1193,6 +1203,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: What exactly are you cooking?!
|
_text: What exactly are you cooking?!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976314
|
- rid: 7545629632211976314
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -1200,3 +1211,4 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Yessssss, thanks!
|
_text: Yessssss, thanks!
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
|
|||||||
@@ -656,6 +656,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Some other test
|
_text: Some other test
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976295
|
- rid: 7545629632211976295
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -663,6 +664,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Some much longer text in here etc.
|
_text: Some much longer text in here etc.
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976296
|
- rid: 7545629632211976296
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -670,6 +672,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Some oooother text
|
_text: Some oooother text
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976297
|
- rid: 7545629632211976297
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -677,6 +680,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -765527507412255412, guid: f70246e6148769846aaea223ec0c2a55, type: 3}
|
_image: {fileID: -765527507412255412, guid: f70246e6148769846aaea223ec0c2a55, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976298
|
- rid: 7545629632211976298
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -684,6 +688,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Now it's text
|
_text: Now it's text
|
||||||
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976301
|
- rid: 7545629632211976301
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -691,6 +696,7 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Psst, I'm just testing some stuff df
|
_text: Psst, I'm just testing some stuff df
|
||||||
_image: {fileID: 0}
|
_image: {fileID: 0}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976302
|
- rid: 7545629632211976302
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -698,6 +704,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976322
|
- rid: 7545629632211976322
|
||||||
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -737,6 +744,7 @@ MonoBehaviour:
|
|||||||
_contentType: 1
|
_contentType: 1
|
||||||
_text:
|
_text:
|
||||||
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
- rid: 7545629632211976324
|
- rid: 7545629632211976324
|
||||||
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
type: {class: 'Constant`1[[Dialogue.DialogueContent, AppleHillsScripts]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
|
||||||
data:
|
data:
|
||||||
@@ -744,3 +752,4 @@ MonoBehaviour:
|
|||||||
_contentType: 0
|
_contentType: 0
|
||||||
_text: Now it's text again and it should loop!
|
_text: Now it's text again and it should loop!
|
||||||
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
_image: {fileID: -9213056636207805707, guid: 00354ded9d8f8d643acc14837a229544, type: 3}
|
||||||
|
_audio: {fileID: 0}
|
||||||
|
|||||||
@@ -11,33 +11,44 @@ namespace Dialogue.Editor
|
|||||||
{
|
{
|
||||||
// Height constants
|
// Height constants
|
||||||
private const float TypeSelectorHeight = 20f;
|
private const float TypeSelectorHeight = 20f;
|
||||||
private const float PropertySpacing = 2f;
|
private const float PropertySpacing = 2f; // Reduced spacing for tighter layout
|
||||||
private const float TextFieldHeight = 40f; // Taller for multi-line text
|
private const float TextFieldHeight = 40f; // Taller for multi-line text
|
||||||
private const float ImageFieldHeight = 18f;
|
private const float ImageFieldHeight = 18f;
|
||||||
|
private const float AudioFieldHeight = 18f;
|
||||||
private const float PreviewHeight = 64f;
|
private const float PreviewHeight = 64f;
|
||||||
|
|
||||||
|
// Track the last assigned sprite to detect changes
|
||||||
|
private static Sprite lastAssignedSprite;
|
||||||
|
private static string lastAssignedPropertyPath;
|
||||||
|
|
||||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||||
{
|
{
|
||||||
var contentTypeProperty = property.FindPropertyRelative("_contentType");
|
var contentTypeProperty = property.FindPropertyRelative("_contentType");
|
||||||
|
var imageProperty = property.FindPropertyRelative("_image");
|
||||||
|
|
||||||
|
// Start with base height for type selector
|
||||||
var height = TypeSelectorHeight + PropertySpacing;
|
var height = TypeSelectorHeight + PropertySpacing;
|
||||||
|
|
||||||
// Add height based on content type
|
// Add height based on content type
|
||||||
if (contentTypeProperty.enumValueIndex == (int)DialogueContentType.Text)
|
if (contentTypeProperty.enumValueIndex == (int)DialogueContentType.Text)
|
||||||
{
|
{
|
||||||
height += TextFieldHeight;
|
height += TextFieldHeight + PropertySpacing;
|
||||||
}
|
}
|
||||||
else // Image
|
else // Image
|
||||||
{
|
{
|
||||||
height += ImageFieldHeight;
|
height += ImageFieldHeight + PropertySpacing;
|
||||||
|
|
||||||
// Add preview height if an image is assigned
|
// Add preview height if an image is assigned - make sure it's AFTER the image field
|
||||||
var imageProperty = property.FindPropertyRelative("_image");
|
// but BEFORE the audio field
|
||||||
if (imageProperty.objectReferenceValue != null)
|
if (imageProperty.objectReferenceValue != null)
|
||||||
{
|
{
|
||||||
height += PropertySpacing + PreviewHeight;
|
height += PreviewHeight + PropertySpacing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add height for audio field (always displayed)
|
||||||
|
height += AudioFieldHeight;
|
||||||
|
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,15 +65,58 @@ namespace Dialogue.Editor
|
|||||||
var contentTypeProperty = property.FindPropertyRelative("_contentType");
|
var contentTypeProperty = property.FindPropertyRelative("_contentType");
|
||||||
var textProperty = property.FindPropertyRelative("_text");
|
var textProperty = property.FindPropertyRelative("_text");
|
||||||
var imageProperty = property.FindPropertyRelative("_image");
|
var imageProperty = property.FindPropertyRelative("_image");
|
||||||
|
var audioProperty = property.FindPropertyRelative("_audio");
|
||||||
|
|
||||||
// Calculate rects
|
// Check for sprite changes and force repaint if needed
|
||||||
var typeRect = new Rect(contentRect.x, contentRect.y, contentRect.width, TypeSelectorHeight);
|
var currentSprite = imageProperty.objectReferenceValue as Sprite;
|
||||||
|
if (currentSprite != lastAssignedSprite && property.propertyPath == lastAssignedPropertyPath)
|
||||||
|
{
|
||||||
|
// Sprite changed, force a layout recalculation
|
||||||
|
EditorUtility.SetDirty(property.serializedObject.targetObject);
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Track current y position as we add controls
|
||||||
|
float currentY = contentRect.y;
|
||||||
|
|
||||||
|
// Calculate type rect
|
||||||
|
var typeRect = new Rect(contentRect.x, currentY, contentRect.width, TypeSelectorHeight);
|
||||||
|
currentY += TypeSelectorHeight + PropertySpacing;
|
||||||
|
|
||||||
|
// Calculate content field rect based on the content type
|
||||||
|
var contentHeight = contentTypeProperty.enumValueIndex == (int)DialogueContentType.Text ?
|
||||||
|
TextFieldHeight : ImageFieldHeight;
|
||||||
|
|
||||||
var contentFieldRect = new Rect(
|
var contentFieldRect = new Rect(
|
||||||
contentRect.x,
|
contentRect.x,
|
||||||
contentRect.y + TypeSelectorHeight + PropertySpacing,
|
currentY,
|
||||||
contentRect.width,
|
contentRect.width,
|
||||||
contentTypeProperty.enumValueIndex == (int)DialogueContentType.Text ? TextFieldHeight : ImageFieldHeight);
|
contentHeight);
|
||||||
|
|
||||||
|
currentY += contentHeight + PropertySpacing;
|
||||||
|
|
||||||
|
// If we have an image and it's selected, calculate preview rect
|
||||||
|
Rect previewRect = Rect.zero;
|
||||||
|
if (contentTypeProperty.enumValueIndex == (int)DialogueContentType.Image &&
|
||||||
|
imageProperty.objectReferenceValue != null)
|
||||||
|
{
|
||||||
|
previewRect = new Rect(
|
||||||
|
contentRect.x,
|
||||||
|
currentY,
|
||||||
|
contentRect.width,
|
||||||
|
PreviewHeight);
|
||||||
|
|
||||||
|
currentY += PreviewHeight + PropertySpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate audio field rect
|
||||||
|
var audioFieldRect = new Rect(
|
||||||
|
contentRect.x,
|
||||||
|
currentY,
|
||||||
|
contentRect.width,
|
||||||
|
AudioFieldHeight);
|
||||||
|
|
||||||
|
// Now draw all the controls
|
||||||
// Draw the content type dropdown
|
// Draw the content type dropdown
|
||||||
EditorGUI.PropertyField(typeRect, contentTypeProperty, GUIContent.none);
|
EditorGUI.PropertyField(typeRect, contentTypeProperty, GUIContent.none);
|
||||||
|
|
||||||
@@ -78,8 +132,27 @@ namespace Dialogue.Editor
|
|||||||
}
|
}
|
||||||
else // Image
|
else // Image
|
||||||
{
|
{
|
||||||
|
// Store the sprite before drawing the field to detect changes
|
||||||
|
var previousSprite = imageProperty.objectReferenceValue as Sprite;
|
||||||
|
|
||||||
// Draw the image field
|
// Draw the image field
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
EditorGUI.PropertyField(contentFieldRect, imageProperty, GUIContent.none);
|
EditorGUI.PropertyField(contentFieldRect, imageProperty, GUIContent.none);
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
{
|
||||||
|
// Image changed, store the property path so we can detect which property changed
|
||||||
|
lastAssignedPropertyPath = property.propertyPath;
|
||||||
|
lastAssignedSprite = imageProperty.objectReferenceValue as Sprite;
|
||||||
|
|
||||||
|
// Force an inspector update to recalculate layout
|
||||||
|
EditorUtility.SetDirty(property.serializedObject.targetObject);
|
||||||
|
// Mark the scene as dirty to ensure serialization and proper layout refresh
|
||||||
|
if (!EditorApplication.isPlaying)
|
||||||
|
{
|
||||||
|
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(
|
||||||
|
UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Draw a preview if an image is assigned
|
// Draw a preview if an image is assigned
|
||||||
if (imageProperty.objectReferenceValue != null)
|
if (imageProperty.objectReferenceValue != null)
|
||||||
@@ -87,44 +160,58 @@ namespace Dialogue.Editor
|
|||||||
var sprite = imageProperty.objectReferenceValue as Sprite;
|
var sprite = imageProperty.objectReferenceValue as Sprite;
|
||||||
if (sprite != null)
|
if (sprite != null)
|
||||||
{
|
{
|
||||||
var previewRect = new Rect(
|
|
||||||
contentRect.x,
|
|
||||||
contentFieldRect.y + contentFieldRect.height + PropertySpacing,
|
|
||||||
contentRect.width,
|
|
||||||
PreviewHeight);
|
|
||||||
|
|
||||||
// Draw the preview with preserved aspect ratio
|
// Draw the preview with preserved aspect ratio
|
||||||
DrawSpritePreview(previewRect, sprite);
|
DrawSpritePreview(previewRect, sprite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Draw the audio field (always displayed regardless of content type)
|
||||||
|
EditorGUI.PropertyField(audioFieldRect, audioProperty, new GUIContent("Audio"));
|
||||||
|
|
||||||
|
// Restore indent
|
||||||
EditorGUI.indentLevel = indent;
|
EditorGUI.indentLevel = indent;
|
||||||
EditorGUI.EndProperty();
|
EditorGUI.EndProperty();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawSpritePreview(Rect position, Sprite sprite)
|
// Helper method to draw a sprite preview with preserved aspect ratio
|
||||||
|
private void DrawSpritePreview(Rect rect, Sprite sprite)
|
||||||
{
|
{
|
||||||
if (sprite == null || sprite.texture == null) return;
|
if (sprite == null || sprite.texture == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var texture = sprite.texture;
|
||||||
|
var spriteRect = sprite.rect;
|
||||||
|
var aspectRatio = spriteRect.width / spriteRect.height;
|
||||||
|
|
||||||
// Calculate aspect-preserved rect
|
// Calculate preview rect while preserving aspect ratio within our fixed area
|
||||||
float aspectRatio = sprite.rect.width / sprite.rect.height;
|
Rect previewRect = rect;
|
||||||
float targetWidth = Mathf.Min(position.width, position.height * aspectRatio);
|
|
||||||
float targetHeight = targetWidth / aspectRatio;
|
|
||||||
|
|
||||||
// Center the preview
|
// Limit the display size to the allocated space while maintaining aspect ratio
|
||||||
Rect previewRect = new Rect(
|
if (aspectRatio > 1f) // Wider than tall
|
||||||
position.x + (position.width - targetWidth) * 0.5f,
|
{
|
||||||
position.y + (position.height - targetHeight) * 0.5f,
|
previewRect.height = Mathf.Min(rect.width / aspectRatio, rect.height);
|
||||||
targetWidth,
|
previewRect.y += (rect.height - previewRect.height) * 0.5f;
|
||||||
targetHeight
|
}
|
||||||
);
|
else // Taller than wide or square
|
||||||
|
{
|
||||||
|
previewRect.width = Mathf.Min(rect.height * aspectRatio, rect.width);
|
||||||
|
previewRect.x += (rect.width - previewRect.width) * 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
// Draw the sprite preview
|
// Constrain the preview to the allocated space
|
||||||
EditorGUI.DrawPreviewTexture(previewRect, sprite.texture, null, ScaleMode.ScaleToFit);
|
previewRect.height = Mathf.Min(previewRect.height, rect.height);
|
||||||
|
previewRect.width = Mathf.Min(previewRect.width, rect.width);
|
||||||
|
|
||||||
// Draw a border around the preview
|
// Draw preview with a dark background for better visibility
|
||||||
GUI.Box(previewRect, GUIContent.none);
|
EditorGUI.DrawRect(rect, new Color(0.1f, 0.1f, 0.1f, 1f));
|
||||||
|
GUI.DrawTexture(previewRect, texture, ScaleMode.ScaleToFit);
|
||||||
|
|
||||||
|
// Draw sprite bounds
|
||||||
|
EditorGUI.DrawRect(new Rect(previewRect.x, previewRect.y, previewRect.width, 1), Color.gray);
|
||||||
|
EditorGUI.DrawRect(new Rect(previewRect.x, previewRect.y + previewRect.height - 1, previewRect.width, 1), Color.gray);
|
||||||
|
EditorGUI.DrawRect(new Rect(previewRect.x, previewRect.y, 1, previewRect.height), Color.gray);
|
||||||
|
EditorGUI.DrawRect(new Rect(previewRect.x + previewRect.width - 1, previewRect.y, 1, previewRect.height), Color.gray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -427,6 +427,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: FootballBird
|
value: FootballBird
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1972611059221495588, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||||
|
propertyPath: stepData
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0.15
|
value: 0.15
|
||||||
|
|||||||
@@ -518,6 +518,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: HammerBird
|
value: HammerBird
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1972611059221495588, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||||
|
propertyPath: stepData
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 1.25
|
value: 1.25
|
||||||
|
|||||||
@@ -466944,6 +466944,9 @@ PrefabInstance:
|
|||||||
- targetCorrespondingSourceObject: {fileID: 5172497182660285677, guid: 0c2275f0a1451a142b686a049a2ebcec, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 5172497182660285677, guid: 0c2275f0a1451a142b686a049a2ebcec, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 2117822313}
|
addedObject: {fileID: 2117822313}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 5172497182660285677, guid: 0c2275f0a1451a142b686a049a2ebcec, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 2117822314}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 0c2275f0a1451a142b686a049a2ebcec, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 0c2275f0a1451a142b686a049a2ebcec, type: 3}
|
||||||
--- !u!4 &2117822311 stripped
|
--- !u!4 &2117822311 stripped
|
||||||
Transform:
|
Transform:
|
||||||
@@ -466968,6 +466971,103 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.DialogueComponent
|
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.DialogueComponent
|
||||||
dialogueGraph: {fileID: 3965311268370046156, guid: ef08ef9a5b2f5064a889414ba2244a62, type: 3}
|
dialogueGraph: {fileID: 3965311268370046156, guid: ef08ef9a5b2f5064a889414ba2244a62, type: 3}
|
||||||
|
--- !u!82 &2117822314
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2117822312}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 0}
|
||||||
|
m_Resource: {fileID: 0}
|
||||||
|
m_PlayOnAwake: 1
|
||||||
|
m_Volume: 1
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
SpatializePostEffects: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
--- !u!1001 &2122075105
|
--- !u!1001 &2122075105
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using PuzzleS;
|
|||||||
namespace Dialogue
|
namespace Dialogue
|
||||||
{
|
{
|
||||||
[AddComponentMenu("AppleHills/Dialogue/Dialogue Component")]
|
[AddComponentMenu("AppleHills/Dialogue/Dialogue Component")]
|
||||||
|
[RequireComponent(typeof(AudioSource))]
|
||||||
public class DialogueComponent : MonoBehaviour
|
public class DialogueComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private RuntimeDialogueGraph dialogueGraph;
|
[SerializeField] private RuntimeDialogueGraph dialogueGraph;
|
||||||
@@ -17,6 +18,7 @@ namespace Dialogue
|
|||||||
private int currentLineIndex;
|
private int currentLineIndex;
|
||||||
private bool initialized = false;
|
private bool initialized = false;
|
||||||
private SpeechBubble speechBubble;
|
private SpeechBubble speechBubble;
|
||||||
|
private AudioSource audioSource;
|
||||||
|
|
||||||
// Flag to track when a condition has been met but dialogue hasn't advanced yet
|
// Flag to track when a condition has been met but dialogue hasn't advanced yet
|
||||||
private bool _conditionSatisfiedPendingAdvance = false;
|
private bool _conditionSatisfiedPendingAdvance = false;
|
||||||
@@ -35,6 +37,15 @@ namespace Dialogue
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
// Get required components
|
||||||
|
audioSource = GetComponent<AudioSource>();
|
||||||
|
speechBubble = GetComponentInChildren<SpeechBubble>();
|
||||||
|
|
||||||
|
if (speechBubble == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("SpeechBubble component is missing on Dialogue Component");
|
||||||
|
}
|
||||||
|
|
||||||
// Register for global events
|
// Register for global events
|
||||||
if (PuzzleManager.Instance != null)
|
if (PuzzleManager.Instance != null)
|
||||||
PuzzleManager.Instance.OnStepCompleted += OnAnyPuzzleStepCompleted;
|
PuzzleManager.Instance.OnStepCompleted += OnAnyPuzzleStepCompleted;
|
||||||
@@ -49,13 +60,6 @@ namespace Dialogue
|
|||||||
ItemManager.Instance.OnItemsCombined += OnAnyItemsCombined;
|
ItemManager.Instance.OnItemsCombined += OnAnyItemsCombined;
|
||||||
}
|
}
|
||||||
|
|
||||||
speechBubble = GetComponentInChildren<SpeechBubble>();
|
|
||||||
|
|
||||||
if (speechBubble == null)
|
|
||||||
{
|
|
||||||
Debug.LogError("SpeechBubble component is missing on Dialogue Component");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Auto-start the dialogue
|
// Auto-start the dialogue
|
||||||
// StartDialogue();
|
// StartDialogue();
|
||||||
|
|
||||||
@@ -88,6 +92,9 @@ namespace Dialogue
|
|||||||
// and pass whether there are more lines available for prompt display
|
// and pass whether there are more lines available for prompt display
|
||||||
speechBubble.DisplayDialogueContent(content, HasAnyLines());
|
speechBubble.DisplayDialogueContent(content, HasAnyLines());
|
||||||
|
|
||||||
|
// Play audio if available
|
||||||
|
PlayDialogueAudio(content.Audio);
|
||||||
|
|
||||||
// Log the content type for debugging
|
// Log the content type for debugging
|
||||||
Logging.Debug($"Displaying content type: {content.ContentType} - {(content.ContentType == DialogueContentType.Text ? content.Text : content.Image?.name)}");
|
Logging.Debug($"Displaying content type: {content.ContentType} - {(content.ContentType == DialogueContentType.Text ? content.Text : content.Image?.name)}");
|
||||||
}
|
}
|
||||||
@@ -101,7 +108,28 @@ namespace Dialogue
|
|||||||
Logging.Debug($"Displaying legacy text: {line}");
|
Logging.Debug($"Displaying legacy text: {line}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Play the audio clip for the current dialogue content
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="clip">Audio clip to play</param>
|
||||||
|
private void PlayDialogueAudio(AudioClip clip)
|
||||||
|
{
|
||||||
|
// Stop any currently playing audio
|
||||||
|
if (audioSource.isPlaying)
|
||||||
|
{
|
||||||
|
audioSource.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Play the new clip if it exists
|
||||||
|
if (clip != null)
|
||||||
|
{
|
||||||
|
audioSource.clip = clip;
|
||||||
|
audioSource.Play();
|
||||||
|
Logging.Debug($"Playing dialogue audio: {clip.name}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the current dialogue content (text or image)
|
/// Get the current dialogue content (text or image)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace Dialogue
|
|||||||
[SerializeField] private DialogueContentType _contentType = DialogueContentType.Text;
|
[SerializeField] private DialogueContentType _contentType = DialogueContentType.Text;
|
||||||
[SerializeField] private string _text = string.Empty;
|
[SerializeField] private string _text = string.Empty;
|
||||||
[SerializeField] private Sprite _image = null;
|
[SerializeField] private Sprite _image = null;
|
||||||
|
[SerializeField] private AudioClip _audio = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of content this entry contains
|
/// The type of content this entry contains
|
||||||
@@ -37,16 +38,23 @@ namespace Dialogue
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Sprite Image => _image;
|
public Sprite Image => _image;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audio clip to play with this content
|
||||||
|
/// </summary>
|
||||||
|
public AudioClip Audio => _audio;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create text content
|
/// Create text content
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="text">The text to display</param>
|
/// <param name="text">The text to display</param>
|
||||||
public static DialogueContent CreateText(string text)
|
/// <param name="audio">Optional audio clip to play</param>
|
||||||
|
public static DialogueContent CreateText(string text, AudioClip audio = null)
|
||||||
{
|
{
|
||||||
return new DialogueContent
|
return new DialogueContent
|
||||||
{
|
{
|
||||||
_contentType = DialogueContentType.Text,
|
_contentType = DialogueContentType.Text,
|
||||||
_text = text
|
_text = text,
|
||||||
|
_audio = audio
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,12 +62,14 @@ namespace Dialogue
|
|||||||
/// Create image content
|
/// Create image content
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="image">The image to display</param>
|
/// <param name="image">The image to display</param>
|
||||||
public static DialogueContent CreateImage(Sprite image)
|
/// <param name="audio">Optional audio clip to play</param>
|
||||||
|
public static DialogueContent CreateImage(Sprite image, AudioClip audio = null)
|
||||||
{
|
{
|
||||||
return new DialogueContent
|
return new DialogueContent
|
||||||
{
|
{
|
||||||
_contentType = DialogueContentType.Image,
|
_contentType = DialogueContentType.Image,
|
||||||
_image = image
|
_image = image,
|
||||||
|
_audio = audio
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,9 +78,13 @@ namespace Dialogue
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return ContentType == DialogueContentType.Text
|
string contentDesc = ContentType == DialogueContentType.Text
|
||||||
? $"Text: {_text}"
|
? $"Text: {_text}"
|
||||||
: $"Image: {_image?.name ?? "None"}";
|
: $"Image: {_image?.name ?? "None"}";
|
||||||
|
|
||||||
|
return _audio != null
|
||||||
|
? $"{contentDesc} (with audio: {_audio.name})"
|
||||||
|
: contentDesc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user