Answer the question
In order to leave comments, you need to log in
Error CS1061 and CS0120 unity how to fix the error?
there was a problem with the code, i.e. two errors cs1061 and cs0120
link to the script (because it's too big): https://drive.google.com/file/d/1PBnvty6xHGRpxqsM2...
the code is not mine, I'm just trying it modify
if
public bool LockRotation { get; set; }
//public bool viewTransform;
private void RotateView()
{
if (LockRotation)
return;
viewTransform.LookRotation (transform, Camera.transform);
}
//public bool viewTransform;remove // then there will be only one error when solving which all the same errors appear (see photo above)
Answer the question
In order to leave comments, you need to log in
1. Read the text of the errors. Try to understand them
2. Read the Unit API
3. Read the SeaSharp tutorial - long and thoughtful
4. Google the error codes themselves - they have little to do with the unit.
You do not have a static field, you were told directly about it.
This is the first.
The second you are explicitly told that Transform does not contain LookRotation. It and is clear, you cho Boolean variables were going to move?
I'm afraid with such knowledge you will only create black holes and we will wallow in a singularity.
public static bool LockRotation { get; set; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question