Description

Here is a work around :

#include "binkplugin_ue4.h"
 
UObject* UBinkMediaPlayerFactory::FactoryCreateBinary( UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, const TCHAR* Type, const uint8*& Buffer, const uint8* BufferEnd, FFeedbackContext* Warn ) 
{
   UBinkMediaPlayer* MediaPlayer = NewObject<UBinkMediaPlayer>(InParent, Class, Name, Flags);
 
#if 1
   // This workaround is based on FBinkMediaPlayerCustomization::HandleUrlPickerPathPicked.
   if (CurrentFilename.IsEmpty() || CurrentFilename.StartsWith(TEXT("./")) || CurrentFilename.Contains(TEXT("://")))
   {
      MediaPlayer->OpenUrl(CurrentFilename);
   }
   else
   {
      FString FullUrl = FPaths::ConvertRelativePathToFull(CurrentFilename);
      const FString FullGameContentDir = FPaths::ConvertRelativePathToFull(BINKCONTENTPATH);
      if (FullUrl.StartsWith(FullGameContentDir))
      {
         FPaths::MakePathRelativeTo(FullUrl, *FullGameContentDir);
         FullUrl = FString(TEXT("./")) + FullUrl;
      }
      MediaPlayer->OpenUrl(FullUrl);
   }
#else
   // original code
   MediaPlayer->OpenUrl(CurrentFilename);
#endif
   return MediaPlayer;
}
Steps to Reproduce
  1. Enable BinkMedia plugin
  2. Place a bk2 video file in /Content/Movie folder
  3. Editor detects bk2 video file and a prompt dialog appears
  4. Press Import
  5. Open the created asset

result:

Since the path is saved as full absolute path, File or Url property is marked as warning.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-215814 in the post.

0
Login to Vote

Unresolved
ComponentRAD - Bink Video
Affects Versions5.4
Target Fix5.6
CreatedMay 27, 2024
ResolvedJun 7, 2024
UpdatedOct 25, 2024
View Jira Issue