diff --git a/Assets/Polyart/PolyartStudio/DreamscapeCastle/Scenes/DemoExterior.unity b/Assets/Polyart/PolyartStudio/DreamscapeCastle/Scenes/DemoExterior.unity index 0519d2d5..13f282e2 100644 --- a/Assets/Polyart/PolyartStudio/DreamscapeCastle/Scenes/DemoExterior.unity +++ b/Assets/Polyart/PolyartStudio/DreamscapeCastle/Scenes/DemoExterior.unity @@ -7155,6 +7155,37 @@ Transform: type: 3} m_PrefabInstance: {fileID: 57128978} m_PrefabAsset: {fileID: 0} +--- !u!1 &57565335 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 57565336} + m_Layer: 0 + m_Name: ObjectiveManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &57565336 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 57565335} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 76956767} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &57868294 PrefabInstance: m_ObjectHideFlags: 0 @@ -7858,12 +7889,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 59673816} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 141.0367, y: 26.4137, z: 389.6348} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 17.00827, y: 2.3127, z: 15.96308} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 538603973} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &59673823 MonoBehaviour: @@ -7890,7 +7921,7 @@ MonoBehaviour: isInteractable: 1 InfoItem: Info Icon here OffScreen: 1 - DestroyWithObject: 0 + DestroyWithObject: 1 BorderOffScreen: 0.01 OffScreenSize: 10 isHoofdPunt: 0 @@ -10001,6 +10032,40 @@ Transform: type: 3} m_PrefabInstance: {fileID: 76708262} m_PrefabAsset: {fileID: 0} +--- !u!1 &76956766 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 76956767} + m_Layer: 0 + m_Name: Managers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &76956767 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 76956766} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 127.89, y: 27.502998, z: 358.25} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1308217107} + - {fileID: 1755519505} + - {fileID: 57565336} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &79767207 PrefabInstance: m_ObjectHideFlags: 0 @@ -74617,7 +74682,7 @@ GameObject: m_Component: - component: {fileID: 481936153} m_Layer: 0 - m_Name: Enemies + m_Name: EnemiesParent m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -82365,6 +82430,39 @@ Transform: type: 3} m_PrefabInstance: {fileID: 534081122} m_PrefabAsset: {fileID: 0} +--- !u!1 &538603972 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 538603973} + m_Layer: 0 + m_Name: Level 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &538603973 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 538603972} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 141.0367, y: 26.4137, z: 389.6348} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 59673822} + - {fileID: 1078692958} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &538763307 PrefabInstance: m_ObjectHideFlags: 0 @@ -140350,6 +140448,10 @@ PrefabInstance: propertyPath: m_Target value: objectReference: {fileID: 2042403783257441061} + - target: {fileID: 11494328, guid: 3645d6c7c45caab4f9b35b7092836a7d, type: 3} + propertyPath: ToogleKey + value: 9 + objectReference: {fileID: 0} - target: {fileID: 11494328, guid: 3645d6c7c45caab4f9b35b7092836a7d, type: 3} propertyPath: MiniMapLayer value: 6 @@ -168696,13 +168798,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1078692956} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 141.0367, y: 26.4137, z: 389.6348} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 481936153} - m_Father: {fileID: 0} + m_Father: {fileID: 538603973} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1078692959 MonoBehaviour: @@ -189842,130 +189944,6 @@ Mesh: offset: 0 size: 0 path: ---- !u!1001 &1226853934 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1660212776} - m_Modifications: - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_SizeDelta.x - value: 120 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_SizeDelta.y - value: 157.6877 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8450869184831564982, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - propertyPath: m_Name - value: AbilityUIItem (3) - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: d208e0f3e2f10a440a15e9b095c4a0e8, type: 3} ---- !u!224 &1226853935 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 4918938079055515515, guid: d208e0f3e2f10a440a15e9b095c4a0e8, - type: 3} - m_PrefabInstance: {fileID: 1226853934} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1227270387 PrefabInstance: m_ObjectHideFlags: 0 @@ -205520,12 +205498,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1308217105} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 164.4, y: 19.60253, z: 322.1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 36.509995, y: -7.900469, z: -36.149994} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 76956767} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1308645757 PrefabInstance: @@ -264457,7 +264435,6 @@ RectTransform: - {fileID: 3533359467842034142} - {fileID: 1019458778} - {fileID: 1136520939} - - {fileID: 1226853935} m_Father: {fileID: 94165390} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} @@ -264482,7 +264459,7 @@ MonoBehaviour: m_Right: 0 m_Top: 0 m_Bottom: 0 - m_ChildAlignment: 3 + m_ChildAlignment: 4 m_Spacing: 77.89 m_ChildForceExpandWidth: 0 m_ChildForceExpandHeight: 0 @@ -294177,12 +294154,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1755519503} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 141.0367, y: 26.4137, z: 389.6348} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 13.146698, y: -1.0892982, z: 31.384796} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 76956767} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1756934197 PrefabInstance: @@ -355441,9 +355418,6 @@ MonoBehaviour: - ability: {fileID: 11400000, guid: 036f9184f5c4730488f8cf0f55598b5d, type: 2} abilityUiItem: {fileID: 2090201445} cdTimer: 0 - - ability: {fileID: 0} - abilityUiItem: {fileID: 0} - cdTimer: 0 --- !u!1001 &2612565535725099600 PrefabInstance: m_ObjectHideFlags: 0 @@ -356583,11 +356557,9 @@ SceneRoots: m_ObjectHideFlags: 0 m_Roots: - {fileID: 1161484236} - - {fileID: 2042403783257441060} + - {fileID: 897625917} - {fileID: 812152301} - {fileID: 1282845313} - - {fileID: 1308217107} - - {fileID: 1078692958} - - {fileID: 59673822} - - {fileID: 1755519505} - - {fileID: 897625917} + - {fileID: 538603973} + - {fileID: 76956767} + - {fileID: 2042403783257441060} diff --git a/Assets/ScriptableObjects/Abilities/Channel Heal Ability.asset b/Assets/ScriptableObjects/Abilities/Channel Heal Ability.asset index 004baa21..45abb605 100644 --- a/Assets/ScriptableObjects/Abilities/Channel Heal Ability.asset +++ b/Assets/ScriptableObjects/Abilities/Channel Heal Ability.asset @@ -13,6 +13,7 @@ MonoBehaviour: m_Name: Channel Heal Ability m_EditorClassIdentifier: displayName: Channel Heal + key: E icon: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} manaCost: 10 cooldown: 2 diff --git a/Assets/ScriptableObjects/Abilities/Fireball Ability.asset b/Assets/ScriptableObjects/Abilities/Fireball Ability.asset index 9de63b2e..9568e091 100644 --- a/Assets/ScriptableObjects/Abilities/Fireball Ability.asset +++ b/Assets/ScriptableObjects/Abilities/Fireball Ability.asset @@ -13,6 +13,7 @@ MonoBehaviour: m_Name: Fireball Ability m_EditorClassIdentifier: displayName: Fireball + key: Q icon: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} manaCost: 5 cooldown: 2 diff --git a/Assets/ScriptableObjects/Abilities/Freeze Shard Ability.asset b/Assets/ScriptableObjects/Abilities/Freeze Shard Ability.asset index 8762f422..1aee42b2 100644 --- a/Assets/ScriptableObjects/Abilities/Freeze Shard Ability.asset +++ b/Assets/ScriptableObjects/Abilities/Freeze Shard Ability.asset @@ -13,6 +13,7 @@ MonoBehaviour: m_Name: Freeze Shard Ability m_EditorClassIdentifier: displayName: Freeze Shard + key: R icon: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} manaCost: 10 cooldown: 2 diff --git a/Assets/Scripts/Abilities/Ability.cs b/Assets/Scripts/Abilities/Ability.cs index bfb4d9bc..80120d82 100644 --- a/Assets/Scripts/Abilities/Ability.cs +++ b/Assets/Scripts/Abilities/Ability.cs @@ -4,6 +4,7 @@ public abstract class Ability : ScriptableObject { [Header("Meta")] public string displayName = "Ability"; + public string key = ""; public Sprite icon; [Header("Cost & Cooldown")] diff --git a/Assets/Scripts/LevelStartTrigger.cs b/Assets/Scripts/LevelStartTrigger.cs index 13ae6458..70e22dc4 100644 --- a/Assets/Scripts/LevelStartTrigger.cs +++ b/Assets/Scripts/LevelStartTrigger.cs @@ -44,6 +44,9 @@ public class LevelStartTrigger : MonoBehaviour } } - if (oneShot) gameObject.SetActive(false); + if (oneShot) + { + gameObject.SetActive(false); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Managers.meta b/Assets/Scripts/Managers.meta new file mode 100644 index 00000000..505ab4d3 --- /dev/null +++ b/Assets/Scripts/Managers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b753d8c903a3aa449bf601c2ef7de570 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Managers/ObjectiveManager.cs b/Assets/Scripts/Managers/ObjectiveManager.cs new file mode 100644 index 00000000..a19c5538 --- /dev/null +++ b/Assets/Scripts/Managers/ObjectiveManager.cs @@ -0,0 +1,95 @@ +using System.Collections.Generic; +using UnityEngine; +using TMPro; + +public class ObjectiveManager : MonoBehaviour +{ + [System.Serializable] + public class Objective + { + [TextArea] public string text; + public bool completed; + } + + public static ObjectiveManager Instance { get; private set; } + + [Header("UI")] + public TextMeshProUGUI objectiveText; // Assign a TMP Text in Canvas + [Tooltip("Prefix/suffix for visual flair")] + public string prefix = "Objective: "; + public string completedPrefix = "✔ "; + public string incompletePrefix = "• "; + + [Header("Data")] + public List objectives = new List(); + public int activeIndex = 0; // Which objective is currently shown + public bool autoAdvanceOnComplete = true; + + void Awake() + { + if (Instance != null && Instance != this) { Destroy(gameObject); return; } + Instance = this; + } + + void Start() => RefreshUI(); + + // ----- Public API ----- + public void SetSingle(string text) + { + objectives.Clear(); + objectives.Add(new Objective { text = text, completed = false }); + activeIndex = 0; + RefreshUI(); + } + + public void SetList(IEnumerable list, int startIndex = 0) + { + objectives.Clear(); + foreach (var s in list) objectives.Add(new Objective { text = s, completed = false }); + activeIndex = Mathf.Clamp(startIndex, 0, Mathf.Max(0, objectives.Count - 1)); + RefreshUI(); + } + + public void SetActive(int index) + { + activeIndex = Mathf.Clamp(index, 0, Mathf.Max(0, objectives.Count - 1)); + RefreshUI(); + } + + public void MarkComplete(int index) + { + if (index < 0 || index >= objectives.Count) return; + objectives[index].completed = true; + + if (autoAdvanceOnComplete && index == activeIndex) + Advance(); + + RefreshUI(); + } + + public void Advance() + { + // Jump to next incomplete objective if any + for (int i = activeIndex + 1; i < objectives.Count; i++) + { + if (!objectives[i].completed) { activeIndex = i; RefreshUI(); return; } + } + // Nothing left → keep last shown as completed + RefreshUI(); + } + + public void RefreshUI() + { + if (objectiveText == null) return; + + if (objectives.Count == 0) + { + objectiveText.text = ""; + return; + } + + var o = objectives[Mathf.Clamp(activeIndex, 0, objectives.Count - 1)]; + var statePrefix = o.completed ? completedPrefix : incompletePrefix; + objectiveText.text = prefix + statePrefix + o.text; + } +} diff --git a/Assets/Scripts/Managers/ObjectiveManager.cs.meta b/Assets/Scripts/Managers/ObjectiveManager.cs.meta new file mode 100644 index 00000000..85913170 --- /dev/null +++ b/Assets/Scripts/Managers/ObjectiveManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 56157be1953f02648967607499db7db9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/AbilityUIItem.cs b/Assets/Scripts/UI/AbilityUIItem.cs index 3679e117..3fdcd0b1 100644 --- a/Assets/Scripts/UI/AbilityUIItem.cs +++ b/Assets/Scripts/UI/AbilityUIItem.cs @@ -14,6 +14,6 @@ public class AbilityUIItem : MonoBehaviour { this.abilityIcon.sprite = ability.icon; this.abilityName.text = ability.displayName; - this.abilityKeyText = abilityKeyText; + this.abilityKeyText.text = ability.key; } } diff --git a/Assets/UGUIMiniMap/Content/Scripts/Core/bl_MiniMapItem.cs b/Assets/UGUIMiniMap/Content/Scripts/Core/bl_MiniMapItem.cs index 49cc89c4..b54b4b02 100644 --- a/Assets/UGUIMiniMap/Content/Scripts/Core/bl_MiniMapItem.cs +++ b/Assets/UGUIMiniMap/Content/Scripts/Core/bl_MiniMapItem.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using System; +using UnityEngine; using UnityEngine.UI; using System.Collections; using UGUIMiniMap; @@ -50,10 +51,7 @@ public class bl_MiniMapItem : MonoBehaviour { private Vector3 position; private bl_MiniMap MiniMap; - /// - /// Get all required component in start - /// - void Start() + private void OnEnable() { MiniMap = bl_MiniMapUtils.GetMiniMap(); if (bl_MiniMap.MapUIRoot != null) @@ -63,6 +61,19 @@ public class bl_MiniMapItem : MonoBehaviour { else { Debug.Log("You need a MiniMap in scene for use MiniMap Items."); } } + /// + /// Get all required component in start + /// + void Start() + { + // MiniMap = bl_MiniMapUtils.GetMiniMap(); + // if (bl_MiniMap.MapUIRoot != null) + // { + // CreateIcon(); + // } + // else { Debug.Log("You need a MiniMap in scene for use MiniMap Items."); } + } + /// /// /// @@ -213,6 +224,11 @@ public class bl_MiniMapItem : MonoBehaviour { } } + private void OnDisable() + { + DestroyItem(true); + } + /// /// When player or the target die,desactive,remove,etc.. /// call this for remove the item UI from Map diff --git a/Assets/UnitySimpleMiniMap.meta b/Assets/UnitySimpleMiniMap.meta new file mode 100644 index 00000000..da58994a --- /dev/null +++ b/Assets/UnitySimpleMiniMap.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4426f62d3607eb94e890a5c22ab547b1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: