// AtlasSprite の項目を描画する
        protected void DrawAtlas(UIView tView)
        {
            UIImage tTarget = null;

            if (tView is UIImage)
            {
                tTarget = tView as UIImage;
            }
            else
            {
                return;
            }

            Texture tAtlasTextureBase = null;

            if (tTarget.atlasSprite != null)
            {
                tAtlasTextureBase = tTarget.atlasSprite.texture;
            }

            bool tAtlasTextureRefresh = false;

            Texture tAtlasTexture = EditorGUILayout.ObjectField("Atlas Texture", tAtlasTextureBase, typeof(Texture), false) as Texture;

            if (tAtlasTexture != tAtlasTextureBase)
            {
                Undo.RecordObject(tTarget, "UIAtlasSprite Texture : Change");                           // アンドウバッファに登録

                RefreshAtlasSprite(tTarget, tAtlasTexture);

                EditorUtility.SetDirty(tTarget);

                tAtlasTextureRefresh = true;
            }

            GUILayout.Label("Atlas Path");
            GUILayout.BeginHorizontal();
            {
                GUI.color = Color.cyan;
                GUILayout.Label("Resources/");
                GUI.color = Color.white;

                string tAtlasPath = EditorGUILayout.TextField("", tTarget.atlasSprite.path);
                if (tAtlasPath != tTarget.atlasSprite.path)
                {
                    Undo.RecordObject(tTarget, "UIAtlasSprite Path : Change");                          // アンドウバッファに登録
                    tTarget.atlasSprite.path = tAtlasPath;
                    EditorUtility.SetDirty(tTarget);
                }

                tAtlasPath = "";
                if (tTarget.atlasSprite.texture != null)
                {
                    string tPath = AssetDatabase.GetAssetPath(tTarget.atlasSprite.texture.GetInstanceID());
                    if (System.IO.File.Exists(tPath) == true)
                    {
                        string c = "/Resources/";
                        int    p = tPath.IndexOf(c);
                        if (p >= 0)
                        {
                            // 有効なパス
                            tAtlasPath = tPath.Substring(p + c.Length, tPath.Length - (p + c.Length));
                            p          = tAtlasPath.IndexOf(".");
                            if (p >= 0)
                            {
                                tAtlasPath = tAtlasPath.Substring(0, p);
                            }
                        }
                    }
                }

                if (string.IsNullOrEmpty(tAtlasPath) == false)
                {
                    if (tAtlasPath != tTarget.atlasSprite.path)
                    {
                        GUI.backgroundColor = Color.yellow;
                    }
                    else
                    {
                        GUI.backgroundColor = Color.white;
                    }
                    if (GUILayout.Button("Set", GUILayout.Width(50f)) == true || tAtlasTextureRefresh == true)
                    {
                        Undo.RecordObject(tTarget, "UIAtlasSprite Path : Change");                              // アンドウバッファに登録
                        tTarget.atlasSprite.path = tAtlasPath;
                        EditorUtility.SetDirty(tTarget);
                    }
                    GUI.backgroundColor = Color.white;
                }
            }
            GUILayout.EndHorizontal();

            //-----------------------------------------------------

            // 一覧から選択出来るようにする


//			if( tTarget.atlasSprite != null && tTarget.atlasSprite.texture != null )
//			{
//				GUI.backgroundColor = Color.yellow ;
//				if( GUILayout.Button( "Refresh", GUILayout.Width( 140f ) ) == true )
//				{
//					Undo.RecordObject( tTarget, "UIAtlasSprite Texture : Change" ) ;	// アンドウバッファに登録
//					RefreshAtlasSprite( tTarget, tTarget.atlasSprite.texture ) ;
//					EditorUtility.SetDirty( tTarget ) ;
//				}
//				GUI.backgroundColor = Color.white ;
//			}

            if (tTarget.atlasSprite != null)
            {
                EditorGUILayout.Separator();                    // 少し区切りスペース

                if (GUILayout.Button("Reload", GUILayout.Width(50f)) == true || (tTarget.atlasSprite.isAvailable == false && tTarget.atlasSprite.texture != null && Application.isPlaying == false))
                {
                    // データに異常が発生しているので自動的に更新する
                    Debug.LogWarning("Atlas を自動的に更新:" + tTarget.atlasSprite.texture.name);
                    RefreshAtlasSprite(tTarget, tTarget.atlasSprite.texture);
                    EditorUtility.SetDirty(tTarget);
                    UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene());
                }

                string[] tName = tTarget.atlasSprite.GetNameList();
                if (tName != null && tName.Length > 0)
                {
                    // ソートする
                    List <string> tSortName = new List <string>();

                    int i, l = tName.Length;
                    for (i = 0; i < l; i++)
                    {
                        tSortName.Add(tName[i]);
                    }
                    tSortName.Sort();
                    tName = tSortName.ToArray();

                    string tCurrentName = null;
                    if (tTarget.sprite != null)
                    {
                        tCurrentName = tTarget.sprite.name;
                    }

                    int tIndexBase = -1;

                    for (i = 0; i < l; i++)
                    {
                        if (tName[i] == tCurrentName)
                        {
                            tIndexBase = i;
                            break;
                        }
                    }

                    if (tIndexBase < 0)
                    {
                        List <string> tList = new List <string>();
                        tList.Add("Unknown");

                        for (i = 0; i < l; i++)
                        {
                            tList.Add(tName[i]);
                        }

                        tName = tList.ToArray();

                        tIndexBase = 0;
                    }

                    // フレーム番号
                    int tIndex = EditorGUILayout.Popup("Selected Sprite", tIndexBase, tName);
                    if (tIndex != tIndexBase)
                    {
                        Undo.RecordObject(tTarget, "UIImage Sprite : Change");                                  // アンドウバッファに登録
                        tTarget.SetSpriteInAtlas(tName[tIndex]);
                        EditorUtility.SetDirty(tTarget);
                    }

                    // 確認用
                    Sprite tSprite = EditorGUILayout.ObjectField("", tTarget.sprite, typeof(Sprite), false, GUILayout.Width(60f), GUILayout.Height(60f)) as Sprite;
                    if (tSprite != tTarget.sprite)
                    {
                    }
                }
            }
        }