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

I have a bullet being created and when I pause the game I can see there is a component/script that was added to it that has compile errors.

Cause it has compile errors it doesnt show the name of the script.

Anyone have any ideas what I can do.
I can’t figure what is being added and i can’t figure out where its being added from.
Looked at all the components that is already on the bullet to see if there is any add component but there is none.

The referenced script (Unknown) on this Behaviour is missing!
UnityEngine.Resources:Load (string,System.Type)
PhotonNetwork:Instantiate (string,UnityEngine.Vector3,UnityEngine.Quaternion,byte,object[ ]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2478)
PhotonNetwork:Instantiate (string,UnityEngine.Vector3,UnityEngine.Quaternion,byte) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2454)
WeaponLauncher:Shoot () (at Assets/AirStrike/Scripts/WeaponSystem/WeaponLauncher.cs:428)
WeaponController:LaunchWeapon () (at Assets/AirStrike/Scripts/WeaponSystem/WeaponController.cs:86)
PlayerController:smile:esktopController () (at Assets/AirStrike/Scripts/Player/PlayerController.cs:193)
PlayerController:Update () (at Assets/AirStrike/Scripts/Player/PlayerController.cs:76)

Then fix the compile errors?

You shouldn’t be able to enter play mode if you have any compile errors.

Ya that’s what’s weird. I can enter playmode. I think i came up with an idea. I think ive seen a issue like this before. I’m thinking it’s a error on the prefab.

So I’ll repair the prefab later to see if that fixes it.

Then that’s not a compliation error. You just have a broken asset that needs fixing.

ya I was just saying what it says when a missing script is detected. The script isnt there before run time. But I think ive seen a prefab error where there are components not being shown that exist.

Unpacking the prefab and adding it as a prefab again fixed it. Soon as I pulled the prefab into the scene the missing script showed up. yet it didn’t when it was in prefab preview.

Thanks for the replies.

1 Like