更改文件架构

This commit is contained in:
CortexCore
2023-06-07 18:38:07 +08:00
parent 93292b1a59
commit ed84166723
720 changed files with 297 additions and 65 deletions

View File

@@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit
{
[System.Serializable]
public class GetNameFromGameobject : IReference, INameProvider
{
public GameObject gameobject;
public string Get()
{
return gameobject.name;
}
public string GetName(object obj, params object[] extensions)
{
return Get();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 63c3ef7c8929d0547a0aea568a2deede
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit
{
[System.Serializable]
public class GetNameFromIDatabase : NameProvider
{
[SerializeReference, SubclassSelector] public References path;
public Object Object;
public override string GetName(object obj, params object[] extensions)
{
if (Object is IDatabase database)
{
return database.Get<string>(path);
}
else
{
throw new System.NullReferenceException();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 95733b88fdbc7ce4bbcb00d1f27db221
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: