private GetAtlasDataForSprite ( |
||
sprite | ||
atlasName | string | |
atlasTexture | ||
리턴 | void |
private void OnSelectionChange() { if (Selection.activeObject == null) { return; } Sprite sprite = Selection.activeObject as Sprite; if (sprite != this.m_SelectedSprite) { if (sprite != null) { string selAtlasName; Texture2D selAtlasTexture; Packer.GetAtlasDataForSprite(sprite, out selAtlasName, out selAtlasTexture); int num = this.m_AtlasNames.ToList <string>().FindIndex((string s) => selAtlasName == s); if (num == -1) { return; } int num2 = Packer.GetTexturesForAtlas(selAtlasName).ToList <Texture2D>().FindIndex((Texture2D t) => selAtlasTexture == t); if (num2 == -1) { return; } this.m_SelectedAtlas = num; this.m_SelectedPage = num2; this.RefreshAtlasPageList(); } this.m_SelectedSprite = sprite; base.Repaint(); } }
private void OnSelectionChange() { if (Selection.activeObject == (UnityEngine.Object)null) { return; } Sprite activeObject = Selection.activeObject as Sprite; if (!((UnityEngine.Object)activeObject != (UnityEngine.Object) this.m_SelectedSprite)) { return; } if ((UnityEngine.Object)activeObject != (UnityEngine.Object)null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type PackerWindow.\u003COnSelectionChange\u003Ec__AnonStoreyB5 changeCAnonStoreyB5 = new PackerWindow.\u003COnSelectionChange\u003Ec__AnonStoreyB5(); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field Packer.GetAtlasDataForSprite(activeObject, out changeCAnonStoreyB5.selAtlasName, out changeCAnonStoreyB5.selAtlasTexture); // ISSUE: reference to a compiler-generated method int index1 = ((IEnumerable <string>) this.m_AtlasNames).ToList <string>().FindIndex(new Predicate <string>(changeCAnonStoreyB5.\u003C\u003Em__219)); if (index1 == -1) { return; } // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method int index2 = ((IEnumerable <Texture2D>)Packer.GetTexturesForAtlas(changeCAnonStoreyB5.selAtlasName)).ToList <Texture2D>().FindIndex(new Predicate <Texture2D>(changeCAnonStoreyB5.\u003C\u003Em__21A)); if (index2 == -1) { return; } this.m_SelectedAtlas = index1; this.m_SelectedPage = index2; this.RefreshAtlasPageList(); } this.m_SelectedSprite = activeObject; this.Repaint(); }
void OnSelectionChange() { if (Selection.activeObject == null) { return; } Sprite selectedSprite = Selection.activeObject as Sprite; if (selectedSprite != m_SelectedSprite) { if (selectedSprite != null) { string selAtlasName; Texture2D selAtlasTexture; Packer.GetAtlasDataForSprite(selectedSprite, out selAtlasName, out selAtlasTexture); int selAtlasIndex = m_AtlasNames.ToList().FindIndex(delegate(string s) { return(selAtlasName == s); }); if (selAtlasIndex == -1) { return; } int selAtlasPage = Packer.GetTexturesForAtlas(selAtlasName).ToList().FindIndex(delegate(Texture2D t) { return(selAtlasTexture == t); }); if (selAtlasPage == -1) { return; } m_SelectedAtlas = selAtlasIndex; m_SelectedPage = selAtlasPage; RefreshAtlasPageList(); } m_SelectedSprite = selectedSprite; Repaint(); } }