The referenced script on this Behaviour (Game Object '') is missing!

Unity 2018.4.0 and Addressables 0.8.6

When I set the Play Mode script to Packed play mode, build the addressables and run the game, the Editor log is filled by 80+ warnings such as:

The referenced script on this Behaviour (Game Object '') is missing!
The referenced script (Unknown) on this Behaviour is missing!
Fixing reference to the runtime script in scene file!
GameObject (named 'something') references runtime script in scene file. Fixing!

But everything works as expected.

Does anyone faced with such a problem? Could you please give me directions, how can I fix this warnings? I checked several times all prefabs that are in the addressables and I can’t find any missing scirpts in them. And I think this warnings may break the game build where my loaded content works unpredictably. I have sudden missing refrences in the prefabs, and errors like:

The file 'none' is corrupted! Remove it and launch unity again!
[Position out of bounds!]

I can not create a minimum reproducable project, because in a fresh project everything just works. So I really don’t know what to do.

We’ve run into similar warnings. we’re looking into it.

Oh my god, I thought I was crazy. Thanks!

Yeah I’m getting similar errors, The referenced script is missing, and then 'The file ā€˜none’ is corrupted

For more information…This issue seems to happen when I try to instantiate a non addressable prefab from an addressable scriptable object

At runtime, I load (via addressables) a ScriptableObject provider, ā€œDatabaseStoreā€, that references another ScriptableObject ā€œMap Databaseā€ā€¦which references more scriptable objects in a tree structure to find things like assets to load.
Loading other addressable assets from this works fine, as does instantiating scriptable object copies. It’s only when I try to instantiate a prefab that issues happen
The addressable store root

The scriptable object with the prefab reference (neither are directly addressable)

When the assets are loading, I see a lot of messages such as: The referenced script on this Behaviour (Game Object 'GridDoor') is missing!

When I call Object.Instantiate() on that prefab reference (or another similar one), things seem to break and the error message: The file 'none' is corrupted! Remove it and launch unity again! appears

This is on 2019.1.4

Everything works fine in Editor, even in Packed Play mode…its only when I build the game that this issue happens

EDIT: The actual error seems to be happening here:

The file 'none' is corrupted! Remove it and launch unity again!
[Position out of bounds!]
0x00007FFE151760EC (UnityPlayer) StackWalker::GetCurrentCallstack
0x00007FFE15178E09 (UnityPlayer) StackWalker::ShowCallstack
0x00007FFE151699E8 (UnityPlayer) GetStacktrace
0x00007FFE161CCD73 (UnityPlayer) DebugStringToFile
0x00007FFE158A5A90 (UnityPlayer) CachedReader::OutOfBoundsError
0x00007FFE158A83B5 (UnityPlayer) CachedReader::UpdateReadCache
0x00007FFE15B8A530 (UnityPlayer) TransferField_Array<StreamedBinaryRead,Converter_UnityEngineObject>
0x00007FFE15B9D70C (UnityPlayer) Transfer_UnityEngineObject<StreamedBinaryRead,1>
0x00007FFE15B8B200 (UnityPlayer) TransferField_LinearCollection<SafeBinaryRead>
0x00007FFE15B9116F (UnityPlayer) TransferScriptingObject<StreamedBinaryRead>
0x00007FFE15B91322 (UnityPlayer) TransferScriptingObject<StreamedBinaryRead>
0x00007FFE15BA166D (UnityPlayer) SerializableManagedRefTransfer::TransferEngineAndMonoInstance<StreamedBinaryRead>
0x00007FFE15B64949 (UnityPlayer) MonoBehaviour::VirtualRedirectTransfer
0x00007FFE155ABCFA (UnityPlayer) CloneObjectImpl
0x00007FFE155AB5F6 (UnityPlayer) CloneObject
0x00007FFE15C0B359 (UnityPlayer) Object_CUSTOM_Internal_CloneSingle
0x000001F2B38568A1 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:Internal_CloneSingle (UnityEngine.Object)
0x000001F2B38564EB (Mono JIT Code) UnityEngine.Object:Instantiate<T_REF> (T_REF)
0x000001F2887956B3 (Mono JIT Code) [RadialGridClusterBuilder.cs:189] CB.WorldGen.RadialGridClusterBuilder:PlaceConnector (CB.WorldGen.ConnectedTilesData,UnityEngine.Transform)
0x000001F2887950EB (Mono JIT Code) [RadialGridClusterBuilder.cs:180] CB.WorldGen.RadialGridClusterBuilder:PlaceConnectors (UnityEngine.Transform)
0x000001F28876F6F3 (Mono JIT Code) [RadialGridClusterBuilder.cs:100] CB.WorldGen.RadialGridClusterBuilder:PlaceClusterPrefabs (CB.WorldGen.RoomPrefabCreator,single,UnityEngine.Transform)
0x000001F28877F7CB (Mono JIT Code) [GeneratedRGFloor.cs:123] CB.WorldGen.GeneratedRGFloor:PlaceFloorPrefabs (CB.WorldGen.RoomPrefabCreator,UnityEngine.Transform)
0x000001F28877E93B (Mono JIT Code) [GeneratedRadialGridMap.cs:38] CB.WorldGen.GeneratedRadialGridMap:PlacePrefabs (UnityEngine.Transform)
0x000001F28877E57B (Mono JIT Code) [Map.cs:126] CB.WorldGen.Map/<_BuildEnvironment>d__26:MoveNext ()
0x000001F2DD5D3D54 (Mono JIT Code) [Timing.cs:5216] MEC.Timing/<_StartWhenDone>d__274:MoveNext ()
0x000001F2CD8A3F42 (Mono JIT Code) [Timing.cs:474] MEC.Timing:Update ()
0x000001F2B1E74FD8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFE1922BBCB (mono-2.0-bdwgc) mono_get_runtime_build_info
0x00007FFE191B2252 (mono-2.0-bdwgc) mono_perfcounters_init
0x00007FFE191BB25F (mono-2.0-bdwgc) mono_runtime_invoke
0x00007FFE15B7BF7D (UnityPlayer) scripting_method_invoke
0x00007FFE15B78CC1 (UnityPlayer) ScriptingInvocation::Invoke
0x00007FFE15B59369 (UnityPlayer) MonoBehaviour::CallMethodIfAvailable
0x00007FFE15B5941C (UnityPlayer) MonoBehaviour::CallUpdateMethod
0x00007FFE155A9160 (UnityPlayer) BaseBehaviourManager::CommonUpdate<BehaviourManager>
0x00007FFE155AF62D (UnityPlayer) BehaviourManager::Update
0x00007FFE1585D7D9 (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
0x00007FFE1584BAC7 (UnityPlayer) ExecutePlayerLoop
0x00007FFE1584BB95 (UnityPlayer) ExecutePlayerLoop
0x00007FFE1584F29F (UnityPlayer) PlayerLoop
0x00007FFE1519F3E2 (UnityPlayer) PerformMainLoop
0x00007FFE1519DBEA (UnityPlayer) MainMessageLoop
0x00007FFE151A2319 (UnityPlayer) UnityMainImpl
0x00007FFE151A3F9B (UnityPlayer) UnityMain
0x00007FF6F0E611F2 (SCP Containment Breach - Unity) __scrt_common_main_seh
0x00007FFE92877974 (KERNEL32) BaseThreadInitThunk
0x00007FFE955DA271 (ntdll) RtlUserThreadStart
(Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 214)

SECOND EDIT: Opened a case, 1158679

see: The referenced script (Unknown) on this Behaviour is missing! - Unity Engine - Unity Discussions

Apparently the issue is being tracked here: Unity Issue Tracker - Loading dependent AssetBundles fails to deserialize some scripts on Standalone builds - do you happen to know if it will be fixed for 1.0 of addressables, or at least soon? I’d like to be able to upgrade to using them but don’t want to put my game into a broken state for months, as the current issue makes my game completely fail to run in the player

It’s an engine fix, not an addressables one. We are working on it, but it won’t be fixed as of when we go out of preview. It will hopefully be fixed in some versions of the editor soon, but how quickly we can backport is unknown.

Has this been scheduled to be fixed?
I get these both, below, and clicking on them both goes to the same disabled Prefab Indexer in the Inspector.

The referenced script (Unknown) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object ā€˜Prefab Indexer’) is missing!

