CORE dashboard + a lot of changes

This commit is contained in:
2026-06-22 20:09:15 +02:00
parent 19d6bd934a
commit 89fa0b23b2
101 changed files with 1525 additions and 177 deletions
@@ -8,7 +8,12 @@ using UnityEngine;
namespace RPGCore.ObjectModules.EventObjectModule
{
[Serializable]
[RequireComponent(typeof(BaseObject))]
[ObjectModule(
name: "[Core] Data",
description: "[Built-in module] Manages all implementations of <b>BaseData</b>. " +
"Automatically adds matching data to attached implementation of <b>BaseObject</b>.",
required: true
)]
public class DataModule : ObjectModule<BaseObject>
{
// SERIALIZED
@@ -48,6 +53,9 @@ namespace RPGCore.ObjectModules.EventObjectModule
public T Get<T>() where T : BaseData
{
if (!_dataDict.ContainsKey(typeof(T)))
_dataDict.Add(typeof(T), Activator.CreateInstance(typeof(T)) as T);
return (T)_dataDict[typeof(T)];
}
}