Search Issue Tracker
Fixed in 2018.1.X
Votes
1
Found in
2018.1.0a5
2018.1.0b13
Issue ID
1025374
Regression
Yes
[2018.1] 'Can't add script behaviour VisualContainerAsset' error when adding script to GO with mismatched file and class name
Reproduction steps:
1. Create a new script.
2. Change the filename of that script.
3. Add script to an object in the scene.
Expected error message: "Can't add script component 'NewBehaviourScript' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match."
Actual error message: "Can't add script behaviour VisualContainerAsset. The script needs to derive from MonoBehaviour!"
Reproduced: 2018.1.0a5, 2018.1.0f1
Not reproducible: 2017.1.3p1, 2017.2.1p3, 2017.3.1f1, 2018.1.0a4, 2018.2.0b1
Comments (24)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shadow casters are not rendered when deploying builds in specific Unity 6.0 versions
- Automatically unfocuses when focusing and DropdownField is open
- Debug Draw Mode stops rendering GameObjects when GPU Resident Drawer is enabled
- Only a single Selector is added to a Container when drag and dropping multiple of them on an Element in UI Builder
- Reverting all overrides in a Prefab Variant creates unrevertible changes when the parent GameObject of the Prefab is a Canvas
techpixlswork
May 18, 2020 12:36
Watch your favourite cartoons on one click. <a href="https://muqbar.com/watch-cartoons-online/">watch cartoons online</a>
nancydawkins60
May 18, 2020 06:11
Your information is very use full for me i want to appreciate this blog keep doing great job https://www.abbraci.com/product/the-gentleman-coach-tracksuit/
kevinbear741
May 08, 2020 05:33
Thanks for sharing this amazing blog you have made some nice article provide its amazing dear
Click here https://www.usajacket.com/category/gaming-merchandise/the-last-of-us-part-ii-jackets/
GroverGarcia
Mar 14, 2020 06:19
The post is very informative many people want to read these type of post I am also part of them and after the reading give good reviews but this is not my profession I am a fashion designer at https://www.black-leatherjacket.com/david-puddy-8-ball-jacket-for-sale and after the job, my first choice is reading blogs and articles for taking information.
GroverGarcia
Feb 26, 2020 06:08
The post is very informative for everyone I always search for different types of the blog but this is not my profession. Now I am a fashion designer and recently designed the <a href="https://www.abbraci.com/category/mens-red-leather-jacket/">Mens Red Leather Jacket</a> and i also admire who wrote the blog clearly
farrukhnawaz
Oct 24, 2019 13:12
Right Definitely should be a different error message like "Class Name must be the same as the script filename".
https://afashionz.com/kashees-beauty-parlour-bridal-make-up/
https://awampk.com/prime-minister-kamyab-jawan-program/
https://websolution.pk/electrical-engineering-mcqs-questions-answers/
Jack-3rd
Aug 16, 2018 15:25
Just got this error, have created scripts with Visual Studio fine with not issue. But started a new project and got the error
DillanAcc
Jul 08, 2018 08:28
This hasn't been resolved yet
CyRaid
Jun 10, 2018 09:13
Definitely should be a different error message like "Class Name must be the same as the script filename".
Destructor83
May 28, 2018 19:39
I've already understood why this happened with me. In my case file name of script was different with class name for one letter. I fix mistake and all work good