Search Issue Tracker

Fixed in 5.0.1

Votes

1

Found in

5.0.0f2

Issue ID

674181

Regression

No

[AssetBundle] When loading prefab from asset bundle "GameObject references runtime script in scene file. Fixing" error is thrown

Asset Loading

-

Steps to reproduce this issue:

1. Open the attached project
2.Build AssetBundles (AssetBundles->Build AssetBundles from the menu)
3. Load the "Main" scene.
4. Press Play
5. Observe the errors logged ("GameObject ("name") references runtime script in scene file. Fixing!")

This also results in strange errors where MonoBehaviour fields that are initialized in Start() are null in Update() despite never being set anywhere but Start(). See the "How did testObject become null?" error appear in the console after entering playmode

Comments (23)

  1. watsonsong

    May 22, 2015 05:23

    This is marked as "Status: Fixed in future release"
    Is it be resloved, until Unity 5.0.2p2 I never seem it has been resolved.

  2. watsonsong

    May 20, 2015 08:09

    I change the script class name, and the reference to prefab is broken. If I remove the script which missing on the prefab, re-add it onto the prefab, and rebuild the AssetBundle, everything goes OK again.
    I dig into the prefab file and see just the fileID of the MonoBehavior is changed.
    You can repeat this 100%

  3. watsonsong

    May 19, 2015 12:15

    I test again on the version: 5.0.0p2, which announced resolve this issue.
    But It met again when I attach script with namespace.

  4. DeveloperJimin

    May 19, 2015 11:25

    I also have the bug in my case,when i load a scene from bundle,the scripts is missing.any ideas?

  5. watsonsong

    May 19, 2015 11:22

    I still met this issue in all Unity version, include 5.0.1f1, 5.0.2, 5.1.0
    Is anyone can fix this issue?

    http://forum.unity3d.com/threads/can-not-load-script-from-assetbundle-which-has-namespace.326633/

    I just using this demo: http://files.unity3d.com/vincent/assetbundle-demo/users_assetbundle-demo.zip
    simply add an script, change it namespace and this error occur.

  6. ChiuanWei

    May 13, 2015 09:15

    Fixing reference to the runtime script in scene file!

    i still have this error in Unity5.0.1f1

  7. maximelian1986

    May 09, 2015 20:12

    I have this error, when I changed MonoBehaviour script to simple ( mean normal that no derived from MonoBehaviour ). So I had that non-monobehaviour script connected to GameObject. That causes error in my case.

  8. GameEnggineer

    May 09, 2015 06:06

    I found this bug in 5.0.1f1 personal edition.After Reimporting all the unity assets.
    GameObject (named 'EventSystem') references runtime script in scene file. Fixing!

  9. stemybacsi

    Apr 07, 2015 12:21

    Hi everyone,

    5.0.1f1 update has rolled out since, that fixed the problem for me.

  10. jbooth

    Apr 06, 2015 15:00

    I'm still seeing this in 5.0.0f4 and can't upvote the bug because it's closed as fixed. Clearly not..

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.