Skip to content

Instantly share code, notes, and snippets.

@hackertron
Created June 29, 2021 14:20
Show Gist options
  • Save hackertron/7a9417691a786cf298f0171ed721f178 to your computer and use it in GitHub Desktop.
Save hackertron/7a9417691a786cf298f0171ed721f178 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Datahandler : MonoBehaviour
{
public GameObject furniture;
private static Datahandler instance;
public static Datahandler Instance
{
get
{
if(instance == null)
{
instance = FindObjectOfType<Datahandler>();
}
return instance;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment