Home>
Problem
Create a new C # script in the newly created project. Then inspector says "No MonoBehaviour".
At that time, an error mark appears in the ConsoleWindow, and the game cannot be executed on the editor. However, the error details are not written in the main ConsoleWindow.
I think the problem is probably that MonoBehavior is not recognized, and I confirmed it on VisualStudio, but MonoBehavior was properly inherited, and the inherited class MonoBehavior was blue.
Once the project was destroyed and a completely new project was created, the same phenomenon occurred.
I restarted (shut down) UnityEditor, UnityHub, VisualStudio, and my computer and nothing changed.
Visualstudio2019
UnityHub2.2
Unity 2.14f
-
Answer # 1
Related articles
- ruby - i want to deal with errors that occur in the search function implementation
- unity - about ml-agents errors
- ruby on rails - resolving errors that occur during rails db: migrate
- i want to remove duplicate errors that occur when registering documents from python to mongodb
- xcode - [swift] solution for errors that occur when updating collectionview
- php - terminal: elimination of errors that occur in unable to load dynamic library
- c # - about unity errors
- compile error - a lot of errors occur when compiling m5stack-paper code
- about errors in unity
- vbscript - frequent errors occur when sending emails (cdomessage) with vbs
- c# - how to deal with errors that occur after executing destroy()
- unity - i want to specify ontriggerstay to occur when tags overlap
- about unity errors
- about code errors in unity
- unity - i get a lot of errors when i put in certain assets
- c # - how do i fix unity compile errors for oculus builds
- General errors occur in GDI + when generating thumbnail and watermark images in net
Related questions
- c # - the player character of unity rotates
- c # - unity 2d breakout: i want to double the score for consecutive hits
- c# - unity visual studio
- unity - solution explorer in visual studio is empty
- unity c# if statement
- c# - to use resourcesdesignercs created in visual studio with unity
- c# - i want to change the time until i have an item for each item
- c # - code error of script implemented by unity cannot be resolved
- how to set up the editor in unity
- unity - about the means of writing novel games
I'll try to find out what I found after examining various things
From the conclusion, according to the link provided by Y0241-N
C: \ Program Files \ Unity \ Hub \ Editor \% version (such as 2019.2.14f)% \ Editor \ Data \ Tools \ RoslynScripts
The contents of the unity_csc file in
@ECHO OFF
Please correct it toset APPLICATION_CONTENTS =% ~ dp0 .. \ ..
"% APPLICATION_CONTENTS% \ Tools \ Roslyn \ csc.exe"/shared% *
exit/b% ERRORLEVEL%
(part of csc.exe)
If the location of the file is in a place that is protected by security, Windows 10
Just follow this link to grant access
The cause was written in the forum, but it seems that it is not usable for some reason even though it can be used without the .exe extension. So it seems that it can be used by specifying csc.exe properly instead of abbreviated as csc.
From here on, my memorandum is my guess,
set APPLICATION_CONTENTS =% ~ dp0 .. \ ..
"% APPLICATION_CONTENTS% \ Tools \ Roslyn \ csc.exe"/shared% *
Is this a language called cmd script? It seems to be written in, and it is close to computer language. Meaning
"Currently running C: \ Program Files \ Unity \ Hub \ Editor \% version (2019.2.14f etc.)% \ Editor \ Data as a variable (APPLICATION_CONTENS) and further under \ Tools \ Roslyn \ csc. All files (* wildcard) share exe ".
There was actually a csc.exe file in the specified directory.
And there was a Mono folder in the directory specified in the variable APPLICATION_CONTENTS.
This is probably the folder that UnityHub needs to use MonoBehaviour.
The error NoMonoBehaviour came out this time, so I thought this might be the cause.
Since the end is just a guess, there is a possibility of bullshit. Please understand