Code Monkey home page Code Monkey logo

Comments (4)

truong-bui avatar truong-bui commented on May 14, 2024

Unfortunately, you can't manually show movie player at the moment, only manual stop, however, it requires you to call stopmovie in Slate thread orthewise it won't work. You may want to add a fake umg loading screen before the actual loading screen, it's kind of tricky. Also, for server travelling, I recommend you use Level Streaming instead.

from asyncloadingscreen.

Rukgul avatar Rukgul commented on May 14, 2024

That is what I have now is a pre-loading screen widget. So I have read your post on the manual stop. But I don't know how to "be in the slate thread". I have a good understanding of the core development concepts and 90% of my project is in cpp. let's say I want to trigger it from a particular function in the player controller. Not sure where to add the code. I at least found this "ENQUEUE_UNIQUE_RENDER_COMMAND" which appears to allow me to call code in the Renderer Thread (not the "Slate" thread. I got past the linking process by adding RHI and RenderCore to my build.cs. but still not sure if I am heading in the right direction.

IN ACTOR TICK:

if (bStopAsyncLoadingScreen)
{
	ENQUEUE_UNIQUE_RENDER_COMMAND(StopLoadingScreen,
		{
			check(IsInRenderingThread());
			 FRHICommandListImmediate& MyRHICmdList = GRHICommandList.GetImmediateCommandList();
			 StopAsyncLoadingScreen(MyRHICmdList);
		}
		);

	bStopAsyncLoadingScreen = false;
}


static void ASRBasePlayer::StopAsyncLoadingScreen(FRHICommandList& RHICmdList)
{
	GetMoviePlayer()->StopMovie();
}

from asyncloadingscreen.

truong-bui avatar truong-bui commented on May 14, 2024

You can add your code to SSLoadingScreenLayout class. This is the class base for all layouts, you can call StopMovie from here too.

from asyncloadingscreen.

Rukgul avatar Rukgul commented on May 14, 2024

Much thanks. I appreciate that, and I will look at your code in that class but I guess what I fail to connect the dots on is how do I execute the code. In the game thread I can get a pointer and cast it (i.e. game instance, player controller, etc) for the render thread I need to push a command on the stack to avoid racing across stacks. How do I trigger logic in SLoadingScreenLayout class? Do I just do a static function and SLoadingScreenLayout::CallIt(). Sorry I'm just missing this one step!

from asyncloadingscreen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.