Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/BitStrap/Examples/ComponentExtensionsExample.cs
2026-02-21 16:45:37 +08:00

15 lines
331 B
C#

using UnityEngine;
namespace BitStrap.Examples
{
public class ComponentExtensionsExample : MonoBehaviour
{
[Button]
public void GetComponentInParentIncludingInactive()
{
base.transform.parent.gameObject.SetActive(false);
Debug.LogFormat("Found component '{0}'", this.GetComponentInParent<Rigidbody>(true));
}
}
}