diff --git a/QSB/EchoesOfTheEye/DreamWorld/Messages/EnterDreamWorldMessage.cs b/QSB/EchoesOfTheEye/DreamWorld/Messages/EnterDreamWorldMessage.cs index 406b2ccd..f21ada43 100644 --- a/QSB/EchoesOfTheEye/DreamWorld/Messages/EnterDreamWorldMessage.cs +++ b/QSB/EchoesOfTheEye/DreamWorld/Messages/EnterDreamWorldMessage.cs @@ -35,7 +35,7 @@ internal class EnterDreamWorldMessage : QSBWorldObjectMessage(true) - .Select(x => x.gameObject.GetAddComponent()) - .ToArray(); + _renderers = GetComponentsInChildren(true); enabled = false; foreach (var renderer in _renderers) { - if (renderer is null) - { - DebugLog.ToConsole($"Error - A renderer found on {gameObject.name} is null!", OWML.Common.MessageType.Error); - continue; - } - foreach (var material in renderer.sharedMaterials) { - if (material is null) + if (material == null) { - DebugLog.ToConsole($"Error - A material on renderer {renderer.name} is null!", OWML.Common.MessageType.Error); - continue; - } - - if (material.shader is null) - { - DebugLog.ToConsole($"Error - The shader on material {material.name}, attached to renderer {renderer.name}, is null!", OWML.Common.MessageType.Error); continue; } @@ -71,7 +50,7 @@ public class DreamWorldSpawnAnimator : MonoBehaviour { _spawnEffectMaterial.SetVector("_BodyPosition", _bodyRoot.position); - _progression = Mathf.MoveTowards(_progression, 4, (4 * Time.deltaTime) / DREAMWORLD_SPAWN_TIME); + _progression = Mathf.MoveTowards(_progression, 4, 4 * Time.deltaTime / DREAMWORLD_SPAWN_TIME); if (OWMath.ApproxEquals(_progression, 4)) {