E
E
Enot8152019-05-14 19:22:20
C++ / C#
Enot815, 2019-05-14 19:22:20

How not to render the whole scene?

How to set the renderer to render only displayables and not the whole scene

public void OnCollisionStep2D(Collider col)
    {
        col.GetComponent<MeshRenderer>().enabled = true;
        col.GetComponentInChildren<MeshRenderer>().enabled = true;
        Debug.Log("На сцене ");


    }

  public  void OnCollisionExit2D(Collider col)
    {
        col.GetComponent<MeshRenderer>().enabled = false;
        col.GetComponentInChildren<MeshRenderer>().enabled = false;
        Debug.Log("Вышел");
    }

I gave the collider to the scene (Maybe it's not legal) And tried to solve the problem this way Didn't help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2019-05-14
@Enot815

Read - https://docs.unity3d.com/ru/530/Manual/OcclusionCu...
Colliders have nothing to do with it at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question