SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
Add PostRenderHook
This commit is contained in:
1 parent
47a570a3d6
commit
c8e6814efa
3 files changed
+25
-2
No files matched your search
@@ -0,0 +1,13 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace ADOFAIRenderer.Component
|
||||||
|
{
|
||||||
|
[DefaultExecutionOrder(int.MaxValue)]
|
||||||
|
public class PostRenderHook : MonoBehaviour
|
||||||
|
{
|
||||||
|
private void OnPostRender()
|
||||||
|
{
|
||||||
|
RenderMod.OnPostRender();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.IO;
|
||||||
|
using MelonLoader.Utils;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ADOFAIRenderer.Component
|
namespace ADOFAIRenderer.Component
|
||||||
@@ -59,6 +61,9 @@ namespace ADOFAIRenderer.Component
|
|||||||
scrCamera.instance.forceRTCam = true;
|
scrCamera.instance.forceRTCam = true;
|
||||||
scrCamera.instance.SetupRTCam(true);
|
scrCamera.instance.SetupRTCam(true);
|
||||||
|
|
||||||
|
if (!scrCamera.instance.gameObject.GetComponent<PostRenderHook>())
|
||||||
|
scrCamera.instance.gameObject.AddComponent<PostRenderHook>();
|
||||||
|
|
||||||
_originalInputOffset = scrConductor.currentPreset.inputOffset;
|
_originalInputOffset = scrConductor.currentPreset.inputOffset;
|
||||||
scrConductor.currentPreset.inputOffset = 0;
|
scrConductor.currentPreset.inputOffset = 0;
|
||||||
RDC.auto = true;
|
RDC.auto = true;
|
||||||
|
|||||||
+7
-2
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using ADOFAIRenderer;
|
using ADOFAIRenderer;
|
||||||
using ADOFAIRenderer.Component;
|
using ADOFAIRenderer.Component;
|
||||||
@@ -34,7 +34,7 @@ namespace ADOFAIRenderer
|
|||||||
Object.DontDestroyOnLoad( updateHookerObj );
|
Object.DontDestroyOnLoad( updateHookerObj );
|
||||||
|
|
||||||
renderManagerObj.AddComponent<RenderManager>();
|
renderManagerObj.AddComponent<RenderManager>();
|
||||||
updateHookerObj.AddComponent<FirstUpdate>();
|
updateHookerObj.AddComponent<FirstUpdateHook>();
|
||||||
LoadBundles();
|
LoadBundles();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,6 +70,11 @@ namespace ADOFAIRenderer
|
|||||||
Time.timeScale = (float)(Time.deltaTime / realDeltaTime);
|
Time.timeScale = (float)(Time.deltaTime / realDeltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void OnPostRender()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static void StartRender()
|
public static void StartRender()
|
||||||
{
|
{
|
||||||
var targetMethod = typeof(scnEditor).GetMethod("TryApplicationQuit",
|
var targetMethod = typeof(scnEditor).GetMethod("TryApplicationQuit",
|
||||||
|
|||||||
Reference in new issue
Block a user