For some reason it says that this code. Is not set to an instance of an object. How do I fix it. I already did everything in the tutorial. Pleaseeeee help This is the tutorial
CameraManager.instance.PanCameraOnContact(customInspectorObjects.panDistance, customInspectorObjects.panTime, customInspectorObjects.panDirection, false);
We need more info than this. Full error message (copy+paste as text from the console) and the relevant lines in the script. The message tells you which line (“script.cs(123)” => line 123 in that script).
Make sure you try debugging because it’ll help you in the future seeing how your code executes as it runs, and what the values of variables are: Unity - Manual: Debug C# code in Unity
The answer is always the same… ALWAYS!
How to fix a NullReferenceException error
https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/
Three steps to success:
- Identify what is null ← any other action taken before this step is WASTED TIME
- Identify why it is null
- Fix that