浏览代码

Add controls. Switch Quest/Questline.cs names. And Button add Questline , quests, step

/main
uChema 3 年前
当前提交
31d75482
共有 48 个文件被更改,包括 678 次插入255 次删除
  1. 6
      UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset
  2. 8
      UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-AssetTables.asset
  3. 50
      UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-StringTables.asset
  4. 9
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/QL1.asset
  5. 4
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/QL1.asset.meta
  6. 3
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 1/Q1-QL1.asset
  7. 2
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 1/Q1-QL1.asset.meta
  8. 3
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 2/Q2-QL1.asset
  9. 2
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 2/Q2-QL1.asset.meta
  10. 7
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 2/Step2/CD-S2-Q2-QL1.asset
  11. 3
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 3/Q3-QL1.asset
  12. 2
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 3/Q3-QL1.asset.meta
  13. 5
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/QL2.asset
  14. 2
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/QL2.asset.meta
  15. 3
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/Quest 1/Q1-QL2.asset
  16. 2
      UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/Quest 1/Q1-QL2.asset.meta
  17. 6
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Config/NPCRoamingAroundCenter.asset
  18. 32
      UOP1_Project/Assets/Scripts/Quests/Editor/DialogueLine.uxml
  19. 339
      UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs
  20. 26
      UOP1_Project/Assets/Scripts/Quests/Editor/StepDetail.uxml
  21. 20
      UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestSO.cs
  22. 2
      UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestSO.cs.meta
  23. 20
      UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestlineSO.cs
  24. 2
      UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestlineSO.cs.meta
  25. 13
      UOP1_Project/Packages/manifest.json
  26. 29
      UOP1_Project/Packages/packages-lock.json
  27. 17
      UOP1_Project/Assets/Q1-QL3.asset
  28. 8
      UOP1_Project/Assets/Q1-QL3.asset.meta
  29. 17
      UOP1_Project/Assets/Q2-QL3.asset
  30. 8
      UOP1_Project/Assets/Q2-QL3.asset.meta
  31. 17
      UOP1_Project/Assets/Q3-QL3.asset
  32. 8
      UOP1_Project/Assets/Q3-QL3.asset.meta
  33. 17
      UOP1_Project/Assets/QL3.asset
  34. 8
      UOP1_Project/Assets/QL3.asset.meta
  35. 8
      UOP1_Project/Assets/Resources.meta
  36. 21
      UOP1_Project/Assets/S1-Q1-QL3.asset
  37. 8
      UOP1_Project/Assets/S1-Q1-QL3.asset.meta
  38. 21
      UOP1_Project/Assets/S2-Q1-QL3.asset
  39. 8
      UOP1_Project/Assets/S2-Q1-QL3.asset.meta
  40. 21
      UOP1_Project/Assets/S3-Q1-QL3.asset
  41. 8
      UOP1_Project/Assets/S3-Q1-QL3.asset.meta
  42. 40
      UOP1_Project/Assets/Resources/QuestEditorWindow.uss
  43. 45
      UOP1_Project/Assets/Resources/QuestEditorWindow.uxml
  44. 14
      UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.uss
  45. 39
      UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.uxml
  46. 0
      /UOP1_Project/Assets/Resources/QuestEditorWindow.uss.meta
  47. 0
      /UOP1_Project/Assets/Resources/QuestEditorWindow.uxml.meta

6
UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset


m_Data:
m_SerializedData: []
m_GUID: a7bae5f88e2e24365bdf768f42df85c5
m_SerializeEntries: []
m_SerializeEntries:
- m_GUID: 42c969b8c993eb7419cbaa1d97a24119
m_Address: Assets/ScriptableObjects/Quests/Questline2/QL2.asset
m_ReadOnly: 0
m_SerializedLabels: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2}
m_SchemaSet:

8
UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-AssetTables.asset


m_ReadOnly: 1
m_SerializedLabels:
- Locale-en
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2}
m_SchemaSet:

50
UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-StringTables.asset


m_ReadOnly: 1
m_SerializedLabels:
- Locale-fr
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2}
m_SchemaSet:

9
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/QL1.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
_idQuestLine: 1
- {fileID: 11400000, guid: 5c4762c053f55bf47808e01bb97d89ed, type: 2}
- {fileID: 11400000, guid: ca4830d54addf0a41853a3816c5dcab7, type: 2}
- {fileID: 11400000, guid: 66d76d9120430344f98546b2136b334a, type: 2}
- {fileID: 11400000, guid: 2419d670f41b60f45939ba1637631315, type: 2}
- {fileID: 11400000, guid: cff60fad59af7496198a79c33f3dbabf, type: 2}
- {fileID: 11400000, guid: d558749ce69934c06b2918e07f8579f1, type: 2}
_isDone: 0

4
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/QL1.asset.meta


