Why am I getting 30 callbacks from an empty GameObject in my scene in Unity3D?

First of all, I'm talking about SetPass calls, which, as I understand it, are callbacks.

I have an empty GameObject, which I use as a camera target in my game. I placed him above my character, and when he reached height x, the camera moves up.

When the camera target is on, I get about 60 SetPass calls. When I turn it off, I get about 30.

Why does this simple object make so many SetPass calls?

Here's a screenshot with an empty GameObject enabled:

enter image description here

Here's a screen shot without a GameObject enabled:

enter image description here

Here is an empty GameObject:

enter image description here

Here I refer to an empty GameObject (cameraTarget):

void FixedUpdate () {

if (cameraTarget != null){
    if (cameraTarget.transform.position.y > thisTransform.position.y) {
        thisTransform.position = new Vector3 (0, Mathf.SmoothDamp (thisTransform.position.y, cameraTarget.transform.position.y, ref velocity.y, smoothTime), 0); 
    }
}

}

GameObject , , GameObject, , SetPass... .

:

, GameObject, :

enter image description here

:

"Gizmos" , . , .

+4

All Articles