Search Unity

Failed to extends Schema, SBP error

Discussion in 'Addressables' started by Jiahaokun, Oct 16, 2019.

  1. Jiahaokun

    Jiahaokun

    Joined:
    Feb 10, 2018
    Posts:
    2
    upload_2019-10-16_10-7-42.png
    upload_2019-10-16_10-8-29.png
    In Addressable-Sample project,I create a new C# script like this and click "Build Player Content".
    Why does this happen?
     
  2. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey @Jiahaokun, is your SearchSchemaTest script inside an Editor folder? Otherwise what's happening is that you're trying to compile runtime scripts that have a reference to the UnityEditor assembly which cannot be done. (AddressableAssetSettingsDefaultObject is an editor type).

    Check out https://docs.unity3d.com/Manual/SpecialFolders.html for more information on special folder names.
     
  3. Jiahaokun

    Jiahaokun

    Joined:
    Feb 10, 2018
    Posts:
    2
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    No, using a custom ResourceLocator or async operation inherently is fine. The issue is that you're trying to use an Editor type in your script. If you're trying to use an Editor type in a runtime script, you won't be able to compile your build (ie your SBP errors).
     
  5. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    91
    If you have .asmdef files, make sure to only mark the Editor field for Editor Scripts which is generally in Editor Folder.

    I have this issue then I edit .asmdef files accordingly Editor sides. It worked. You should not have any Editor Scripts on Runtime.

    I had these errors!
    DOTween_AddressablesBuildError.PNG


    If you have DOTween package in your project. You can check the "Create ASMDEF..." to create .asmdef files properly for DOTween.

    DOTweenPanelOpen.png

    DOTweenCreateASMDEF.PNG

    DOTweenEditorASMDEF.PNG