Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Assets/Prefabs/UI/DialogueBox/Dialogue_horizontal.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ae92ebd4d5916514996eb568425857d8, type: 3}
m_Name:
m_EditorClassIdentifier:
godImage: {fileID: 301723508729519991}
godSprite: {fileID: 21300000, guid: 7b277c8f02a337647888d46b236b7ab9, type: 3}
dialogueText: {fileID: 228628327914723149}
actualDialogue: Guillaume T OU ?
dialogueTitle: {fileID: 0}
actualTitle:
godSprites: []
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Configuration manquante du tableau godSprites dans le prefab horizontal

D'après l'analyse du code, le tableau godSprites est utilisé dans DialogueManager.cs pour associer 7 sprites de dieux différents (Greed, Chaos, Gluttony, etc.). Bien que le prefab vertical soit correctement configuré avec les 7 sprites, le prefab horizontal a un tableau vide, ce qui causera des erreurs lors de l'accès aux indices de 0 à 6.

  • Configurez le tableau godSprites dans Dialogue_horizontal.prefab avec les mêmes 7 sprites que dans le prefab vertical
  • Assurez-vous que l'ordre des sprites correspond à : Greed, Chaos, Gluttony, Envy, Death, Vanity, Sloth
🔗 Analysis chain

Attention à l'initialisation du tableau godSprites

Le tableau godSprites est initialisé comme vide, ce qui pourrait causer des problèmes lors de l'exécution si le code tente d'accéder aux sprites sans vérification préalable.


Let me gather more information about the initialization and validation of the godSprites array.


Let me check one more thing about the horizontal prefab configuration:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Vérifier l'utilisation de godSprites dans le code
rg -A 3 "godSprites\[" 

Length of output: 1102


Script:

#!/bin/bash
# Check the DialogueManager class implementation for array validation
ast-grep --pattern 'class DialogueManager {
  $$$
  godSprites $$$
  $$$
}'

# Also check for any null checks or array length validations
rg "godSprites\." -A 3
rg "godSprites\.Length" -A 3

Length of output: 3779


Script:

#!/bin/bash
# Check the horizontal prefab configuration for godSprites array
rg "godSprites\.Array" Assets/Prefabs/UI/DialogueBox/Dialogue_horizontal.prefab -A 2

Length of output: 86

--- !u!1 &7377141579387670094
GameObject:
m_ObjectHideFlags: 0
Expand Down
53 changes: 52 additions & 1 deletion Assets/Prefabs/UI/DialogueBox/Dialogue_vertical.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 910646895828460860, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: m_Name
value: Dialogue Variant
value: Dialogue_vertical
objectReference: {fileID: 0}
- target: {fileID: 910646895828460860, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: m_TagString
Expand All @@ -36,6 +36,10 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 2.59
objectReference: {fileID: 0}
- target: {fileID: 1292551081983489310, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: m_PresetInfoIsWorld
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1675780870698966960, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: m_SizeDelta.y
value: 3
Expand Down Expand Up @@ -68,6 +72,10 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0.44
objectReference: {fileID: 0}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godImage
value:
objectReference: {fileID: 8304963460156740912}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: actualTitle
value: Mort
Expand All @@ -76,6 +84,38 @@ PrefabInstance:
propertyPath: dialogueTitle
value:
objectReference: {fileID: 19067184449769918}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.size
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[0]
value:
objectReference: {fileID: 21300000, guid: 977ca8f4471cd4f84bc0276c1506f657, type: 3}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[1]
value:
objectReference: {fileID: 21300000, guid: cd8010b4a55649e47acb2c3b78319df6, type: 3}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[2]
value:
objectReference: {fileID: 21300000, guid: 158a5e6ba97426c4ca5423dc9e3c3922, type: 3}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[3]
value:
objectReference: {fileID: 21300000, guid: 578a517c9ec12ee44aaa76f1147599e7, type: 3}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[4]
value:
objectReference: {fileID: 21300000, guid: 7b277c8f02a337647888d46b236b7ab9, type: 3}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[5]
value:
objectReference: {fileID: 21300000, guid: b52240867e1f249d6966bc5f94d00c6c, type: 3}
- target: {fileID: 4732960806648774282, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: godSprites.Array.data[6]
value:
objectReference: {fileID: 21300000, guid: 0c50372d938694373bd29226386338be, type: 3}
- target: {fileID: 4919147100269876766, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
propertyPath: m_StaticEditorFlags
value: 0
Expand Down Expand Up @@ -224,3 +264,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8304963460156740912 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 301723508729519991, guid: 2915528a48cff2a4f972254b123a3e0b, type: 3}
m_PrefabInstance: {fileID: 8606035485087287879}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
File renamed without changes
File renamed without changes
Binary file added Assets/Resources/UI_God/Greed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions Assets/Resources/UI_God/Greed.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Resources/UI_God/Sloth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions Assets/Resources/UI_God/Sloth.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Resources/UI_God/Vanity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading