diff --git a/RenderMod.cs b/RenderMod.cs index 32c5a44..5d1087c 100644 --- a/RenderMod.cs +++ b/RenderMod.cs @@ -3,11 +3,9 @@ using System.Reflection; using ADOFAIRenderer; using ADOFAIRenderer.Component; using ADOFAIRenderer.Util; -using ADOFAIRenderer.Util.FFmpeg; using MelonLoader; using UnityEngine; using UnityEngine.EventSystems; -using UnityEngine.Rendering; using Object = UnityEngine.Object; [assembly: MelonInfo(typeof(RenderMod), "ADOFAI Renderer", "0.0.5-BETA", "ADOFAI Editor Forum")] @@ -26,7 +24,6 @@ namespace ADOFAIRenderer public static AssetBundle FontBundle = null!; // ReSharper disable once MemberCanBePrivate.Global public static AssetBundle SceneBundle = null!; - public static bool WatchGameLoaded; public static string[] ModScenes = {}; private static double _beforeTime; diff --git a/Component/DebugMonitorUI.cs b/UI/DebugMonitorUI.cs similarity index 100% rename from Component/DebugMonitorUI.cs rename to UI/DebugMonitorUI.cs diff --git a/Component/EscapeHandlerUI.cs b/UI/EscapeHandlerUI.cs similarity index 100% rename from Component/EscapeHandlerUI.cs rename to UI/EscapeHandlerUI.cs diff --git a/Util/FFmpeg/FFmpegProcess.cs b/Util/FFmpeg/FFmpegProcess.cs index 6472263..5424d45 100644 --- a/Util/FFmpeg/FFmpegProcess.cs +++ b/Util/FFmpeg/FFmpegProcess.cs @@ -58,14 +58,6 @@ namespace ADOFAIRenderer.Util.FFmpeg return array; } - /*public static byte[] RentRawBytes(NativeArray arr) where T : struct - { - var val = new NativeSlice(arr).SliceConvert(); - var array = ArrayPool.Shared.Rent(val.Length); - val.CopyTo(array); - return array; - }*/ - protected static byte[] ToRawBytes(NativeArray arr) where T : struct { var val = new NativeSlice(arr).SliceConvert(); diff --git a/Util/FFmpeg/VideoFFmpeg.cs b/Util/FFmpeg/VideoFFmpeg.cs index 3077835..c5ddb9d 100644 --- a/Util/FFmpeg/VideoFFmpeg.cs +++ b/Util/FFmpeg/VideoFFmpeg.cs @@ -1,6 +1,5 @@ using System.Diagnostics.CodeAnalysis; using System.IO; -using Unity.Collections; namespace ADOFAIRenderer.Util.FFmpeg { @@ -56,12 +55,6 @@ namespace ADOFAIRenderer.Util.FFmpeg VideoCodec = codec; } - public void SendData(NativeArray source) - { - var buffer = ToRawBytes(source); - SendDataFromBuffer(buffer); - } - public void Start(string path, float bitrate) { if (File.Exists(path)) diff --git a/Util/WaitForFrames.cs b/Util/WaitForFrames.cs deleted file mode 100644 index 06653b1..0000000 --- a/Util/WaitForFrames.cs +++ /dev/null @@ -1,16 +0,0 @@ -using UnityEngine; - -namespace ADOFAIRenderer.Util -{ - public class WaitForFrames : CustomYieldInstruction - { - private readonly int _targetFrameCount; - - public WaitForFrames(int numberOfFrames) - { - _targetFrameCount = Time.frameCount + numberOfFrames; - } - - public override bool keepWaiting => Time.frameCount < _targetFrameCount; - } -} \ No newline at end of file