Search Unity

Warning: Type DefaultAsset is in editor assembly UnityEditor

Discussion in 'Addressables' started by dgoyette, Jun 21, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,987
    I started seeing this warning in a recent Addressable release. It happens when entering play mode:

    Type DefaultAsset is in editor assembly UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. Asset location with internal id Space_Soldier/Meshes/SoldierArm/SoldierArmHardware will be stripped.
    UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()


    If I search for "SoldierArmHardware " in the Addressable window, I get this:

    upload_2019-6-21_13-33-54.png

    Basically it's a 3rd party package from the asset store, which happens to have a Resources folder in it. I'm wondering the significance of the warning, and what I should do to prevent it?
     
  2. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    43
    You can modify the built-in asset group to not include assets from Resources folder. I'm not sure if there is any benefit from including them in the first place, since they are also packed by default into the player build by Unity? @unity_bill ?
     
  3. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    954
    "including them" does not actually mean having addressables add them to the build, because as you said, Resources are automatically in the build. when we "include them" it means that we know where they are, and support Addressables.Instantiate("some thing in resources"). This is a feature for people migrating from Resources. The more I think on it, the more I think it should be off by default.

    In your case, you don't care about the warning, and can hopefully get rid of it by following @stefankohl's advice. The significance is if you had an asset in your project that you explicitly marked as addressable, but was in fact an editor only asset, we felt we should warn you that it won't end up in the build. perhaps we shouldn't.