/
vasandi
/
AirSimGeorefWorld
Обзор
Документация
Войти
/
vasandi
/
AirSimGeorefWorld
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
import_heightmap.py
57 строк
2 KB
Андрей Васильченко
добавлен мир Москва
08 июл 2026, 13:02
08 июл 2026, 13:02
d82816d
Код
Авторство
О чём код?
import unreal import os log = unreal.log def main(): log("[MoscowWorld] Импорт heightmap...") # Путь к heightmap heightmap_path = os.path.join(unreal.SystemLibrary.get_project_directory(), "Content", "Heightmaps", "moscow_heightmap.png") if not os.path.exists(heightmap_path): log("ОШИБКА: Heightmap не найден: " + heightmap_path) return log("Heightmap найден: " + heightmap_path) # Проверяем, есть ли ландшафт actors = unreal.EditorLevelLibrary.get_all_level_actors() landscapes = [a for a in actors if a.__class__.__name__ == 'Landscape'] if landscapes: log("Ландшафт уже существует: " + landscapes[0].get_actor_label()) else: log("Ландшафт не найден. Импорт через Landscape Mode...") log("Для импорта используйте:") log("1. Landscape Mode (Shift+3)") log("2. Import from file") log("3. Выберите: Content/Heightmaps/moscow_heightmap.png") log("4. Scale: X=1.0, Y=1.0, Z=1.0") log("5. Section Size: 255x255, Components: 8x8") log("6. Нажмите Import") # Проверяем textures textures = [a for a in actors if a.__class__.__name__ == 'Texture2D'] log("Текстур в уровне: " + str(len(textures))) # Проверяем содержимое Content assets = unreal.EditorAssetLibrary.list_assets("/Game/Content", True, False) log("Ассетов в Content: " + str(len(assets))) # Проверяем Heightmaps heightmap_assets = unreal.EditorAssetLibrary.list_assets("/Game/Content/Heightmaps", True, False) log("Ассетов в Heightmaps: " + str(len(heightmap_assets))) for a in heightmap_assets: log(" " + a) # Проверяем Textures texture_assets = unreal.EditorAssetLibrary.list_assets("/Game/Content/Textures", True, False) log("Ассетов в Textures: " + str(len(texture_assets))) for a in texture_assets: log(" " + a) log("[MoscowWorld] Готово!") main()