✉️
Note System - Doc
  • Note System - Introduction
  • ⭐Getting Started
    • Quick Setup
    • Detailed Setup
    • UI Button Setups
    • Note Scriptable Setup
    • Note Icon Creation
    • JSON Save System
  • ❓Support
    • FAQ
    • Inputs List
    • Note Visuals
    • Adding Audioclips
    • Text Display Issues
    • Trigger Event Setup
    • System Namespace
    • UI Manager Requirements
    • Changing Character Controller
    • Element 0 Missing / Hidden?
    • Variables Missing From Inspector?
    • SciptableObject Location
    • Legacy Setup Video
  • 🌀Development
    • Patch Notes - V2.1
    • Roadmap
  • 📧Contacts
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page

Was this helpful?

  1. Support

Changing Character Controller

PreviousUI Manager RequirementsNextElement 0 Missing / Hidden?

Last updated 1 year ago

Was this helpful?

  • You can see that we create a reference to your controller at the top of the “NoteDisableManager” 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

Similar to how I've done so below:

public class NoteDisableManager : MonoBehaviour
{
    [SerializeField] private FirstPersonController player = null;
    [SerializeField] private NotesInteractor noteInteractorScript =  null;

    public static NoteDisableManager instance;

    void Awake()
    {
        if (instance != null) { Destroy(gameObject); }
        else { instance = this; DontDestroyOnLoad(gameObject); }
    }

    private void Start()
    {
        DebugReferenceCheck();
    }

    public void ToggleRaycast(bool disable)
    {
        noteInteractorScript.enabled = disable;
    }

    public void DisablePlayer(bool isActive)
    {
        player.enabled = !isActive;
        NoteUIManager.instance.HideCursor(!isActive);
        noteInteractorScript.enabled = !isActive;
    }
}
❓