mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-10 14:03:30 +08:00
33
src_2018/ILBehaviour.cs
Normal file
33
src_2018/ILBehaviour.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using MelonLoader;
|
||||
using UnhollowerRuntimeLib;
|
||||
|
||||
namespace Explorer
|
||||
{
|
||||
//public class ILBehaviour : MonoBehaviour
|
||||
//{
|
||||
// public ILBehaviour(IntPtr intPtr) : base(intPtr) { }
|
||||
|
||||
// public static T AddToGameObject<T>(GameObject _go) where T : ILBehaviour
|
||||
// {
|
||||
// Il2CppSystem.Type ilType = UnhollowerRuntimeLib.Il2CppType.Of<T>();
|
||||
|
||||
// if (ilType == null)
|
||||
// {
|
||||
// MelonLogger.Log("Error - could not get MB as ilType");
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// var obj = typeof(T)
|
||||
// .GetConstructor(new Type[] { typeof(IntPtr) })
|
||||
// .Invoke(new object[] { _go.AddComponent(UnhollowerRuntimeLib.Il2CppType.Of<T>()).Pointer });
|
||||
|
||||
// return (T)obj;
|
||||
// }
|
||||
//}
|
||||
}
|
Reference in New Issue
Block a user