WXMC/.svn/pristine/75/750d66270c4047fbb3a4e5771369c5995986cba9.svn-base
2024-12-04 16:18:46 +08:00

37 lines
696 B
Plaintext

#if UNITY_EDITOR
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEditor;
public class Test : MonoBehaviour
{
public AssetReference Asset;
public TextAsset TAsset;
[Button]
public void PP()
{
print(Asset.AssetGUID);
print(Asset.SubObjectName);
}
[Button]
public void Set(string guid, string subOjbectName)
{
Asset = new AssetReference(guid);
Asset.SubObjectName = subOjbectName;
}
[Button]
public void PrintAssetPath(string guid)
{
print(AssetDatabase.GUIDToAssetPath(guid));
}
}
#endif