1. 获取拖拽物体的路径
Object selectedObject = EditorGUILayout.ObjectField(selectedObject, typeof(Object));
if (selectedObject != null) {
string assetPath = AssetDatabase.GetAssetPath(selectedObject);
}
2024-01-06 08:51:16
1. 获取拖拽物体的路径
Object selectedObject = EditorGUILayout.ObjectField(selectedObject, typeof(Object));
if (selectedObject != null) {
string assetPath = AssetDatabase.GetAssetPath(selectedObject);
}
下一篇:五、对象序列化