Hi guys,
I did my best to try and understand this topic and the one at
http://www.tasharen.com/forum/index.php?topic=37.15, yet I still have problems with my referencing atlas

. I'm creating buttons dynamically which use that atlas, and reference 2 other which share sprite names.
I have the following code to swap atlases:
using UnityEngine;
using System.Collections;
public class AtlasSwapper : MonoBehaviour {
public UIAtlas atlasRef;
private UIAtlas atlasSD;
private UIAtlas atlasHD;
void Start () {
GameObject go
= Resources
.Load("Atlas_SD",
typeof(GameObject
)) as GameObject
; atlasSD = go.GetComponent<UIAtlas>();
GameObject go2
= Resources
.Load("Atlas_HD",
typeof(GameObject
)) as GameObject
; atlasHD = go2.GetComponent<UIAtlas>();
}
void Awake () {
if (Mathf.Max(Screen.currentResolution.width, Screen.currentResolution.height) >= 640)
atlasRef.replacement = atlasHD;
else
atlasRef.replacement = atlasSD;
}
void OnDisable()
{
atlasRef.replacement = atlasSD;
}
}
I also have my main referencing atlas at the resources folder. The problem, is that once the scene loads on game, the referencing atlas converts to Normal instead of Reference, and loses its Atlas value. Therefore, only labels show up on screen

I hope you guys have a solution for this. Thanks in advance.
Luis