Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/LE_LevelEditor/Example/PlayerRigidbody.cs
2026-02-21 16:45:37 +08:00

21 lines
475 B
C#

using UnityEngine;
namespace LE_LevelEditor.Example
{
public class PlayerRigidbody : MonoBehaviour
{
private void Awake()
{
Collider component = GetComponent<Collider>();
Collider[] componentsInChildren = base.transform.root.GetComponentsInChildren<Collider>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
if (component != componentsInChildren[i])
{
Physics.IgnoreCollision(component, componentsInChildren[i]);
}
}
}
}
}