evgen2023 Posted February 13 Posted February 13 Hello, thanks for a new version of SDK! Help me please how to migrate code for editor plugin? // 2.18.1 auto nViewportWindowId = UnigineEditor::ViewportManager::getActiveViewportWindow(); Unigine::PlayerPtr pPlayer = UnigineEditor::ViewportManager::getViewportWindowPlayer(nViewportWindowId); I don't find any comments about migration code for editor api here https://developer.unigine.com/ru/docs/future/upgrade/?rlang=cpp Next version of code will be right ? UnigineEditor::ViewportWindowPtr pViewportWindow = UnigineEditor::ViewportManager::getActiveViewportWindow(); Unigine::PlayerPtr pPlayer = pViewportWindow->getPlayer(); P.S. In current time editor could not start on my linux (engine think that build-in GPU is first active or something but I have nvidea).
victor Posted February 14 Posted February 14 Hello, You are absolutely right, this code should work as the previous one: UnigineEditor::ViewportWindowPtr pViewportWindow = UnigineEditor::ViewportManager::getActiveViewportWindow(); Unigine::PlayerPtr pPlayer = pViewportWindow->getPlayer(); 1
Recommended Posts