From 88dad8c7bb129c1929727f49788f7a32a5eaef65 Mon Sep 17 00:00:00 2001 From: alexiscatnip Date: Mon, 11 Jul 2022 23:29:30 +0800 Subject: [PATCH] add null check for FollowMinimapItem behavior --- Assets/Raindrop/Map/FollowMinimapItem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/Raindrop/Map/FollowMinimapItem.cs b/Assets/Raindrop/Map/FollowMinimapItem.cs index c77fa6b..ba861bb 100644 --- a/Assets/Raindrop/Map/FollowMinimapItem.cs +++ b/Assets/Raindrop/Map/FollowMinimapItem.cs @@ -12,6 +12,9 @@ public class FollowMinimapItem : MonoBehaviour // Update is called once per frame void Update() { + if (target == null) + return; + this.transform.position = new Vector3( target.transform.position.x, target.transform.position.y,