This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class HTTP : MonoBehaviour { | |
private static HTTP instance; | |
// Singleton | |
private HTTP () {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SingletonGameObject<T> : MonoBehaviour where T : MonoBehaviour { | |
static T instance_; | |
public static T Instance { | |
get { | |
if (instance_ == null) { | |
instance_ = FindObjectOfType<T>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.IO; | |
public class ImageSlicer : MonoBehaviour { | |
[SerializeField] | |
Texture2D texture; | |
[SerializeField] | |
int horizontalSlices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for uGUI(from 4.6) | |
#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
public static partial class UIBehaviourExtensions | |
{ | |
public static void AddListener(this UIBehaviour uiBehaviour, EventTriggerType eventID, UnityAction<BaseEventData> callback) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-08-24T04:58:48.851Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unlit alpha-cutout shader. | |
// - no lighting | |
// - no lightmap support | |
// - no per-material color | |
Shader "Custom/Unlit/Transparent Cutout" { | |
Properties { | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 | |
} |