更改文件架构
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63c3ef7c8929d0547a0aea568a2deede
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95733b88fdbc7ce4bbcb00d1f27db221
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user