Search Issue Tracker

By Design

Votes

0

Found in

2019.3.0a7

Issue ID

1164124

Regression

No

Can't assign missing script to a prefab if an asmdef is present in the folder

Scripting

-

1. What happened
Trying to fix missing script component within a prefab in isolation mode will complain about scripts that are not derived from monobehavior.

2. How we can reproduce it using the example you attached
1. Load the attached project or add the assets to an existing one
2. Select the Cube.prefab asset in the project and open the prefab (Isolation mode)
3. Try to assign script A and B to the missing script component on the prefab
Note that the warning doesn't go away when assigning a script to the slot
4. Try to leave Isolation mode and click on the Save button when prompted

Result: A "Save Failed" dialog will pop up and after clicking the okay button, error will be printed in the console about the scripts we assigned don't derive from MonoBehaviour

Deleting the AsmDef.asmdef asset from the project will make the warning go away and we'll be able to save the changes to the prefab

This is reproducible in all Unity versions since the implementation of Nested Prefab and its Isolation mode. Before, we were simply not able to instanciate a prefab in the scene that has missing scripts in it.

  1. Resolution Note (2020.1.X):

    By design. The scripts in this project are editor only scripts because the asmdef is only compatible with the ditor.

    If you try to attach the scripts to a regular game object by dragging into one in the Hierarchy, you will get dialog saying "Can't add script. The script is an editor script".

Comments (26)

  1. unity_K99WJS2TxGpRtA

    Jun 25, 2020 04:59

    I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.
    visit site https://images.google.com.ec/url?q=https://investimonials.com/users/bestonli0@inbox-me.top.aspx

  2. unity_K99WJS2TxGpRtA

    Jun 24, 2020 10:44

    i read a lot of stuff and i found that the way of writing to clearifing that exactly want to say was very good so i am impressed and ilike to come again in future..
    Phones & accessories https://www.jetcube.co/

  3. unity_K99WJS2TxGpRtA

    Jun 22, 2020 12:36

    this is really nice to read..informative post is very good to read..thanks a lot!
    The Document Centre https://www.document-centre.co.uk

  4. unity_K99WJS2TxGpRtA

    Jun 21, 2020 05:55

    Thanks so much for this information. I have to let you know I concur on several of the points you make here and others may require some further review, but I can see your viewpoint.
    read more https://maps.google.at/url?q=https://forum.mobilelegends.com/home.php?mod=space&uid=634479&do=profile

  5. unity_K99WJS2TxGpRtA

    Jun 20, 2020 14:06

    Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks.
    see here now https://cse.google.pl/url?q=http://www.pokerinside.com/profiles/view/362003

  6. johndd110

    Jun 14, 2020 09:35

    Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon.
    go now https://maps.google.com.ag/url?q=http://rogueadvocates.org/

  7. johndd110

    Jun 11, 2020 21:08

    I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers
    <a href="https://www.4shared.com/mp3/SFVJULdhea/24_online.html?">kangen water</a>

  8. unity_K99WJS2TxGpRtA

    Jun 11, 2020 10:10

    I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
    kangen water machines http://www.tripntale.com/profile/272274

  9. unity_K99WJS2TxGpRtA

    Jun 11, 2020 10:07

    This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free.
    kangen water machines http://www.tripntale.com/profile/272274

  10. unity_K99WJS2TxGpRtA

    Apr 12, 2020 12:52

    I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.
    Zahnarztpraxis Zürich https://www.styleyoursmile.ch/

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.