Target Object

Open World - Scripts - Target Object

How to find out if an object is being rendered int unity3D with C#

To find if an object is being rendered simpley get the Renderer Component and check isVisible

public bool IsVisible => r.isVisible;

TargetObject.cs 225B

using UnityEngine;

public class TargetObject : MonoBehaviour
    public bool IsVisible => r.isVisible;
    public float Distance(Vector3 disTo) => transform.DistanceTo(disTo);

    [SerializeField] Renderer r;
Powered by w3.css