diff --git a/Runtime/LibProcessors/ProcessorDebug.cs b/Runtime/LibProcessors/ProcessorDebug.cs index 76755f86..16236fb2 100644 --- a/Runtime/LibProcessors/ProcessorDebug.cs +++ b/Runtime/LibProcessors/ProcessorDebug.cs @@ -35,16 +35,18 @@ public void HandleSignal(in SignalDebug arg) scaler.referenceResolution = new Vector2(12, 12); canvas.worldCamera = Camera.main; canvas.renderMode = RenderMode.ScreenSpaceCamera; - canvas.planeDistance = 60; + canvas.planeDistance = 30; + canvas.sortingOrder = 10; canvas.transform.SetParent(Camera.main.transform); rectTransform = go.GetComponent(); } rectTransform.gameObject.SetActive(true); - + for (int i = 0; i < Entity.Count; i++) { var tr = Entity.transforms[i]; + if (tr==null) continue; var t = Obj.Spawn(prefabEntityLabel, rectTransform.transform, tr.position, Quaternion.identity); t.text = $"Entity ID: {Entity.cache[i].id}"; Vector2 screenP = RectTransformUtility.WorldToScreenPoint(null, tr.position + new Vector3(0, 0.6f, 0));