Plugins/UnLua/Source/UnLuaEditor/Private/UnLuaEditorCore.cpp
// copy dependency file to plugin's content dir
copy dependency file to plugin's content dir
copy dependency file to plugin ' s content dir
static bool CopyDependencyFile(const TCHAR *FileName)
{
    static FString ContentDir = IPluginManager::Get().FindPlugin(TEXT("UnLua"))->GetContentDir();
    FString SrcFilePath = ContentDir / FileName;
    FString DestFilePath = GLuaSrcFullPath / FileName;
    bool bSuccess = IFileManager::Get().FileExists(*DestFilePath);
    if (!bSuccess)
    {
        bSuccess = IFileManager::Get().FileExists(*SrcFilePath);
        if (!bSuccess)
        {
            return false;
        }
        uint32 CopyResult = IFileManager::Get().Copy(*DestFilePath, *SrcFilePath, 1, true);
        if (CopyResult != COPY_OK)
        {
            return false;
        }
    }
    return true;
}
static bool CopyDependencyFile ( const TCHAR * FileName ) { static FString ContentDir = IPluginManager :: Get ( ) . FindPlugin ( TEXT ( " " ) ) -> GetContentDir ( ) ; FString SrcFilePath = ContentDir / FileName ; FString DestFilePath = GLuaSrcFullPath / FileName ; bool bSuccess = IFileManager :: Get ( ) . FileExists ( * DestFilePath ) ; if ( ! bSuccess ) { bSuccess = IFileManager :: Get ( ) . FileExists ( * SrcFilePath ) ; if ( ! bSuccess ) { return false ; } uint32 CopyResult = IFileManager :: Get ( ) . Copy ( * DestFilePath , * SrcFilePath , 1 , true ) ; if ( CopyResult != COPY_OK ) { return false ; } } return true ; }
copy dependency file to plugin's content dir
copy dependency file to plugin ' s content dir