mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-03 16:13:25 +08:00
bump mod loader versions
This commit is contained in:
parent
fdefc3d567
commit
2f0876466c
Binary file not shown.
Binary file not shown.
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user