Problem with Mobile Control Add-on
Forum rules
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
- hersa
- New Member
- Posts: 7
- Joined: Fri Jul 31, 2020 9:04 pm
I have purchased and used the mobile control addon. I've imported and enabled it, but I can't make it integrated because the "integrate" tool in the MFPS menu is disabled. Actually the addon works fine, but when the game is paused or the score UI is showing the mobile control UI keep appear (not hidden)
- tr0picana
- Contributor
- Posts: 1
- Joined: Sun Sep 27, 2020 8:55 pm
This is how I fixed it, not sure if it's the best solution.
All code is in bl_UIReferences.cs
1. Add a public GameObject representing the Mobile UI object:
2. At the top of function SetUpUI():
3. At the top of function ShowMenu(bool active):
4. At the bottom of function JoinTeam(int id):
All code is in bl_UIReferences.cs
1. Add a public GameObject representing the Mobile UI object:
Code: Select all
public GameObject ChatInputField;
public GameObject MobileUI; //New variable
[SerializeField] private Button[] ClassButtons;
[SerializeField] private GameObject[] TDMJoinButton;
Code: Select all
if(MobileUI == null)
{
GameObject mui = GameObject.Find("MobileControls");
if(mui != null)
{
MobileUI = mui;
}
}
Code: Select all
if (MobileUI)
{
MobileUI.SetActive(!active);
}
Code: Select all
if (MobileUI && !MobileUI.activeInHierarchy)
{
MobileUI.SetActive(true);
}