fileFormatVersion: 2
guid: 2419d670f41b60f45939ba1637631315
guid: 7b43c62a4fa974bbc82d5af43cc173ca
mainObjectFileID: 0
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

3
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 1/Q1-QL1.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
_idQuest: 1
_steps:
- {fileID: 11400000, guid: 2187c1f18f6f9ae4bbd10f33a1871d8e, type: 2}
- {fileID: 11400000, guid: a025a2dfd3ab26844a62c94ac3899db6, type: 2}

2
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 1/Q1-QL1.asset.meta


fileFormatVersion: 2
guid: 5c4762c053f55bf47808e01bb97d89ed
guid: 2419d670f41b60f45939ba1637631315
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

3
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 2/Q2-QL1.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
_idQuest: 2
_steps:
- {fileID: 11400000, guid: e6e2596f9ca1c28489bf0e1f6c54213a, type: 2}
- {fileID: 11400000, guid: 581fef88ec84133408bed50da46df951, type: 2}

2
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 2/Q2-QL1.asset.meta


fileFormatVersion: 2
guid: ca4830d54addf0a41853a3816c5dcab7
guid: cff60fad59af7496198a79c33f3dbabf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

7
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 2/Step2/CD-S2-Q2-QL1.asset


_actor: {fileID: 11400000, guid: 5e7bd0eed8324794fad1bc460c565ecb, type: 2}
_dialogueLines:
- m_TableReference:
m_TableCollectionName: GUID:dde4d865ca93d7b4dbc6a1bbce6595b2
m_TableCollectionName: Questline Dialogue
m_KeyId: 238002475229189
m_Key:
m_KeyId: 0
m_Key: L1-CD-S2-Q2-QL1
m_FallbackState: 0
_choices: []
_dialogueType: 1

3
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 3/Q3-QL1.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
_idQuest: 3
_steps:
- {fileID: 11400000, guid: 0f39471cc4f54684d9f6327df8b59391, type: 2}
- {fileID: 11400000, guid: 754a156b42d196a46baa8a97eb2e0fd8, type: 2}

2
UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest 3/Q3-QL1.asset.meta


fileFormatVersion: 2
guid: 66d76d9120430344f98546b2136b334a
guid: d558749ce69934c06b2918e07f8579f1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

5
UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/QL2.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
_idQuestLine: 2
- {fileID: 11400000, guid: 42c969b8c993eb7419cbaa1d97a24119, type: 2}
- {fileID: 11400000, guid: 8e1894c74a75a4948ac577e5be6a6b02, type: 2}
_isDone: 0

2
UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/QL2.asset.meta


fileFormatVersion: 2
guid: 8e1894c74a75a4948ac577e5be6a6b02
guid: 42c969b8c993eb7419cbaa1d97a24119
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

3
UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/Quest 1/Q1-QL2.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
_idQuest: 1
_steps:
- {fileID: 11400000, guid: 66b33c5d53f3ee347ad7014bd276db31, type: 2}
- {fileID: 11400000, guid: 22bad249919ba7c4cae1663de7e760ab, type: 2}

2
UOP1_Project/Assets/ScriptableObjects/Quests/Questline2/Quest 1/Q1-QL2.asset.meta


fileFormatVersion: 2
guid: 42c969b8c993eb7419cbaa1d97a24119
guid: 8e1894c74a75a4948ac577e5be6a6b02
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

6
UOP1_Project/Assets/ScriptableObjects/StateMachine/Config/NPCRoamingAroundCenter.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2724eed9fc9a3904b9edc8180dace7f2, type: 3}
m_Name: RoamingAroundCenter
m_Name: NPCRoamingAroundCenter
_stopDuration: 0
_speed: 0
_speed: 0
_stopDuration: 0

32
UOP1_Project/Assets/Scripts/Quests/Editor/DialogueLine.uxml


<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<ui:VisualElement name="line-box" style="flex-direction: column; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px;">
<ui:VisualElement name="lines" style="flex-direction: row; width: 100%;">
<ui:VisualElement name="left-line" style="margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px; width: 50%; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0;">
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="left-line-label" style="background-color: rgb(158, 222, 115); white-space: normal;" />
</ui:VisualElement>
<ui:VisualElement name="right-line" style="width: 50%; margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px;">
<ui:Label text="This is line 2." display-tooltip-when-elided="true" name="right-line-label" style="background-color: rgb(243, 145, 137); white-space: normal;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="buttons" style="flex-direction: row; justify-content: space-around;">
<ui:Button text="Yes" name="btn-0" style="width: 45%; background-color: rgba(227, 253, 253, 255);" />
<ui:Button text="No" name="btn-1" style="width: 45%; background-color: rgba(227, 253, 253, 255);" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<ui:VisualElement name="line-box" style="flex-direction: column; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px;">
<ui:VisualElement name="lines" style="flex-direction: row; width: 100%;">
<ui:VisualElement name="left-line" style="margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px; width: 50%; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0;">
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="left-line-label" style="background-color: rgb(158, 222, 115); white-space: normal; color: rgba(73, 94, 0, 255);" />
</ui:VisualElement>
<ui:VisualElement name="right-line" style="width: 50%; margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px;">
<ui:Label text="This is line 2." display-tooltip-when-elided="true" name="right-line-label" style="background-color: rgb(243, 145, 137); white-space: normal; color: rgb(106, 9, 0);" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="buttons" style="flex-direction: row; justify-content: space-around;">
<ui:Button text="Yes" name="btn-0" style="width: 45%; background-color: rgb(115, 115, 115);" />
<ui:Button text="No" name="btn-1" style="width: 45%; background-color: rgb(115, 115, 115);" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>

339
UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs


using UnityEngine.UIElements;
using UnityEditor.UIElements;
using UnityEngine.Localization;
public enum selectionType
{
Questline,
Quest,
Step,
Dialogue,
}
private QuestSO currentSeletedQuest;
[MenuItem("ChopChop/QuestEditorWindow")]
public static void ShowWindow()
{
QuestEditorWindow wnd = GetWindow<QuestEditorWindow>();
wnd.titleContent = new GUIContent("QuestEditorWindow");
}
public void CreateGUI()
private QuestSO currentSeletedQuest;
QuestlineSO selectedQuestLine;
int idQuestlineSelected;
int idQuestSelected;
[MenuItem("ChopChop/QuestEditorWindow")]
public static void ShowWindow()
{
Debug.Log("Show Window");
QuestEditorWindow wnd = GetWindow<QuestEditorWindow>();
wnd.titleContent = new GUIContent("QuestEditorWindow");
// Sets a minimum size to the window.
wnd.minSize = new Vector2(250, 250);
}
public static void ShowArtistToolWindow()
{
// Opens the window, otherwise focuses it if it’s already open.
QuestEditorWindow window = GetWindow<QuestEditorWindow>();
// Adds a title to the window.
Debug.Log("Show Window");
window.titleContent = new GUIContent("QuestEditorWindow");
// Sets a minimum size to the window.
window.minSize = new Vector2(250, 250);
//window.SetTool();
}
public void CreateGUI()
// Import UXML
var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/Scripts/Quests/Editor/QuestEditorWindow.uxml");
Debug.Log("Create GUI");
// Import UXML
var visualTree =Resources.Load<VisualTreeAsset>("QuestEditorWindow");
root.Add(visualTree.CloneTree());
//Add Image

//Import USS
var styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>("Assets/Scripts/Quests/Editor/QuestEditorWindow.uss");
var styleSheet = Resources.Load< StyleSheet>("QuestEditorWindow");
root.styleSheets.Add(styleSheet);
//Register button event

LoadAllQuestsData();
}
private void LoadAllQuestsData()
{
//Load all questlines
FindAllSOByType(out QuestlineSO[] questLineSOs);
RefreshListView(out ListView allQuestlinesListView, "questlines-list", questLineSOs);
allQuestlinesListView.onSelectionChanged += (questlineEnumerable) =>
{
QuestlineSO questLine = GetDataFromListViewItem<QuestlineSO>(questlineEnumerable);
RefreshListView(out ListView allQuestsListView, "quests-list", questLine.Quests.ToArray());
allQuestsListView.onSelectionChanged += (questEnumerable) =>
{
currentSeletedQuest = GetDataFromListViewItem<QuestSO>(questEnumerable);
RefreshListView(out ListView allStepsListView, "steps-list",currentSeletedQuest.Steps.ToArray() );
SetUpQuestPreview(currentSeletedQuest);
allStepsListView.onSelectionChanged += (stepEnumerable) =>
{
StepSO step = GetDataFromListViewItem<StepSO>(stepEnumerable);
DisplayAllProperties(step, "step-info-scroll");
//Find all DialogueDataSOs in the same folder of the StepSO
FindAllSOsInTargetFolder(step, out DialogueDataSO[] dialogueDataSOs);
RefreshListView(out ListView dialoguesListView, "dialogues-list", dialogueDataSOs);
dialoguesListView.onSelectionChanged += (dialogueEnumerable) =>
{
DialogueDataSO dialogueData = GetDataFromListViewItem<DialogueDataSO>(dialogueEnumerable);
DisplayAllProperties(dialogueData, "dialogue-info-scroll");
};
};
};
Button createQuestline = rootVisualElement.Q<Button>("CreateQL");
createQuestline.clicked += AddQuestline;
createQuestline.SetEnabled (true);
Button createQuest = rootVisualElement.Q<Button>("CreateQ");
createQuest.clicked += AddQuest;
createQuest.SetEnabled(false);
Button createStep = rootVisualElement.Q<Button>("CreateS");
createStep.clicked += AddStep;
createStep.SetEnabled(false);
LoadAllQuestsData();
}
private void ClearElements(selectionType type)
{
List<string> listElements = new List<string>();
listElements.Clear();
Button createQuest = rootVisualElement.Q<Button>("CreateQ");
Button createStep = rootVisualElement.Q<Button>("CreateS");
switch (type)
{
case selectionType.Questline:
listElements.Add("steps-list");
listElements.Add("actor-conversations");
listElements.Add("steps-list");
listElements.Add("dialogues-list");
listElements.Add("step-info-scroll");
listElements.Add("dialogue-info-scroll");
if (createQuest != null)
{
createQuest.SetEnabled(true);
}
if (createStep != null)
{
createStep.SetEnabled(false);
}
break;
case selectionType.Quest:
listElements.Add("dialogues-list");
listElements.Add("step-info-scroll");
listElements.Add("dialogue-info-scroll");
if (createStep != null)
{
createStep.SetEnabled(true);
}
break;
case selectionType.Step:
listElements.Add("dialogue-info-scroll");
break;
}
foreach(string elementName in listElements)
{
VisualElement element = rootVisualElement.Q<VisualElement>(elementName);
element.Clear();
}
}
private void LoadAllQuestsData()
{
Debug.Log("LoadAllQuestsData");
//Load all questlines
FindAllSOByType(out QuestlineSO[] questLineSOs);
RefreshListView(out ListView allQuestlinesListView, "questlines-list", questLineSOs);
allQuestlinesListView.onSelectionChange += (questlineEnumerable) =>
{
selectedQuestLine = GetDataFromListViewItem<QuestlineSO>(questlineEnumerable);
ClearElements(selectionType.Questline);
idQuestlineSelected = allQuestlinesListView.selectedIndex;
if (selectedQuestLine.Quests != null )
{
RefreshListView(out ListView allQuestsListView, "quests-list", selectedQuestLine.Quests.ToArray());
allQuestsListView.onSelectionChange += (questEnumerable) =>
{
idQuestSelected = allQuestsListView.selectedIndex;
currentSeletedQuest = GetDataFromListViewItem<QuestSO>(questEnumerable);
ClearElements(selectionType.Quest);
if (currentSeletedQuest != null && currentSeletedQuest.Steps != null )
{
RefreshListView(out ListView allStepsListView, "steps-list", currentSeletedQuest.Steps.ToArray());
SetUpQuestPreview(currentSeletedQuest);
allStepsListView.onSelectionChange += (stepEnumerable) =>
{
StepSO step = GetDataFromListViewItem<StepSO>(stepEnumerable);
DisplayAllProperties(step, "step-info-scroll");
ClearElements(selectionType.Step);
//Find all DialogueDataSOs in the same folder of the StepSO
FindAllDialogueInStep(step, out DialogueDataSO[] dialogueDataSOs);
if (dialogueDataSOs != null)
{
RefreshListView(out ListView dialoguesListView, "dialogues-list", dialogueDataSOs);
dialoguesListView.onSelectionChange += (dialogueEnumerable) =>
{
DialogueDataSO dialogueData = GetDataFromListViewItem<DialogueDataSO>(dialogueEnumerable);
DisplayAllProperties(dialogueData, "dialogue-info-scroll");
};
}
};
}
};
}
private T GetDataFromListViewItem<T>(List<object> enumberable) where T : ScriptableObject
private T GetDataFromListViewItem<T>(IEnumerable<object> enumberable) where T : ScriptableObject
{
T data = default;
foreach (var item in enumberable)

return data;
}
private void FindAllDialogueInStep(StepSO step, out DialogueDataSO[] AllDialogue)
{
AllDialogue = null;
List<DialogueDataSO> AllDialogueList = new List<DialogueDataSO>();
if (step!=null)
{
if (step.DialogueBeforeStep != null)
{
AllDialogueList.Add(step.DialogueBeforeStep);
}
if(step.CompleteDialogue!=null)
{
AllDialogueList.Add(step.CompleteDialogue);
}
if (step.IncompleteDialogue!=null)
{
AllDialogueList.Add(step.IncompleteDialogue);
}
}
Debug.Log("AllDialogueList" + AllDialogueList.ToArray());
if(AllDialogueList!=null)
AllDialogue = AllDialogueList.ToArray();
}
return;
return;
if (quest.Steps == null)
return;
if (quest.Steps.Count>0&& quest.Steps[0].Actor!=null)
LoadActorImage(quest.Steps[0].Actor.name);
//Clear actor conversations area

isDoneToggle.SetEnabled(false);
//SD
if(step.DialogueBeforeStep!=null)
LoadAndInitStartDialogueLineUXML(step.DialogueBeforeStep, dialogueAreaVE);
//CD ID if any

listview.style.flexGrow = 1.0f;
listview.Refresh();
if(itemsSource.Length>0)
listview = new ListView();
listview = new ListView();
parentVE.Add(listview);
}
private void LoadActorImage(string actorName)
parentVE.Add(listview);
}
private void LoadActorImage(string actorName)
{
Texture2D texture = (Texture2D)AssetDatabase.LoadAssetAtPath($"Assets/Scripts/Quests/Editor/ActorImages/{actorName}.png", typeof(Texture2D));
actorPreview.image = texture;

}
parentVE.Add(scrollView);
}
void AddQuestline()
{
//get questline id
FindAllSOByType(out QuestlineSO[] questLineSOs);
int id = questLineSOs.Length;
id++;
QuestlineSO asset = ScriptableObject.CreateInstance<QuestlineSO>();
asset.SetQuestlineId (id);
AssetDatabase.CreateAsset(asset, "Assets/QL"+id+".asset");
AssetDatabase.SaveAssets();
//refresh
LoadAllQuestsData();
}
void RemoveQuestline()
{
}
void AddQuest()
{
QuestSO asset = ScriptableObject.CreateInstance<QuestSO>();
int questlineId = 0;
questlineId = selectedQuestLine.IdQuestline;
int questId = 0;
questId = selectedQuestLine.Quests.Count +1 ;
AssetDatabase.CreateAsset(asset, "Assets/Q"+questId+"-QL"+ questlineId + ".asset");
AssetDatabase.SaveAssets();
asset.SetQuestId(questId);
selectedQuestLine.Quests.Add(asset);
//refresh
rootVisualElement.Q<VisualElement>("questlines-list").Q<ListView>().SetSelection(idQuestlineSelected);
}
void RemoveQuest()
{
}
void AddStep()
{
StepSO asset = ScriptableObject.CreateInstance<StepSO>();
int questlineId = 0;
questlineId = selectedQuestLine.IdQuestline;
int questId = 0;
questId =currentSeletedQuest.IdQuest;
int stepId = 0;
stepId = currentSeletedQuest.Steps.Count + 1;
AssetDatabase.CreateAsset(asset, "Assets/S"+ stepId + "-Q" + questId + "-QL" + questlineId + ".asset");
AssetDatabase.SaveAssets();
currentSeletedQuest.Steps.Add(asset);
//refresh
Debug.Log(idQuestSelected);
rootVisualElement.Q<VisualElement>("quests-list").Q<ListView>().SetSelection(idQuestSelected);
}
void RemoveStep()
{
}
}

