public override void OnGUI() { /*var monsters = GameObject.FindObjectsOfType<Transform>(); * * foreach(var monster in monsters) * { * if (monster.gameObject.name.Contains("_effect")) continue; * if (monster.gameObject.name.Contains("67")) continue; * if (!monster.gameObject.name.Contains("earth")) continue; * var screenPos = CameraManager.MainCameraCom.WorldToScreenPoint(monster.transform.position); * if (screenPos.z > 0) GUI.Label(new Rect(screenPos.x, Screen.height - screenPos.y, 50, 50), monster.gameObject.name); * }*/ foreach (var monster in NewPlayerManager.MonsterLst) { if (monster.centerPointTrans == null) { continue; } var screenPos = CameraManager.MainCameraCom.WorldToScreenPoint(monster.centerPointTrans.transform.position); if (screenPos.z > 0) { var dist = Vector3.Distance(HeroMoveManager.HeroObj.centerPointTrans.position, monster.centerPointTrans.position).ToString("0.0"); GUI.Label(new Rect(screenPos.x, Screen.height - screenPos.y, 800, 50), DataMgr.GetMonsterGalleryData(monster.Shape).Name + "(" + dist + "m)"); } } foreach (var monster in NewPlayerManager.PlayerDict) { var val = monster.Value; if (val.centerPointTrans == null) { continue; } if (!ShowObject(val)) { continue; } var screenPos = CameraManager.MainCameraCom.WorldToScreenPoint(val.centerPointTrans.transform.position); if (screenPos.z > 0) { var dist = Vector3.Distance(HeroMoveManager.HeroObj.centerPointTrans.position, val.centerPointTrans.position).ToString("0.0"); GUI.Label(new Rect(screenPos.x, Screen.height - screenPos.y, 800, 50), FightTypeToString(val) + "(" + dist + "m)"); //GUI.Label(new Rect(screenPos.x, Screen.height - screenPos.y, 800, 50), monster.Value.SID + " : " + monster.Value.Shape + " : " + monster.Value.FightType); } } }