コード例 #1
0
    public void ShowSprite(Sprite sprite)
    {
        EditorGUILayout.BeginHorizontal();

        GUILayout.Label(new GUIContent(sprite.name, GetThumbnail(sprite), sprite.textureRect.ToString()));

        GUILayout.FlexibleSpace();

        // TODO would be nice to vertically center this button when larger sprites are used
        if (GUILayout.Button("Remove"))
        {
            m_tileSheet.Remove(m_tileSheet.Lookup(sprite.name));
        }

        EditorGUILayout.EndHorizontal();
    }