public void Replace(string shaderName) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit(sprite)) { Awake(); if (!Object.op_Implicit(sprite)) { return; } } if (entry != null) { entry.refCount--; entry = null; } if (atlases.TryGetValue(sprite.atlas, out entry) && !Object.op_Implicit(entry.atlas)) { atlases.Remove(sprite.atlas); entry = null; } if (entry == null) { UIAtlas uIAtlas = ResourceUtility.Instantiate <UIAtlas>(sprite.atlas); uIAtlas.spriteMaterial = new Material(uIAtlas.spriteMaterial); uIAtlas.spriteMaterial.set_shader(ResourceUtility.FindShader(shaderName)); entry = new AtlasEntry(uIAtlas); atlases.Add(sprite.atlas, entry); if (MonoBehaviourSingleton <AppMain> .IsValid()) { uIAtlas.get_transform().set_parent(MonoBehaviourSingleton <AppMain> .I._transform); } } entry.refCount++; sprite.atlas = entry.atlas; }