private void ValidateAssets <T>(List <T> assets, string requiredLocation, string requiredExtension) where T : Object
        {
            //Let's make sure we aren't missing assets under requiredLocation
            var assetPaths = SA_AssetDatabase.FindAssetsWithExtentions(requiredLocation, requiredExtension);

            foreach (var assetPath in assetPaths)
            {
                var assetExtension = SA_PathUtil.GetExtension(assetPath);
                if (assetExtension.Equals(requiredExtension))
                {
                    var file = (T)AssetDatabase.LoadAssetAtPath(assetPath, typeof(T));
                    if (!assets.Contains(file))
                    {
                        assets.Add(file);
                        return;
                    }
                }
            }

            for (var i = 0; i < assets.Count; i++)
            {
                var asset = assets[i];
                if (asset == null)
                {
                    //We do not allow null element's unless this is a last element
                    if (i != assets.Count - 1)
                    {
                        assets.Remove(asset);
                        return;
                    }
                    continue;
                }

                if (!HasValidExtension(asset, requiredExtension))
                {
                    EditorGUILayout.HelpBox(asset.name + " need to be in *" + requiredExtension + " format.", MessageType.Error);
                    continue;
                }

                if (!SA_AssetDatabase.IsAssetInsideFolder(asset, requiredLocation))
                {
                    EditorGUILayout.HelpBox(asset.name + " has to be inside: \n" + requiredLocation, MessageType.Error);
                    using (new SA_GuiBeginHorizontal()) {
                        GUILayout.FlexibleSpace();
                        var move = GUILayout.Button("Move", EditorStyles.miniButton);
                        if (move)
                        {
                            var currentPath = AssetDatabase.GetAssetPath(asset);
                            var assetName   = SA_AssetDatabase.GetFileName(currentPath);
                            var newPath     = requiredLocation + assetName;
                            SA_AssetDatabase.MoveAsset(currentPath, newPath);
                        }
                    }
                }
            }
        }
        private Object DrawSoundField(Rect position, Object asset)
        {
            var color = GUI.color;

            if (asset != null)
            {
                if (!HasValidExtension(asset, k_RequiredSoundExtension))
                {
                    GUI.color = Color.red;
                }

                if (!SA_AssetDatabase.IsAssetInsideFolder(asset, AN_Settings.ANDROID_RAW_PATH))
                {
                    GUI.color = Color.red;
                }
            }

            var result = DrawObjectField(position, asset);

            GUI.color = color;
            return(result);
        }