unity indestructible

C#
DontDestroyOnLoad(this.gameObject);
Source

Also in C#: