fr.jeanf.questsystem 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,11 +104,15 @@ namespace jeanf.questsystem
104
104
  #region Step Instantiation & Destroy
105
105
  public void InstantiateQuestStep(string id)
106
106
  {
107
- if (activeSteps.ContainsKey(id)) return;
107
+ if (activeSteps.ContainsKey(id))
108
+ {
109
+ Debug.Log("Step already in active steps");
110
+ return;
111
+ }
108
112
 
109
113
  if (stepMap.ContainsKey(id))
110
114
  {
111
- activeSteps.Add(id, Instantiate(stepMap[id]));
115
+ activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
112
116
  }
113
117
  }
114
118
 
@@ -17,8 +17,6 @@ namespace jeanf.questsystem
17
17
  public bool IsValid { get; private set; }
18
18
 
19
19
  [Header("General")] public string displayName;
20
- [SerializeField][Validation("A reference to a BaseGraph is required.")] public BaseGraph QuestTree;
21
- [SerializeField] public QuestStep startingStep;
22
20
 
23
21
  [Header("Custom messages init/finish")]
24
22
  [SerializeField] public StringEventChannelSO messageChannel; //change to delegate?
@@ -42,12 +40,6 @@ namespace jeanf.questsystem
42
40
  var invalidObjects = new List<object>();
43
41
  var errorMessages = new List<string>();
44
42
 
45
- if (QuestTree == null)
46
- {
47
- validityCheck = false;
48
- invalidObjects.Add(QuestTree);
49
- }
50
-
51
43
  IsValid = validityCheck;
52
44
  if (!IsValid) return;
53
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.31",
3
+ "version":"0.0.32",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",