Did simple ESP, but this code eat a lot of FPS and radius of detection more only ~30% than default. May be anyone can optimize the code, or shares better solution
Code:
if (esp)
{
PlayerCharacterView[] pp = (PlayerCharacterView[])UnityEngine.Object.FindObjectsOfTypeAll(typeof(PlayerCharacterView));
LocalPlayerCharacterView localPlayer = (LocalPlayerCharacterView)UnityEngine.Object.FindObjectOfType<LocalPlayerCharacterView>();
text = pp.Length.ToString();
for (int index = 0; index < pp.Length; index++)
{
text += pp[index].transform.position + "\n";
LineRenderer line = pp[index].gameObject.GetComponent<LineRenderer>();
if (line == null)
{
line = pp[index].gameObject.AddComponent<LineRenderer>();
line.SetWidth(0.05F, 0.05F);
line.SetVertexCount(2);
}
line.SetPosition(0, localPlayer .transform.position);
line.SetPosition(1, pp[index].transform.position);
}
}