Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to disable some unity warning

Discussion in 'Editor & General Support' started by lhy1515, Jul 19, 2023.

  1. lhy1515

    lhy1515

    Joined:
    Nov 22, 2022
    Posts:
    2
    Our project uses a large number of asset bundle resources. Most of them are bound with some scripts which we dont have and this is acceptable. However, as we load scene with these res, there are a bunch of warnings like "the referenced script on this Behavior is missing",which affect performance. I wonder if there is any way to disable warnings like these,thx
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    Remove the references, rebuild the asset bundles. :)

    If you cannot do this because you don't have the ability to rebuild these asset bundles, then your options are a bit more limited.

    One approach might be to figure out the GUID that is attempting to be loaded and create a blank MonoBehaviour (named whatever) with that exact same GUID so that when the asset bundle loads, it will load your blank script and be quiet. The asset bundles are compressed in some way so that has to be unzipped, then you gotta dig around in the binary data to find the GUID involved. Ideally you can find the GUID from source control or another original-project means.
     
  3. lhy1515

    lhy1515

    Joined:
    Nov 22, 2022
    Posts:
    2
    Very helpful advice, thanks a lot