update
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
"references": [
|
||||
"GUID:a209c53514018594f9f482516f2a6781",
|
||||
"GUID:274d4ecae4648e94c8b2cee7218378a0",
|
||||
"GUID:66d2ae14764cc7d49aad4b16930747c0",
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:9400d40641bab5b4a9702f65bf5c6eb5"
|
||||
"GUID:9400d40641bab5b4a9702f65bf5c6eb5",
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
@@ -14,9 +14,7 @@
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [
|
||||
"ODIN_INSPECTOR"
|
||||
],
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AYellowpaper.SerializedCollections;
|
||||
using UnityEngine;
|
||||
using RotaryHeart.Lib.SerializableDictionary;
|
||||
namespace BITKit.ObjectMaterial
|
||||
{
|
||||
[System.Serializable]
|
||||
@@ -16,29 +16,13 @@ namespace BITKit.ObjectMaterial
|
||||
{
|
||||
ObjectMaterialInfo GetObjectMaterial(string action = "None", Vector3 pos = default);
|
||||
}
|
||||
public class ObjectMaterialScriptableObject : BITKitSO
|
||||
public class ObjectMaterialScriptableObject : ScriptableObject
|
||||
{
|
||||
|
||||
[Header(Constant.Header.Settings)]
|
||||
public new string name;
|
||||
[Header(Constant.Header.Prefabs)]
|
||||
public SerializableDictionaryBase<string, ObjectMaterialInfo> dictionary = new();
|
||||
|
||||
public override void RegisterAssets()
|
||||
{
|
||||
Data.Set<ObjectMaterialScriptableObject>(name, this);
|
||||
dictionary.Values.ForEach(x =>
|
||||
{
|
||||
x.clips.ForEach(x =>
|
||||
{
|
||||
Data.Set<AudioSO>(x.name, x);
|
||||
});
|
||||
x.prefabs.ForEach(x=>
|
||||
{
|
||||
Data.Set<Transform>(x.name,x);
|
||||
});
|
||||
});
|
||||
}
|
||||
public ObjectMaterialInfo Get(string name)=>dictionary[name];
|
||||
public SerializedDictionary<string, ObjectMaterialInfo> dictionary = new();
|
||||
public ObjectMaterialInfo Get(string _name)=>dictionary[_name];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user