2025-05-22 09:15:34 +08:00
|
|
|
|
using Obfuz;
|
|
|
|
|
using Obfuz.EncryptionVM;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class Bootstrap : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
|
|
|
|
|
private static void SetUpStaticSecretKey()
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("SetUpStaticSecret begin");
|
|
|
|
|
EncryptionService<DefaultStaticEncryptionScope>.Encryptor = new GeneratedEncryptionVirtualMachine(Resources.Load<TextAsset>("Obfuz/defaultStaticSecretKey").bytes);
|
|
|
|
|
Debug.Log("SetUpStaticSecret end");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void SetUpDynamicSecret()
|
|
|
|
|
{
|
2025-05-22 10:11:02 +08:00
|
|
|
|
Debug.Log("SetUpDynamicSecret begin");
|
2025-05-22 09:15:34 +08:00
|
|
|
|
EncryptionService<DefaultDynamicEncryptionScope>.Encryptor = new GeneratedEncryptionVirtualMachine(Resources.Load<TextAsset>("Obfuz/defaultDynamicSecretKey").bytes);
|
2025-05-22 10:11:02 +08:00
|
|
|
|
Debug.Log("SetUpDynamicSecret end");
|
2025-05-22 09:15:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
2025-05-22 10:11:02 +08:00
|
|
|
|
// <20>ӳټ<D3B3><D9BC>أ<EFBFBD><D8A3><EFBFBD>ʹ<EFBFBD><CAB9>HotUpdate<74><65><EFBFBD><EFBFBD><F2BCAFB4><EFBFBD>ǰ<EFBFBD>ż<EFBFBD><C5BC>ض<EFBFBD>̬<EFBFBD><CCAC>Կ<EFBFBD><D4BF>
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ȸ<EFBFBD><C8B8>£<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɺ<C9BA><F3A3ACBC><EFBFBD>
|
|
|
|
|
// <20>ȸ<EFBFBD><C8B8>´<EFBFBD><C2B4><EFBFBD>ǰ<EFBFBD>ż<EFBFBD><C5BC>ض<EFBFBD>̬<EFBFBD><CCAC>Կ<EFBFBD><D4BF>
|
2025-05-22 09:15:34 +08:00
|
|
|
|
SetUpDynamicSecret();
|
2025-05-22 10:11:02 +08:00
|
|
|
|
this.gameObject.AddComponent<Entry>();
|
2025-05-22 09:15:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|