mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-03 12:02:28 +08:00
REPL console
This commit is contained in:
34
src/MainMenu/Pages/Console/REPLHelper.cs
Normal file
34
src/MainMenu/Pages/Console/REPLHelper.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
//using Il2CppSystem;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Explorer
|
||||
{
|
||||
public class ReplHelper : MonoBehaviour
|
||||
{
|
||||
public ReplHelper(IntPtr intPtr) : base(intPtr) { }
|
||||
|
||||
public T Find<T>() where T : Object
|
||||
{
|
||||
return FindObjectOfType<T>();
|
||||
}
|
||||
|
||||
public T[] FindAll<T>() where T : Object
|
||||
{
|
||||
return FindObjectsOfType<T>();
|
||||
}
|
||||
|
||||
public object RunCoroutine(IEnumerator enumerator)
|
||||
{
|
||||
return MelonCoroutines.Start(enumerator);
|
||||
}
|
||||
|
||||
public void EndCoroutine(Coroutine c)
|
||||
{
|
||||
StopCoroutine(c);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user