Search Issue Tracker

Fixed in 5.4.0

Votes

116

Found in

5.1.3f1

Issue ID

722725

Regression

No

Materials lose reference to textures if loaded from Asset Bundles

--

-

How to reproduce:

1. Open attached project
2. Open scene Scenes/AtlasedSpriteParticleTest.unity
3. Go to Build/AssetBundle
4. Play the scene
- Note how the particles have no textures

Comments (32)

  1. 9edd2e3c21022cd1977839bb3e279c05?d=mm

    DanVioletSagmiller

    Nov 19, 2019 15:45

    I have added a message on the forum @Unity, to hopefully return some attention to this. https://forum.unity.com/threads/unity-shaders-getting-lost-in-2018-4-lts.779999/

  2. 6551c957062a8f5620fcdb429aa72c21?d=mm

    Kinetic

    Nov 01, 2019 01:43

    Still happening in Unity 2019.1.14. Finding this issue as closed in Unity 5 is embarassing.

  3. 67bd3ee91878b81338f05204f22233c1?d=mm

    brinisabderrahmen93

    Mar 18, 2019 10:45

    this worked for me but in built game you should put a list of shaders to build in settings or put the min a built scene that can never navigate to xD`using System.Collections; using System.Collections.Generic; using UnityEngine;
    this script should be putted in the parent of the asset bundle spawner and call FixeShaders Function just afterspawning the prefab from assets bundle
    public class ShaderBrinisFixe : MonoBehaviour {

    // Create a material from code
    public void FixeSahders()
    {
    // Create a material with transparent diffuse shader

    // assign the material to the renderer
    foreach (ParticleSystemRenderer p in gameObject.GetComponentsInChildren<ParticleSystemRenderer>())
    {
    p.material.shader= Shader.Find(p.material.shader.name);
    }
    }
    } `

  4. D9246e6262c47c376b0b84ab59ca72a8?d=mm

    SteveJLV

    Apr 01, 2017 06:36

    Just upgrade Unity and my bundel comes in but the shaders are blank. Texture name is there but in scène everything is pink. Of i manualy set shaders to standaard everything is fine. Unfortunate you can nog select all imported objects and set their shaders, thuis component disapears when multiple selecting

  5. E422b6043f99309c7664b2bd2046071c?d=mm

    BoboShu

    Mar 21, 2017 08:33

    it still happend on 5.5.2f1

  6. 2f881e8e1d0bcc10b86ce2c85ede19a4?d=mm

    Amazi

    Mar 07, 2017 06:51

    Why has this been resolved when it isn't fixed? This is still occurring on my version 5.4.3f1 (pro).

    Please can someone respond rather than ignoring the issue for the last two years and then falsely claiming it is fixed.

  7. E3fe4e9278b4b76a13e21cdb8e28cc60?d=mm

    ganusajjan

    Feb 28, 2017 18:27

    Is it fixed with 5.4 version of Unity?? Still i'm facing this issue!!

  8. 60e592000d89eaa2edfe29af496e1d57?d=mm

    JakeMuehleff0000

    Jan 13, 2017 23:19

    This issue is not fixed. Please do not resolve issues that are still broken.

  9. 2f6d89225aefd20b12cf7453eec3ae8f?d=mm

    marcopaivaf

    Dec 15, 2016 21:10

    Besides making sure that or Asset Bundle is built for your target platform, you need to make sure to clean the Asset Bundle cache from the previous time you downloaded it.

    I am using 5.5.0f3, and I always had this issue when using Asset Bundles. I fixed the issue today, by doing a couple of things:

    1. I made sure that the shader that I wanted to use was included in the Asset Bundle (I have a custom Standard Surface Shader);
    2. I made sure that I am building my Asset Bundle for my target platform (In my case, I am working on a Windows machine, targeting Windows 64);
    3. I included my custom shader to the "Always Included Shaders" list inside the Project Settings -> Graphics;
    4. I cleaned my Asset Bundle cache by running "Caching.CleanCache()" from an Editor script;
    5. Built Asset Bundle;

    Hope that helps someone =)

  10. D02ee51101c5cfd7c6510fed1aeae77c?d=mm

    ADaurio

    Oct 21, 2016 15:09

    This has not been resolved in Unity 5.4.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.