Skip to content

+EA 23.315 Nightly - Plugin.BaseCore โ€‹

June 10, 2026

4 files modified.

Important Changes โ€‹

None.

ClassCache โ€‹

public Func<T> CreateDelegate(Type type)

cs

	public T Create<T2>(string id, string assembly)
	{
		id = id.Trim(); 
		Func<T> func = dict.TryGetValue(id);
		if (func != null)
		{

public class ClassCache

cs

	public static List<Func<string, Type>> typeLoaders = new List<Func<string, Type>> { LoadTypeFromGlobalNamespace };

	public static HashSet<Type> modTypes = new HashSet<Type>(); 
	public static T Create<T>(string id, string assembly = "Assembly-CSharp")
	{
		return (T)caches.Create<T>(id, assembly);

ClassExtension โ€‹

public static string Repeat(this string str, int count)

cs

	public static string StripBrackets(this string str)
	{
		return str.Replace("\"", "").Replace("ใ€Œ", "").Replace("ใ€", "") 
			.Replace("โ€œ", "") 
			.Replace("\"", ""); 
		HashSet<char> brackets = new HashSet<char> { '"', 'ใ€Œ', 'ใ€', 'โ€œ', 'โ€' }; 
		return string.Concat(str.Where((char c) => !brackets.Contains(c))); 
	}

	public static string TryAddExtension(this string s, string ext)

DynamicAsset โ€‹

[Serializable]

cs
[Serializable]
public class DynamicAsset<T> where T : MonoBehaviour
{
	[NonSerialized] 
	public static List<Func<string, T>> assetLoaders = new List<Func<string, T>> { Resources.Load<T> }; 
	public string groupId = "";

	public List<T> list = new List<T>();

public T GetOriginal(string id)

cs
	{
		return value;
	}
	value = Resources.Load<T>(groupId + "/" + id); 
	string arg = groupId + "/" + id; 
	for (int i = 0; i < assetLoaders.Count; i++) 
	{ 
		try
		{ 
			value = assetLoaders[i](arg); 
			if ((bool)value) 
			{ 
				break; 
			} 
		} 
		catch
		{ 
		} 
	} 
	map[id] = value;
	list.Add(value);
	return value;

IO โ€‹

using System;

cs
using System;
using System.IO;
using System.Security; 
using System.Security.Permissions;
using LZ4;
using Newtonsoft.Json;

public static void CopyAll(string fromPath, string toPath, bool overwrite = true

cs

	public static void DeleteFile(string path)
	{
		if (File.Exists(path)) 
		if (!File.Exists(path)) 
		{ 
			return; 
		} 
		try
		{
			File.Delete(path);
		}
		catch (Exception message) 
		{ 
			Debug.LogError(message); 
		} 
	}

	public static void DeleteFiles(string path)

public static void CreateDirectory(string path)

cs
	public static void DeleteDirectory(string path)
	{
		path = path.Replace("\\\\?\\", "");
		if (Directory.Exists(path)) 
		if (!Directory.Exists(path)) 
		{
			DirectoryInfo directoryInfo = new DirectoryInfo(path); 
			try
			{ 
				new FileIOPermission(FileIOPermissionAccess.AllAccess, path).Demand(); 
			} 
			catch (SecurityException ex) 
			{ 
				Debug.Log(ex.ToString()); 
			} 
			return; 
		} 
		DirectoryInfo directoryInfo = new DirectoryInfo(path); 
		try
		{ 
			new FileIOPermission(FileIOPermissionAccess.AllAccess, path).Demand(); 
			if (directoryInfo.Exists)
			{
				directoryInfo.Delete(recursive: true);
			}
		}
		catch (Exception message) 
		{ 
			Debug.Log(message); 
		} 
	}

	public static T Duplicate<T>(T t)