12345678910111213141516171819 |
- using UnityEngine;
- using System.Collections;
- public class LogTimeWhenDestroyed : MonoBehaviour
- {
- float startTime;
- void Awake()
- {
- startTime = Time.time;
- }
- void OnDestroy()
- {
- AVDebug.Log(name+" lived for "+(Time.time - startTime));
- }
- }
|