- Home /
Please help - Several Unity/visual studio errors encountered,Several Unity errors encountered - please help
Hello
i am a new to unity and c#, and intend to begin intensive studying. I will try to keep this short but i am a complete beginner to this and really would very very much appreciate some guidance here.
I am trying to follow along and practice alongside videos from tutors online. I have stumbled across a host of problems since then.
one being 'the type or namespace 'Monobehaviour' could not be found. the using utilityengine line is at the top. also upon loading visual studios It states 'you can start visual without these extensions, but functionality they provide will be missing' - error while evaluating condition 'monodroidinstalled'.
There are also several other problems that i will leave out for the sake of brevity .
i have reinstalled several times.
Please help me out here. thanks
Sounds like a corrupted installation. I would completely uninstall Unity, making sure Visual Studio goes too. Any apps still installed that you think might be related - remove them too. Reboot your machine (Windows / $$anonymous$$AC?) Then download and install the latest stable Unity.
If this doesn't fix the problem, you have something else going on.
Answer by newfbwade · Apr 29, 2019 at 04:40 AM
thank you for replying @KevRev ! even though i am a complete beginner. i instantly thought i had a corrupt install due to the error notification on my first run, but due to not knowing what i did wrong, jumped in anyway. problem is, i have re installed to no avail...but seems likely a corrupt install...any advice would make my day. thanks.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Examplescript : $$anonymous$$onoBehaviour
{
public float speed = 0.0f;
public float distance = 0.0f;
public float time = 0.0f;
// Start is called before the first frame update
void Start()
{
speed = distance / time;
print("You are travelling at " + speed + "$$anonymous$$PH");
}
// Update is called once per frame
void Update()
{
}
}
Here is the code in case i have errors here anyway. 'print' is underlined red, as is monobehaviour. the variables are set to 0 and are meant to be changed in unity , which works for the tutor in the video but not for me.
Sounds like VS is not loading the assemblies properly.
Close Unity and VS. Browse to your project folder and delete the "Library" folder. When you open Unity, it'll reimport the project... And hopefully fix the problem.