16 lines
295 B
C#
16 lines
295 B
C#
![]() |
using UnityEngine;
|
|||
|
|
|||
|
namespace AlicizaX.Runtime
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 标记物体对象为不可销毁
|
|||
|
/// </summary>
|
|||
|
public sealed class ObjectDontDestroyOnLoad : MonoBehaviour
|
|||
|
{
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
DontDestroyOnLoad(this);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|