厦门思明区建设局网站,装修推荐平台,php mysql 网站建设,ps制作个性字网站使用UE 4.25以上版本后#xff0c;python代码改动相对较少。 如下类库在4.20/21/22等早起版本不适用#xff0c;建议查询UE的python文档
unreal.EditorAssetLibrary
1.获取当前选中的资源#xff08;Content中#xff09; # 获取当前选中的资产selected_assets unreal.E…使用UE 4.25以上版本后python代码改动相对较少。 如下类库在4.20/21/22等早起版本不适用建议查询UE的python文档
unreal.EditorAssetLibrary
1.获取当前选中的资源Content中 # 获取当前选中的资产selected_assets unreal.EditorUtilityLibrary.get_selected_assets()
2.过滤出staticmesh资产
# assets 是一个列表
def filter_static_meshes(assets):# 过滤出静态网格资产static_mesh_assets unreal.EditorFilterLibrary.by_class(assets, unreal.StaticMesh)return static_mesh_assets
3.过滤出texture资产(同上)
#过滤assets_loaded列表只包含Texture2D贴图。
myTextures unreal.EditorFilterLibrary.by_class(assets_loaded, unreal.Texture2D)