1 Like

how to solve it please any one correct me

I’m having a similar issue. When I load a scene by Addressables the objects say MissingReferenceException and the script says Missing (Mono Script) on the GameObject. Anyone have ideas what might be going on there?

It’s as if the GameObjects in the scene load from Addressables are missing all their references.

@unity_bill

Any updates?

I was having this problem after loading an addressable scene, and it turned out to be that after AsyncOperationHandle<SceneInstance>.isDone was true, I was calling Addressables.Release on the
AsyncOperationHandle. Not sure when or why I put this in my scene loading code, but basically as soon as I successfully loaded the scene, I was calling this and I guess releasing references to things and so lots of things were destroyed causing missing reference exceptions, pink textures, etc etc.

Having the same issue when calling SceneManager.LoadSceneAsync on a scene with a ScriptableObject attached as a SerializeField.

The strange thing is that the warning goes away if I press ā€œPlayā€ (in Unity) while having the ScriptableObject open in the Inspector window. If the SO is not selected, then the warning returns.

The referenced script (Unknown) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object '') is missing!

Unity 2019.4.14 and Addressables 1.8.5
Everything is fine on editor, but game is crashing in Android. I never see before ā€œbehaviour is missingā€ warnings on console.

2020-11-25 10:34:42.280 13211-15506/com.xxx.xxx E/Unity: The file '/data/app/com.xxx.xxx-ETB0RDVUkJhq84GEJvzJDQ==/base.apk/assets/bin/Data/resources.assets' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]
    UnityEngine.Resources:Load(String)
    UniversalMultiGameSystem:get_Instance()
    UMGSE:ActiveGame()
    DialogSystem:Init()
    LoginManager:Awake()
   
    [./Runtime/Serialize/SerializationCaching/CachedReader.cpp line 220]
    (Filename: ./Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 220)
   
   
   
    --------- beginning of crash
2020-11-25 10:34:42.280 13211-15506/com.xxx.xxx A/libc: Fatal signal 5 (SIGTRAP), code -6 (SI_TKILL) in tid 15506 (UnityMain), pid 13211 (com.xxx.xxx)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Move2d : MonoBehaviour {
    public float moveSpeed = 5f;
    // Use this for Initalization
    void Start() {
       
    }

    // Update is called once per frame
    void Update() {
        Jump();
        Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0f, 0f);
        transform.position += movement * Time.deltaTime * moveSpeed;   
    }

    void Jump(){
        if (Input.GetButtonDown("Jump")){
            gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(0f, 5f), ForceMode2D.Impulse);
        }
       
    }
}

Simple Code but why it says The referenced script on this Behaviour (Game Object ’ ') is missing!

Try the fix mentioned here. It worked in our case:

We changed ā€œMonoscript bundle namingā€ in Addressable Asset Settings from ā€œDisabledā€ to ā€œProject Nameā€ and that fixes the issues for our project.

2 Likes