First Commit

This commit is contained in:
nzagoruiko committed 2026-12-01 17:00:28 +03:00
1 parent 080f5fce79
commit 4c54d2f4b9
614 files changed
+53607 -19641

No files matched your search

@@ -0,0 +1,29 @@
namespace UnityEngine.XR.Interaction.Toolkit.Samples.StarterAssets
{
/// <summary>
/// Destroys the GameObject it is attached to after a specified amount of time.
/// </summary>
public class DestroySelf : MonoBehaviour
{
[SerializeField]
[Tooltip("The amount of time, in seconds, to wait after Start before destroying the GameObject.")]
float m_Lifetime = 0.25f;
/// <summary>
/// The amount of time, in seconds, to wait after Start before destroying the GameObject.
/// </summary>
public float lifetime
{
get => m_Lifetime;
set => m_Lifetime = value;
}
/// <summary>
/// See <see cref="MonoBehaviour"/>.
/// </summary>
void Start()
{
Destroy(gameObject, m_Lifetime);
}
}
}