Skip to content

Instantly share code, notes, and snippets.

@BehzadShahid319
BehzadShahid319 / MonoBehaviourSingleton.cs
Created July 19, 2024 11:07 — forked from mstevenson/MonoBehaviourSingleton.cs
Generic Singleton classes for Unity. Use MonoBehaviourSingletonPersistent for any singleton that must survive a level load.
using UnityEngine;
using System.Collections;
public class MonoBehaviourSingleton<T> : MonoBehaviour
where T : Component
{
private static T _instance;
public static T Instance {
get {
if (_instance == null) {
@BehzadShahid319
BehzadShahid319 / ExportPackage.cs
Created January 8, 2024 12:51 — forked from IJEMIN/ExportPackage.cs
Unity Export Package with Tag and Layers and Input Settings
// 단순 유니티 패키지 제작용 스크립트
using UnityEngine;
using System.Collections;
using UnityEditor;
public static class ExportPackage {