Search Issue Tracker
Fixed in 4.5.X
Votes
2
Found in
4.3.3f1
Issue ID
590946
Regression
No
When loading an asset bundle that contains a SpriteRenderer, the sorting layer for the sprite renderer gets reset to default
To reproduce:
1. Open attach project
2. Open Test scene
3. Enter play mode
Expected result: The prefab is instantiated and looks same way as the one already in the scene
Actual result: The prefab's sprite renderers lose their sorting layer, so they look different
Comments (5)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- There is no way to adjust the HDR Paper White value of the Unity Editor's interface, making it difficult/uncomfortable for some developers to work on very dark/bright scenes in HDR
- Animator window has a dropdown button that throws “MissingReferenceException” error on a new project when the previous project had a GameObject with an animation
- Animator State name overflows outside the visual box when the State has a long name
- UI Document file remains marked as Dirty after Undoing made changes
- Switching between UI Documents with different Canvas sizes marks the UXML file as dirty
Cuicui_Studios
Jul 29, 2015 14:55
I´m using Unity 5.1.2p1 and have the same problem. I set the Sorting Layers on Tags & Layers but the SpriteRenderer do not recognize them.
Asema_Khan
May 08, 2014 11:17
Here is the temp solution for this issue:
I have simply attached a script with all the game objects that have Sprite renderer attached with them, the script will simply take a public string which will contain the name of sorting layer and will assign it to the renderer in Awake(). Here is the code and it works well for me after downloading assets from bundle.
using UnityEngine;
using System.Collections;
public class SOA_ChangeSortingLayer : MonoBehaviour {
public string sortingLayerName;
// Use this for initialization
void Awake () {
SpriteRenderer myRenderer = this.gameObject.GetComponent<SpriteRenderer>();
if(myRenderer != null)
myRenderer.sortingLayerName = sortingLayerName;
}
}
Asema_Khan
May 08, 2014 10:15
Is this issue fixed in 4.3.4 release? If not, can you suggest some alternative solution for this problem?
TomasJ
Mar 26, 2014 10:48
Will be fixed in next release.
benhumphreys
Mar 06, 2014 00:55
I see this issue also.