mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 18:08:05 +08:00
bump mod loader versions
This commit is contained in:
1 parent
fdefc3d567
commit
2f0876466c
4 files changed
+2
-3
No files matched your search
@@ -1,5 +1,4 @@
|
||||
#if MONO
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityExplorer.Runtime
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace UnityExplorer.Runtime
|
||||
|
||||
// In Unity 2020 they introduced "Canvas.renderingDisplaySize".
|
||||
// If you try to get the value on a Canvas which has a renderMode value of WorldSpace and no worldCamera set,
|
||||
// the game will Crash when Unity tries to read from a null ptr (I think).
|
||||
// the game will Crash (I think from Unity trying to read from null ptr).
|
||||
[HarmonyPatch(typeof(Canvas), "renderingDisplaySize", MethodType.Getter)]
|
||||
[HarmonyPrefix]
|
||||
internal static void Prefix(Canvas __instance)
|
||||
internal static void Prefix_Canvas_renderingDisplaySize(Canvas __instance)
|
||||
{
|
||||
if (__instance.renderMode == RenderMode.WorldSpace && !__instance.worldCamera)
|
||||
throw new InvalidOperationException(
|
||||
|
||||
Reference in new issue
Block a user