<commit_before>﻿using System.Linq;
using JetBrains.Annotations;
using UnityEditor;
using UnityEngine;

namespace Assets.Editor
{
    [UsedImplicitly]
    public class AssetManager : MonoBehaviour 
    {
        [MenuItem("HP-TCG Card Management/Add Outline Prefabs"), UsedImplicitly]
        public static void AddPhotonViews()
        {
            var assetFolderPaths = AssetDatabase.GetAllAssetPaths().Where(path => path.EndsWith(".prefab") && path.Contains("/Cards/"));

            string outlinePath = AssetDatabase.GetAllAssetPaths().FirstOrDefault(path => path.Contains("Outline.prefab"));

            var outlinePrefab = (GameObject) AssetDatabase.LoadAssetAtPath(outlinePath, typeof (GameObject));

            
            foreach (string path in assetFolderPaths)
            {
                var obj = (GameObject) AssetDatabase.LoadAssetAtPath(path, typeof(GameObject));
                var outlineInstance = (GameObject) Instantiate(outlinePrefab, new Vector3(0f, 0f, 0.1f), Quaternion.Euler(90f, -180f, 0));

                outlineInstance.transform.parent = obj.transform;

                AssetDatabase.SaveAssets();
            }
        }

        [MenuItem("HP-TCG Card Management/Remove Photon Views from Cards"), UsedImplicitly]
        public static void RemovePhotonViews()
        {
            var assetFolderPaths = AssetDatabase.GetAllAssetPaths().Where(path => path.EndsWith(".prefab") && path.Contains("/Cards/"));

            foreach (string path in assetFolderPaths)
            {
                var obj = (GameObject)AssetDatabase.LoadAssetAtPath(path, typeof(GameObject));
                var view = obj.GetComponent<PhotonView>();
                if (view)
                {
                    DestroyImmediate(obj.GetPhotonView(), true);<commit_msg>playing with the outline script<commit_after>﻿using System.Linq;
using JetBrains.Annotations;
using UnityEditor;
using UnityEngine;

namespace Assets.Editor
{
    [UsedImplicitly]
    public class AssetManager : MonoBehaviour 
    {
        [MenuItem("HP-TCG Card Management/Add Outline Prefabs"), UsedImplicitly]
        public static void AddPhotonViews()
        {
            var assetFolderPaths = AssetDatabase.GetAllAssetPaths().Where(path => path.EndsWith(".prefab") && path.Contains("/Cards/"));

            string outlinePath = AssetDatabase.GetAllAssetPaths().FirstOrDefault(path => path.Contains("Outline.prefab"));

            var outlinePrefab = (GameObject) AssetDatabase.LoadAssetAtPath(outlinePath, typeof (GameObject));

            
            foreach (string path in assetFolderPaths)
            {
                var obj = (GameObject) AssetDatabase.LoadAssetAtPath(path, typeof(GameObject));
                //var outlineInstance = (GameObject) Instantiate(outlinePrefab, new Vector3(0f, 0f, 0.1f), Quaternion.Euler(90f, -180f, 0));

                outlinePrefab.transform.parent = obj.transform;

                AssetDatabase.SaveAssets();
            }
        }

        [MenuItem("HP-TCG Card Management/Remove Photon Views from Cards"), UsedImplicitly]
        public static void RemovePhotonViews()
        {
            var assetFolderPaths = AssetDatabase.GetAllAssetPaths().Where(path => path.EndsWith(".prefab") && path.Contains("/Cards/"));

            foreach (string path in assetFolderPaths)
            {
                var obj = (GameObject)AssetDatabase.LoadAssetAtPath(path, typeof(GameObject));
                var view = obj.GetComponent<PhotonView>();
                if (view)
                {
                    DestroyImmediate(obj.GetPhotonView(), true);
{'fraction_non_alphanumeric': 0.10543840177580466, 'fraction_numerical': 0.006104328523862375, 'mean_word_length': 2.558736426456071, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '216556', 'n_tokens_mistral': 998, 'n_tokens_neox': 927, 'n_words': 197}