multiple buttons activating at the same time, I'm at my wits end
I need to get something done today but for some reason the last thing I need to test when the button is pressed it's activating more than one function at the same time and I'm not telling it to do that.
// what it is told to do
public void GoIntoContainer()
{
if(setData!=null)
StartCoroutine(MoveToInternalContainer());
else
{
Debug.Log("No data has been Set");
}
}
IEnumerator MoveToInternalContainer()
{
screenTint.Tint();
yield return new WaitForSeconds(2f);
ContainerInfor_Panel.gameObject.SetActive(false);
navigationPanel.SetActive(false);
navigationPanel.transform.localPosition = new Vector3(-1760, 0);
openPanelButton.SetActive(false);
movement.TeleportToNewDestination(internalContainerPoint.position);
yield return new WaitForSeconds(2f);
//print(currentContainer.Data);
ApplyContainerInformationToUI();
screenTint.UnTint();
movement.SetTargetDestination(findtheFirstArtPeicePosition());
movingToArtPeice = true;
yield break;
}
but for some stupid reason its also doing this
public void openUI()
{
navigationPanel.SetActive(true);
navigationPanel.transform.localPosition = new Vector3(-935, 0);
openPanelButton.SetActive(false);
centerButton.SetActive(true);
}
public void SendplayerToNewDestination(Vector3 pos) // navigation code
{
float distance = Vector3.Distance(movement.gameObject.transform.position, pos);
// this was for if the distance would be to great to teleport the player to the proper location but if the desire of having the avatar walk all the way to the
// destination then it has been put on hold
//if(distance >= 15f)
//{
// //teleport
// StartCoroutine(QuickMovePlayer(pos));
//}
//else
//{
// movement.SetTargetDestination(pos);
//}
movement.SetTargetDestination(pos);
LevelManager.instance.SetMovementToProperContainer(pos); // this sets the off mesh link to the container destination so when the player enters they can rely on the off mesh link
if(navigationPanel.activeInHierarchy == false)
{
exitAlternativeCenterUI();
}
}
I don't understand why it's doing this and making these functions activate, I've tried moving them outside of an area for them to select in case they were being pressed even though they were de-activated. I am at my wits end and this is the last thing I need to do before I can pass it off to my contractor please help me.
Your answer
Follow this Question
Related Questions
Have a UI Button do what my Input.GetButtonDown("Use") does? 0 Answers
How do I change a state in an FSM with an UI button? 0 Answers
With the new unity input system. How do I setup UI buttons like in the old system. 0 Answers
UI button - 0 alpha response. 0 Answers
How do I control my car with UI buttons? 0 Answers