<commit_before>package unihx.pvt.editor;
import unityengine.*;
import unityeditor.*;
import sys.FileSystem.*;
using StringTools;

@:meta(UnityEditor.InitializeOnLoad)
@:nativeGen @:keep class IconChange
{
	static function __init__()
	{
		var dir = 'Assets/Editor Default Resources/unihx';
		if (exists(dir))
		{
			for (file in readDirectory(dir)) if (file.endsWith('.png'))
			{

				var importer:TextureImporter = cast AssetImporter.GetAtPath('$dir/$file');
				importer.textureFormat = TextureImporterFormat.ARGB32;
				importer.alphaIsTransparency = true;
				importer.mipmapEnabled = true;
				importer.filterMode = FilterMode.Trilinear;
				AssetDatabase.ImportAsset('$dir/$file');
			}
		}
		unityeditor.EditorApplication.hierarchyWindowItemOnGUI += function(instanceId:Int, r:Rect) {
			var obj = DragAndDrop.objectReferences;
			if (obj == null || obj.Length == 0 || !r.Contains(Event.current.mousePosition))
			{
				return;
			}

			var _target = EditorUtility.InstanceIDToObject(instanceId);
			if (!Std.is(_target,GameObject))
			{
				return;<commit_msg>fix for null reference when loading for the first time<commit_after>package unihx.pvt.editor;
import unityengine.*;
import unityeditor.*;
import sys.FileSystem.*;
using StringTools;

@:meta(UnityEditor.InitializeOnLoad)
@:nativeGen @:keep class IconChange
{
	static function __init__()
	{
		var dir = 'Assets/Editor Default Resources/unihx';
		if (exists(dir))
		{
			for (file in readDirectory(dir)) if (file.endsWith('.png'))
			{
				function init()
				{
					var importer:TextureImporter = cast AssetImporter.GetAtPath('$dir/$file');
					importer.textureFormat = TextureImporterFormat.ARGB32;
					importer.alphaIsTransparency = true;
					importer.mipmapEnabled = true;
					importer.filterMode = FilterMode.Trilinear;
					AssetDatabase.ImportAsset('$dir/$file');
				}
				var importer:TextureImporter = cast AssetImporter.GetAtPath('$dir/$file');
				if (importer == null)
					unityeditor.EditorApplication.delayCall += function() init();
				else
					init();
			}
		}
		unityeditor.EditorApplication.hierarchyWindowItemOnGUI += function(instanceId:Int, r:Rect) {
			var obj = DragAndDrop.objectReferences;
			if (obj == null || obj.Length == 0 || !r.Contains(Event.current.mousePosition))
			{
				return;
			}

			var _target = EditorUtility.InstanceIDToObject(instanceId);
			if (!Std.is(_target,GameObject))
			{
				return;
{'fraction_non_alphanumeric': 0.12666112956810632, 'fraction_numerical': 0.0024916943521594683, 'mean_word_length': 4.282894736842105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '651135', 'n_tokens_mistral': 904, 'n_tokens_neox': 758, 'n_words': 148}