Page 1 of 1
Problem with Mobile Control Add-on
Posted: Thu Sep 10, 2020 5:49 pm
by hersa
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)
Re: Problem with Mobile Control Add-on
Posted: Sat Oct 03, 2020 4:37 am
by hersa
Hello, is there any solution for my problem?
Re: Problem with Mobile Control Add-on
Posted: Mon Oct 05, 2020 3:29 pm
by tr0picana
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:
Code: Select all
public GameObject ChatInputField;
public GameObject MobileUI; //New variable
[SerializeField] private Button[] ClassButtons;
[SerializeField] private GameObject[] TDMJoinButton;
2. At the top of function
SetUpUI():
Code: Select all
if(MobileUI == null)
{
GameObject mui = GameObject.Find("MobileControls");
if(mui != null)
{
MobileUI = mui;
}
}
3. At the top of function
ShowMenu(bool active):
Code: Select all
if (MobileUI)
{
MobileUI.SetActive(!active);
}
4. At the bottom of function
JoinTeam(int id):
Code: Select all
if (MobileUI && !MobileUI.activeInHierarchy)
{
MobileUI.SetActive(true);
}
Re: Problem with Mobile Control Add-on
Posted: Sun Nov 01, 2020 9:24 am
by hersa
Great! it worked. thank you very much tr0picana