Page 1 of 1

Add Loading Screen in MFPS 2.0

Posted: Wed Aug 14, 2019 9:04 pm
by Lovatto
Some people have been asking me how to integrate my Loading Screen asset in MFPS, even though the procedure is the same as in any other project, I am going to publish the simple steps here:

1 - Import the Loading Screen package from the Asset Store into your MFPS Unity Project.


2 - Add and Setup all your game scenes in SceneLoaderManager (Check the Loading Screen documentation for more info)

3 - In the MainMenu scene Select and Drag one of the SceneLoaders prefabs into the Canvas object:
Image

4 - in bl_Lobby.cs -> IEnumerator MoveToGameScene() -> replace or comment this line:

Code: Select all

 bl_UtilityHelper.LoadLevel((string)PhotonNetwork.CurrentRoom.CustomProperties[PropertiesKeys.SceneNameKey]);
And add this:

Code: Select all

 bl_SceneLoaderUtils.GetLoader.LoadLevel((string)PhotonNetwork.CurrentRoom.CustomProperties[PropertiesKeys.SceneNameKey]);
Image

Since version 1.6 of MFPS, there's a new feature "Waiting Room", so if you are using that feature you also have to change this:

in bl_WaitingRoom.cs -> LoadMap() ->
Replace:

Code: Select all

 bl_UtilityHelper.LoadLevel((string)PhotonNetwork.CurrentRoom.CustomProperties[PropertiesKeys.SceneNameKey]);
with:

Code: Select all

bl_SceneLoaderUtils.GetLoader.LoadLevel((string)PhotonNetwork.CurrentRoom.CustomProperties[PropertiesKeys.SceneNameKey]);
That's :)

Re: Add Loading Screen in MFPS 2.0

Posted: Fri Nov 08, 2019 5:12 am
by websbk
Thanks

Re: Add Loading Screen in MFPS 2.0

Posted: Wed May 20, 2020 11:20 am
by kwsystems
Hi,

I have followed all the steps you mentioned but I cant show the loading as I want.

What I did:

1) Import assets
2) Drag 1 prefab to the main menu scence
3) Update the code

Am I missing something.

The version for MPS im using is 1.7

Re: Add Loading Screen in MFPS 2.0

Posted: Thu May 21, 2020 12:09 pm
by Lovatto
- Show me a screenshot of where you have dragged the loading screen prefab in the main menu scene.
- Does the scene load after you integrate the code?

Re: Add Loading Screen in MFPS 2.0

Posted: Tue May 26, 2020 12:00 pm
by KKHackLabs
I followed the guide here, but I am still presented with the default loading screen.

Are there any settings that need to be changed for integration?

Re: Add Loading Screen in MFPS 2.0

Posted: Tue May 26, 2020 2:26 pm
by Lovatto
Show me a screenshot of your hierarchy showing where the Loadding Screen prefab is located, please.

Re: Add Loading Screen in MFPS 2.0

Posted: Tue May 26, 2020 6:57 pm
by KKHackLabs
Image

Error Message
Image

Re: Add Loading Screen in MFPS 2.0

Posted: Sun Jun 28, 2020 9:57 am
by setdevil
I have this error:
Assets\MFPS\Scripts\Network\Waiting Room\bl_WaitingRoom.cs(230,5): error CS0106: The modifier 'public' is not valid for this item
After i have replace with this: bl_SceneLoaderUtils.GetLoader.LoadLevel((string)PhotonNetwork.CurrentRoom.CustomProperties[PropertiesKeys.SceneNameKey]);
at line 181 in bl_WaitingRoom.cs

Anyone can help me?