26
UOP1_Project/Assets/Scripts/Quests/Editor/StepDetail.uxml


<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<ui:VisualElement name="step-detail-box" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); background-color: rgba(166, 227, 233, 255); border-top-left-radius: 5px; border-bottom-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; margin-left: 3px; margin-right: 3px; margin-top: 3px; margin-bottom: 3px;">
<ui:VisualElement name="step-title-box" style="border-bottom-color: rgb(0, 0, 0); border-bottom-width: 1px; flex-direction: row; justify-content: space-between;">
<ui:Label text="Step1" display-tooltip-when-elided="true" name="step-title-label" style="-unity-font-style: bold;" />
<ui:Toggle name="step-done-toggle" text="IsDone" value="false" style="-unity-font-style: normal;" />
</ui:VisualElement>
<ui:VisualElement name="dialogue-area" />
<ui:VisualElement name="item-validate" style="flex-direction: row; justify-content: space-around;">
<ui:Label text="Check Item:" display-tooltip-when-elided="true" name="step-type" style="-unity-font-style: bold;" />
<ui:Label text="Apple" display-tooltip-when-elided="true" name="item-to-validate" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<ui:VisualElement name="step-detail-box" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); background-color: rgb(135, 135, 135); border-top-left-radius: 5px; border-bottom-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; margin-left: 3px; margin-right: 3px; margin-top: 3px; margin-bottom: 3px;">
<ui:VisualElement name="step-title-box" style="border-bottom-color: rgb(0, 0, 0); border-bottom-width: 1px; flex-direction: row; justify-content: space-between;">
<ui:Label text="Step1" display-tooltip-when-elided="true" name="step-title-label" style="-unity-font-style: bold;" />
<ui:Toggle name="step-done-toggle" text="IsDone" value="false" style="-unity-font-style: normal;" />
</ui:VisualElement>
<ui:VisualElement name="dialogue-area" />
<ui:VisualElement name="item-validate" style="flex-direction: row; justify-content: space-around;">
<ui:Label text="Check Item:" display-tooltip-when-elided="true" name="step-type" style="-unity-font-style: bold;" />
<ui:Label text="Apple" display-tooltip-when-elided="true" name="item-to-validate" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>

20
UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestSO.cs


