Search Unity

Prefab loading of Assetbundle on PC is not displayed

Discussion in 'Asset Bundles' started by arabshia, Apr 26, 2022.

  1. arabshia

    arabshia

    Joined:
    Apr 26, 2022
    Posts:
    1
    The Assetbundle loaded on the PC.

    The prefab loaded shader is packaged separately and the Assetbundle in which the shader is loaded at project startup does not display properly.

    AssetBundle shaderAB = AssetBundle.LoadFromFile("shaderABPath");

    shaderAB.LoadAllAssets();

    Shader must be set when PreFab is loaded to display properly.

    for (int i = 0; i < mats.Length; i++)

    {

    mats.shader = Shader.Find(mats.shader.name);

    }

    Want to consult next everybody how to solve this problem.
     
  2. YibinZhang

    YibinZhang

    Joined:
    Jan 21, 2022
    Posts:
    13
    Can you make a Template and upload? I guess platform of the asset bundle don't match platform PC.