diff --git a/Runtime/DifferentialHybridAssemblyOptions.cs b/Runtime/DifferentialHybridAssemblyOptions.cs deleted file mode 100644 index ab76468..0000000 --- a/Runtime/DifferentialHybridAssemblyOptions.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using UnityEngine; - -namespace HybridCLR.Runtime -{ - public class DifferentialHybridAssemblyOptions - { - public const uint Signature = 0xABCDABCD; - - public List notChangeMethodTokens; - - - public byte[] Marshal() - { - var stream = new MemoryStream(); - var writer = new BinaryWriter(stream); - writer.Write(Signature); - writer.Write((uint)notChangeMethodTokens.Count); - foreach (uint token in notChangeMethodTokens) - { - writer.Write(token); - } - writer.Flush(); - stream.Flush(); - byte[] result = new byte[stream.Length]; - stream.Position = 0; - stream.Read(result, 0, result.Length); - Debug.Log($"HotPatchAssemblyConfig. options bytes:{result.Length}"); - return result; - } - } -} diff --git a/Runtime/DifferentialHybridAssemblyOptions.cs.meta b/Runtime/DifferentialHybridAssemblyOptions.cs.meta deleted file mode 100644 index d68dd5f..0000000 --- a/Runtime/DifferentialHybridAssemblyOptions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3394055921ccce643b09466544ea3634 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Runtime/RuntimeApi.cs b/Runtime/RuntimeApi.cs index c87af14..bffc117 100644 --- a/Runtime/RuntimeApi.cs +++ b/Runtime/RuntimeApi.cs @@ -46,56 +46,6 @@ namespace HybridCLR public static extern unsafe int LoadMetadataForAOTAssembly(byte* dllBytes, int dllSize, int mode); - //[DllImport(dllName, EntryPoint = "RuntimeApi_UseDifferentialHybridAOTAssembly")] - //public static unsafe LoadImageErrorCode UseDifferentialHybridAOTAssembly(string assemblyName) - //{ - // byte[] nameBytes = System.Text.Encoding.UTF8.GetBytes(assemblyName); - // fixed(byte* namePtr = nameBytes) - // { - - // } - //} - - /// - /// 指示混合执行assembly使用原始的AOT代码。当assembly没有发生变化时必须调用此接口。 - /// - /// - /// -#if UNITY_EDITOR - public static LoadImageErrorCode UseDifferentialHybridAOTAssembly(string assemblyName) - { - return LoadImageErrorCode.OK; - } -#else - [DllImport(dllName, EntryPoint = "RuntimeApi_UseDifferentialHybridAOTAssembly")] - public static extern LoadImageErrorCode UseDifferentialHybridAOTAssembly(string assemblyName); -#endif - - - /// - /// 加载差分混合执行 assembly - /// - /// - /// - /// - public static unsafe LoadImageErrorCode LoadDifferentialHybridAssembly(byte[] dllBytes, byte[] optionBytes) - { -#if UNITY_EDITOR - return LoadImageErrorCode.OK; -#else - fixed(byte* dllBytesPtr = dllBytes) - { - fixed(byte* optionBytesPtr = optionBytes) - { - return (LoadImageErrorCode)LoadDifferentialHybridAssembly(dllBytesPtr, dllBytes.Length, optionBytesPtr, optionBytes.Length); - } - } -#endif - } - - [DllImport(dllName, EntryPoint = "RuntimeApi_LoadDifferentialHybridAssembly")] - public static extern unsafe int LoadDifferentialHybridAssembly(byte* dllBytes, int dllSize, byte* optionBytesPtr, int optionBytesLength); - /// /// 获取解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小) /// diff --git a/Runtime/UnchangedAttribute.cs b/Runtime/UnchangedAttribute.cs deleted file mode 100644 index 9337168..0000000 --- a/Runtime/UnchangedAttribute.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HybridCLR.Runtime -{ - [AttributeUsage(AttributeTargets.Method | AttributeTargets.Struct)] - public class UnchangedAttribute : Attribute - { - public bool Unchanged { get; } - - public UnchangedAttribute(bool unchanged = true) - { - Unchanged = unchanged; - } - } -} diff --git a/Runtime/UnchangedAttribute.cs.meta b/Runtime/UnchangedAttribute.cs.meta deleted file mode 100644 index 59c7de1..0000000 --- a/Runtime/UnchangedAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 704603a2a0551f247a30e331ca476870 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package.json b/package.json index 8ae6690..bab2e6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.focus-creative-games.hybridclr_unity", - "version": "1.1.5", + "version": "1.1.6", "displayName": "HybridCLR", "description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR", "category": "Runtime",