11 lines
196 B
C#
11 lines
196 B
C#
|
using UnityEngine;
|
||
|
|
||
|
public class KeepGameObject : MonoBehaviour
|
||
|
{
|
||
|
void Start()
|
||
|
{
|
||
|
// GameObject won't be deleted on scene switch
|
||
|
DontDestroyOnLoad(this.gameObject);
|
||
|
}
|
||
|
}
|