I using new input system.
I have a character control script, it hangs directly on the player object. And there is a object examine script, it is connected to the examine screen and does not have a direct link to the player.
In the examine screen, you can rotate and zoom in on an object, interact with it by mouse.
How must I give control to the examine screen and disable character control at this time?
you can have a reference to the character control script on the examine script…
public CharacterControl cc;
then when you start examining object, just turn off the other script…
cc.enabled = false;
then when finished examining object, turn it back on cc.enabled=true
Or you could call a function in cc. like cc.EnableControls(true / false );
Or if you don’t want to have direct references, you could use unity messaging to send a message to various gameObjects that might be listening.