Using Different Character Controller

You can see that we create a reference to your controller at the top of the “PhoneDisableManager” script.

  • NOTE: You want to disable input and mouse look when you disable the player!

  • Change the "player" reference to how you would disable your own controller

Simple to how I've done so below:

[SerializeField] private FirstPersonController player = null;

        public void DisablePlayer(bool disable)
        {
            if (disable)
            {
                player.enabled = false;
                PhoneUIManager.instance.ShowCrosshair(false);
            }

            if (!disable)
            {
                player.enabled = true;
                PhoneUIManager.instance.ShowCrosshair(true);
            }
        }

Last updated