Can data layer load/unload automatally in Mobile Preview?

We want place platform specific actors in data layers, can we auto swith these layers in different feature level editor viewport? for example, hide desktop only data layers when mobile preview on

Hello!

It is currently not possible to control the data layer on a per platform basis as you suggests. You would need to add some custom code to handle it for now. You can use UEditorEngine::GetPreviewPlatformName to know if the preview mode is activated and which platform is being emulated.

It should be noted that there is currently no way to exclude data layers when cooking so that the desktop only data will be in the mobile package and also the opposite in the current scenario.

I have logged a feature request so the World Building team can consider adding support for this in a future release of the engine.

Regards,

Martin