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

Inspector Framework

-

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)

  1. 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>

  2. 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/

  3. 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/

  4. 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.

  5. 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

  6. farrukhnawaz

    Oct 24, 2019 13:12

  7. 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

  8. DillanAcc

    Jul 08, 2018 08:28

    This hasn't been resolved yet

  9. CyRaid

    Jun 10, 2018 09:13

    Definitely should be a different error message like "Class Name must be the same as the script filename".

  10. 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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.