using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "Questline", menuName = "Quests/Questline", order = 51)]
public class QuestlineSO : ScriptableObject
[CreateAssetMenu(fileName = "Quest", menuName = "Quests/Quest", order = 51)]
public class QuestSO : ScriptableObject
[Tooltip("The collection of Quests composing the Questline")]
private List<QuestSO> _quests = new List<QuestSO>();
private int _idQuest = 0;
[Tooltip("The collection of Steps composing the Quest")]
[SerializeField]
private List<StepSO> _steps = new List<StepSO>();
public List<QuestSO> Quests => _quests;
public int IdQuest => _idQuest;
public List<StepSO> Steps => _steps;
public void FinishQuestline()
public void FinishQuest()
public void SetQuestId(int id)
{
_idQuest = id;
}
}

2
UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestSO.cs.meta


fileFormatVersion: 2
guid: 05c700bba7d21604586cb89ec5afdee0
guid: b4f9c8aa1ce987b4799f7093a99181a9
MonoImporter:
externalObjects: {}
serializedVersion: 2

20
UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestlineSO.cs


using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "Quest", menuName = "Quests/Quest", order = 51)]
public class QuestSO : ScriptableObject
[CreateAssetMenu(fileName = "Questline", menuName = "Quests/Questline", order = 51)]
public class QuestlineSO : ScriptableObject
[Tooltip("The collection of Steps composing the Quest")]
private List<StepSO> _steps = new List<StepSO>();
private int _idQuestLine = 0;
[Tooltip("The collection of Quests composing the Questline")]
[SerializeField]
private List<QuestSO> _quests = new List<QuestSO>();
public List<StepSO> Steps => _steps;
public int IdQuestline => _idQuestLine;
public List<QuestSO> Quests => _quests;
public void FinishQuest()
public void FinishQuestline()
}
public void SetQuestlineId(int id)
{
_idQuestLine = id;
}

2
UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/QuestlineSO.cs.meta


fileFormatVersion: 2
guid: b4f9c8aa1ce987b4799f7093a99181a9
guid: 05c700bba7d21604586cb89ec5afdee0
MonoImporter:
externalObjects: {}
serializedVersion: 2

13
UOP1_Project/Packages/manifest.json


{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.addressables": "1.16.16",
"com.unity.addressables": "1.17.17",
"com.unity.burst": "1.4.4",
"com.unity.cinemachine": "2.6.3",
"com.unity.burst": "1.4.7",
"com.unity.cinemachine": "2.6.4",
"com.unity.localization": "0.10.0-preview",
"com.unity.localization": "0.11.0-preview",
"com.unity.recorder": "2.5.4",
"com.unity.recorder": "2.5.5",
"com.unity.timeline": "1.4.6",
"com.unity.timeline": "1.4.7",
"com.unity.ui.builder": "1.0.0-preview.14",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",

29
UOP1_Project/Packages/packages-lock.json


"dependencies": {}
},
"com.unity.addressables": {
"version": "1.16.16",
"version": "1.17.17",
"com.unity.scriptablebuildpipeline": "1.15.2",
"com.unity.scriptablebuildpipeline": "1.17.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"
},

"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.4.4",
"version": "1.4.7",
"depth": 0,
"source": "registry",
"dependencies": {

},
"com.unity.cinemachine": {
"version": "2.6.3",
"version": "2.6.4",
"depth": 0,
"source": "registry",
"dependencies": {},

"url": "https://packages.unity.com"
},
"com.unity.localization": {
"version": "0.10.0-preview",
"version": "0.11.0-preview",
"com.unity.addressables": "1.16.13"
"com.unity.addressables": "1.17.15"
},
"url": "https://packages.unity.com"
},

"url": "https://packages.unity.com"
},
"com.unity.recorder": {
"version": "2.5.4",
"version": "2.5.5",
"depth": 0,
"source": "registry",
"dependencies": {

"url": "https://packages.unity.com"
},
"com.unity.scriptablebuildpipeline": {
"version": "1.16.1",
"depth": 0,
"version": "1.17.0",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"

"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.4.6",
"version": "1.4.7",
"depth": 0,
"source": "registry",
"dependencies": {

"com.unity.modules.ui": "1.0.0",
"com.unity.modules.imgui": "1.0.0"
}
},
"com.unity.ui.builder": {
"version": "1.0.0-preview.14",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.modules.ai": {
"version": "1.0.0",

17
UOP1_Project/Assets/Q1-QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
m_Name: Q1-QL3
m_EditorClassIdentifier:
_idQuest: 0
_steps: []
_isDone: 0

8
UOP1_Project/Assets/Q1-QL3.asset.meta


fileFormatVersion: 2
guid: a0e4ad897b76b4ebe9cb6963d84459dd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

17
UOP1_Project/Assets/Q2-QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
m_Name: Q2-QL3
m_EditorClassIdentifier:
_idQuest: 0
_steps: []
_isDone: 0

8
UOP1_Project/Assets/Q2-QL3.asset.meta


fileFormatVersion: 2
guid: 45a11c9d040da4543a6402e268b7dd4c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

17
UOP1_Project/Assets/Q3-QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4f9c8aa1ce987b4799f7093a99181a9, type: 3}
m_Name: Q3-QL3
m_EditorClassIdentifier:
_idQuest: 0
_steps: []
_isDone: 0

8
UOP1_Project/Assets/Q3-QL3.asset.meta


fileFormatVersion: 2
guid: f95c1016ace8641cf83a5ae625914196
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

17
UOP1_Project/Assets/QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3}
m_Name: QL3
m_EditorClassIdentifier:
_idQuestLine: 3
_quests: []
_isDone: 0

