Using Different Character Controller
You can see that we create a reference to your controller at the top of the “SafeDisableManager” 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:
public class SafeDisableManager : MonoBehaviour
{
[Header("Player Controller Reference")]
[SerializeField] private FirstPersonController _player = null;
public void DisablePlayer(bool disable)
{
if (disable)
{
_player.enabled = false;
}
else
{
_player.enabled = true;
}
}
Last updated