hey,
I work on a multiplayer game and for the victory or defeat interface animation we use a video with a media player. On the client, the animation works with no error or warning. but in the dedicated server we have a lot of error :
[2017.08.25-18.08.44:488][ 0]LogUObjectGlobals:Warning: Failed to load ‘/Script/MediaAssets’: Can’t find file ‘/Script/MediaAssets’
[2017.08.25-18.08.44:488][ 0]LogLinker:Warning: Can’t find file for asset ‘/Script/MediaAssets’ while loading NULL.
[2017.08.25-18.08.44:488][ 0]LogUObjectGlobals:Warning: Failed to load ‘/Script/MediaAssets’: Can’t find file for asset ‘/Script/MediaAssets’ while loading NULL.
[…]
[2017.08.25-18.08.44:654][ 0]LogBlueprint:Error: [Compiler ArenaTeamHUD] Error Could not find a function named “Play” in ‘ArenaTeamHUD’.
Make sure ‘ArenaTeamHUD’ has been compiled for K2Node_CallFunction_3775
[…]
[2017.08.25-18.08.44:655][ 0]LogBlueprint:Error: [Compiler ArenaTeamHUD] Error Could not find a function named “OpenSource” in ‘ArenaTeamHUD’.
Make sure ‘ArenaTeamHUD’ has been compiled for K2Node_CallFunction_3205
[…]
[2017.08.25-18.08.44:659][ 0]LogBlueprint:Error: [Compiler ArenaTeamHUD] Error The current value of the ’ MediaSource ’ pin is invalid: PinSubCategoryObject on pin ‘MediaSource’ is NULL and PinSubCategory is ‘’ not ‘self’
maybe the server try to compile media player function. If someone knows how to fix it,
Media playback is disabled on dedicated servers. You shouldn’t be running media related code or Blueprints on the server. If you have a good reason to run media on the server (I can’t think of any), you’ll have to modify LaunchEngineLoop.cpp
yes, I know it and the play and opensource function is calling only on the client but the server try to compile it when it start, so how can I avoid that the server try to compile it?
I try to put the function on the HUD, on a custom event call only on client, I try to check the authority before call it. but the server still try to compile it.
So, how can I create an object or a event that will be ignore durint the server compilation.
Ah sorry, I misunderstood. I talked to our Blueprint guy, and the way things are currently set up is indeed problematic. You have three options here:
try to find out which Blueprint is trying to load the Media related assets. This may be another Blueprint loading another Blueprint, etc. Try to arrange your BP in a way so it does not reference Media related assets on the server. This is the only content-only fix. The next two options will require Engine code changes.
Move this line out of the if-statement, i.e. right underneath it:
#if WITH_ENGINE
// Load runtime client modules (which are also needed at cook-time)
if( !IsRunningDedicatedServer() )
{
FModuleManager::Get().LoadModule(TEXT(“GameLiveStreaming”));
}
FModuleManager::Get().LoadModule(TEXT(“MediaAssets”)); #endif
Add the following to UMediaSource, UMediaPlayer and UMediaPlaylist:
Hey, I work with Lunder and I’m the developper of the project.
I tried the third solution, but unfortunately it doesn’t work. Well, maybe I made a mistake, but from what I’ve made, it doesn’t work.
However, your second solution does work, and we don’t have warnings and errors anymore, thank you!