8
UOP1_Project/Assets/QL3.asset.meta


fileFormatVersion: 2
guid: 00a73f17d64bd4603976feef832c0fe7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Resources.meta


fileFormatVersion: 2
guid: 778234a6d2c8a4aca98a552d26ab3b33
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

21
UOP1_Project/Assets/S1-Q1-QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c4c03cb18bdd224b898e0687da8d1ac, type: 3}
m_Name: S1-Q1-QL3
m_EditorClassIdentifier:
_actor: {fileID: 0}
_dialogueBeforeStep: {fileID: 0}
_completeDialogue: {fileID: 0}
_incompleteDialogue: {fileID: 0}
_item: {fileID: 0}
_type: 0
_isDone: 0

8
UOP1_Project/Assets/S1-Q1-QL3.asset.meta


fileFormatVersion: 2
guid: 33112ea9b8b75414fa7cadfd01a64915
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

21
UOP1_Project/Assets/S2-Q1-QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c4c03cb18bdd224b898e0687da8d1ac, type: 3}
m_Name: S2-Q1-QL3
m_EditorClassIdentifier:
_actor: {fileID: 0}
_dialogueBeforeStep: {fileID: 0}
_completeDialogue: {fileID: 0}
_incompleteDialogue: {fileID: 0}
_item: {fileID: 0}
_type: 0
_isDone: 0

8
UOP1_Project/Assets/S2-Q1-QL3.asset.meta


fileFormatVersion: 2
guid: fd509d15198cf401ab423ed58e8dfaa1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

21
UOP1_Project/Assets/S3-Q1-QL3.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c4c03cb18bdd224b898e0687da8d1ac, type: 3}
m_Name: S3-Q1-QL3
m_EditorClassIdentifier:
_actor: {fileID: 0}
_dialogueBeforeStep: {fileID: 0}
_completeDialogue: {fileID: 0}
_incompleteDialogue: {fileID: 0}
_item: {fileID: 0}
_type: 0
_isDone: 0

8
UOP1_Project/Assets/S3-Q1-QL3.asset.meta


fileFormatVersion: 2
guid: c315d049e099a42e4b41c570b54ebcea
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

40
UOP1_Project/Assets/Resources/QuestEditorWindow.uss


.title {
-unity-font-style: bold;
font-size: 15px;
-unity-text-align: upper-center;
margin-top: 5px;
margin-bottom: 5px;
}
.padding5 {
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
padding-bottom: 5px;
}
.ColorStyling1 {
background-color: rgb(101, 100, 100);
}
.ColorStyling2 {
background-color: rgb(41, 41, 41);
}
.ColorStyling1 Label {
color: rgb(204, 204, 204);
}
.ColorStyling2 Label {
color: rgb(173, 173, 173);
}
Button {
background-color: rgb(113, 113, 113);
color: rgb(212, 212, 212);
}
.AddButton {
width: 20px;
height: 20px;
}

45
UOP1_Project/Assets/Resources/QuestEditorWindow.uxml


