Argon_Assault _ trigger message not generated

For a brief while this afternoon, my console was printing out the Debug.Log messages OnTriggerEnter. At some point it just stopped. Same with OnCollisionEnter. My playership is a rigidbody with box collider. All my enemies are currently static capsule colliders (with isTrigger turned on).

Please help. Cannot continue with the learning unless this is solved.

Here is the code I used:

void OnCollisionEnter(Collision other)

{

    Debug.Log(this.name + "--Collided with--" + other.gameObject.name);

}

void OnTriggerEnter(Collider other)

{

    Debug.Log("Hello Sam");

    Debug.Log($"{this.name} **Triggered by** {other.gameObject.name}");    

}

I got this error message on my console - does it have anything to do with it.
" [00:09:41] Invalid editor window of type: UnityEditor.FallbackWindow,title:Failed to Load UnityEditor.EditorApplicationLayout:FinalizePlaymodeLayout ()"

Hi Shriram,

This problem might be caused by an internal problem in Unity. Whenever you see an error message mentioning UnityEditor and something with Layout, please try the following: Go to Window > Layouts and select “Default”. If you created your own layout, remove that, select “Default”, rearrange the windows and save it again.

If the issue persists: In which course and lecture are you?


See also:

Hi Nina,
The Course is “Complete C# Unity Game Developer 3D”, Section 4 "Argonaut Assault’, video #88, Understanding Collisions and Triggers.

It is working now … I had kinematic turned on on my player ship and that was I believe what was stopping the detection of the collision and trigger entry. Does that make sense?

I also did go to default layout as you suggested but I think the above was the problem, dont you think?

Yes, that does make sense. See the description of “Is Kinematic” in the manual.

I also did go to default layout as you suggested but I think the above was the problem, dont you think?

I agree. If no collision happened because of “Is Kinematic”, it makes sense that the collision/trigger methods did not get called.

Nevertheless, error (“Invalid editor window of type”) might have caused this problem, or it might cause or have caused other problems. If you reset the layout and if the message did not reappear, consider this problem solved as well. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms