Skip to content

Commit 45fc44b

Browse files
committed
Replace bad struct objects to classes
Add missing documentation
1 parent 1ddb6fb commit 45fc44b

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Runtime/IConfigsContainer.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public interface IConfig
1717
/// Generic container of the configs imported with a ConfigsImporter script
1818
/// The given <typeparamref name="T"/> type is the same of the config struct defined to be serialized in the scriptable object
1919
/// </summary>
20-
public interface IConfigsContainer<T> where T : struct
20+
public interface IConfigsContainer<T>
2121
{
2222
List<T> Configs { get; set; }
2323
}
@@ -26,7 +26,7 @@ public interface IConfigsContainer<T> where T : struct
2626
/// Generic container of the unique single config imported with a ConfigsImporter script
2727
/// The given <typeparamref name="T"/> type is the same of the config struct defined to be serialized in the scriptable object
2828
/// </summary>
29-
public interface ISingleConfigContainer<T> where T : struct
29+
public interface ISingleConfigContainer<T>
3030
{
3131
T Config { get; set; }
3232
}
@@ -36,7 +36,16 @@ public interface ISingleConfigContainer<T> where T : struct
3636
/// Use this configs container to hold the configs data in pairs mapped by it's given <typeparamref name="TKey"/> id
3737
/// </remarks>
3838
public interface IPairConfigsContainer<TKey, TValue> : IConfigsContainer<Pair<TKey, TValue>>
39+
{
40+
}
41+
42+
/// <inheritdoc />
43+
/// <remarks>
44+
/// Use this configs container to hold the configs data in pairs mapped by it's given <typeparamref name="TKey"/> id
45+
/// </remarks>
46+
public interface IStructPairConfigsContainer<TKey, TValue> : IConfigsContainer<StructPair<TKey, TValue>>
3947
where TKey : struct
48+
where TValue : struct
4049
{
4150
}
4251
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"name": "com.gamelovers.configsprovider",
33
"displayName": "Configs Provider",
4-
"version": "0.1.0",
4+
"author": "Miguel Tomas",
5+
"version": "0.1.1",
56
"unity": "2023.1",
7+
"license": "MIT",
8+
"type": "library",
69
"description": "This package helps manage the loading, unloading and setup of data configs into different set files (ex: ScriptableObjects)"
710
}

0 commit comments

Comments
 (0)