r2mods/ilspy_dump/ror2_csproj/RoR2/DestroyOnDestroy.cs

15 lines
244 B
C#

using UnityEngine;
namespace RoR2;
public class DestroyOnDestroy : MonoBehaviour
{
[Tooltip("The GameObject to destroy when this object is destroyed.")]
public GameObject target;
private void OnDestroy()
{
Object.Destroy(target);
}
}