27 lines
701 B
C#
27 lines
701 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
#if UNITY_EDITOR
|
|
using BITKit;
|
|
using Project.B.Item;
|
|
using UnityEditor;
|
|
|
|
using UnityEngine;
|
|
namespace Net.Project.B
|
|
{
|
|
public static class ScriptableHelper
|
|
{
|
|
[MenuItem("Tools/生成Scriptable对应ID表")]
|
|
private static void GenID()
|
|
{
|
|
foreach (var guid in AssetDatabase.FindAssets($"t:{nameof(ScriptableItem)}"))
|
|
{
|
|
var path = AssetDatabase.GUIDToAssetPath(guid);
|
|
var item = AssetDatabase.LoadAssetAtPath<ScriptableItem>(path);
|
|
DictionaryReferenceScriptableObject.AddOrUpdate(item.Id,item.name);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endif |