<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="QuestEditorWindow.uss" />
<ui:VisualElement name="quest-editor-window" style="flex-direction: row; height: 100%; width: 100%; min-height: 700px;">
<ui:VisualElement name="1st-column" style="width: 30%;">
<ui:VisualElement name="questlines" class="padding5 ColorStyling1" style="width: auto; height: 150px;">
<ui:Label text="Questlines" display-tooltip-when-elided="true" name="title-questline" class="title" style="flex-direction: row-reverse;">
<ui:Button text="+" display-tooltip-when-elided="true" name="CreateQL" class="AddButton" />
</ui:Label>
<ui:VisualElement name="questlines-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="steps" class="padding5 ColorStyling2" style="width: auto; height: 150px;">
<ui:Label text="Steps" display-tooltip-when-elided="true" name="title-step" class="title" style="flex-direction: row-reverse;">
<ui:Button text="+" display-tooltip-when-elided="true" name="CreateS" class="AddButton" />
</ui:Label>
<ui:VisualElement name="steps-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="step-info-panel" class="padding5 ColorStyling1" style="width: auto; height: 100%;">
<ui:Label text="Step Info" display-tooltip-when-elided="true" name="step-info" class="title" />
<ui:VisualElement name="step-info-scroll" style="height: 100%;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="2nd-column" style="width: 30%;">
<ui:VisualElement name="quests" class="padding5 ColorStyling2" style="width: auto; height: 150px;">
<ui:Label text="Quests" display-tooltip-when-elided="true" name="title-quest" class="title" style="flex-direction: row-reverse;">
<ui:Button text="+" display-tooltip-when-elided="true" name="CreateQ" class="AddButton" />
</ui:Label>
<ui:VisualElement name="quests-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="dialogues" class="padding5 ColorStyling1" style="width: auto; height: 150px;">
<ui:Label text="Dialogues" display-tooltip-when-elided="true" name="title-dislogues" class="title" />
<ui:VisualElement name="dialogues-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="dialogue-info-panel" class="padding5 ColorStyling2" style="width: auto; height: 100%;">
<ui:Label text="Dialogue Info" display-tooltip-when-elided="true" name="dialogue-info" class="title" />
<ui:VisualElement name="dialogue-info-scroll" style="height: 100%;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="3rd-column" style="width: 40%; background-color: rgb(185, 185, 185);">
<ui:Label text="Quest Preview" display-tooltip-when-elided="true" name="quest-preview-title" class="title" style="color: rgb(65, 65, 65); height: 18.5px;" />
<ui:Button text="Refresh" display-tooltip-when-elided="true" name="refresh-preview-btn" style="width: 100px; margin-left: auto; margin-right: 1px; background-color: rgb(113, 113, 113);" />
<ui:VisualElement name="actor-preview" style="width: 100px; height: 100px; margin-left: auto; margin-right: auto;" />
<ui:VisualElement name="actor-conversations" style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>

14
UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.uss


.title {
-unity-font-style: bold;
font-size: 15px;
-unity-text-align: upper-center;
margin-top: 5px;
margin-bottom: 5px;
}
.padding5 {
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
padding-bottom: 5px;
}

39
UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.uxml


<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="QuestEditorWindow.uss" />
<ui:VisualElement name="quest-editor-window" style="flex-direction: row; height: 100%; width: 100%; min-height: 700px;">
<ui:VisualElement name="1st-column" style="width: 30%;">
<ui:VisualElement name="questlines" class="padding5" style="width: auto; background-color: rgb(227, 253, 253); height: 150px;">
<ui:Label text="Questlines" display-tooltip-when-elided="true" name="title-questline" class="title" />
<ui:VisualElement name="questlines-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="steps" class="padding5" style="width: auto; background-color: rgb(203, 241, 245); height: 150px;">
<ui:Label text="Steps" display-tooltip-when-elided="true" name="title-step" class="title" />
<ui:VisualElement name="steps-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="step-info-panel" class="padding5" style="width: auto; background-color: rgb(227, 253, 253); height: 100%;">
<ui:Label text="Step Info" display-tooltip-when-elided="true" name="step-info" class="title" />
<ui:VisualElement name="step-info-scroll" style="height: 100%;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="2nd-column" style="width: 30%;">
<ui:VisualElement name="quests" class="padding5" style="width: auto; background-color: rgb(203, 241, 245); height: 150px;">
<ui:Label text="Quests" display-tooltip-when-elided="true" name="title-quest" class="title" />
<ui:VisualElement name="quests-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="dialogues" class="padding5" style="width: auto; background-color: rgb(227, 253, 253); height: 150px;">
<ui:Label text="Dialogues" display-tooltip-when-elided="true" name="title-dislogues" class="title" />
<ui:VisualElement name="dialogues-list" style="height: 100%;" />
</ui:VisualElement>
<ui:VisualElement name="dialogue-info-panel" class="padding5" style="width: auto; background-color: rgb(203, 241, 245); height: 100%;">
<ui:Label text="Dialogue Info" display-tooltip-when-elided="true" name="dialogue-info" class="title" />
<ui:VisualElement name="dialogue-info-scroll" style="height: 100%;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="3rd-column" style="width: 40%; background-color: rgb(113, 201, 206);">
<ui:Label text="Quest Preview" display-tooltip-when-elided="true" name="quest-preview-title" class="title" />
<ui:Button text="Refresh" display-tooltip-when-elided="true" name="refresh-preview-btn" style="width: 100px; margin-left: auto; margin-right: 1px; background-color: rgba(203, 241, 245, 255);" />
<ui:VisualElement name="actor-preview" style="width: 100px; height: 100px; margin-left: auto; margin-right: auto;" />
<ui:VisualElement name="actor-conversations" style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>

/UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.uss.meta → /UOP1_Project/Assets/Resources/QuestEditorWindow.uss.meta

/UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.uxml.meta → /UOP1_Project/Assets/Resources/QuestEditorWindow.uxml.meta

正在加载...
取消
保存