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 texture shader which casts shadow on Forward/Defered | |
Shader "Unlit/Texture CastShadow" { | |
Properties { | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags {"Queue"="Opaque" } | |
LOD 100 |
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; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Mono singleton Class. Extend this class to make singleton component. | |
/// Example: | |
/// <code> | |
/// public class Foo : MonoSingleton<Foo> | |
/// </code>. To get the instance of Foo class, use <code>Foo.instance</code> |
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.Text; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class LSystemGenerator : MonoBehaviour | |
{ | |
[Serializable] |
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
public static void ShowToast(string text) | |
{ | |
if (Application.platform == RuntimePlatform.Android) | |
{ | |
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); | |
activity.Call("runOnUiThread", new AndroidJavaRunnable( | |
()=> | |
{ |
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; | |
/* | |
* Swipe Input script for Unity by @fonserbc, free to use wherever | |
* | |
* Attack to a gameObject, check the static booleans to check if a swipe has been detected this frame | |
* Eg: if (SwipeInput.swipedRight) ... | |
* | |
* | |
*/ |
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 System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
public class PoolPreparer : MonoBehaviour | |
{ | |
[SerializeField] | |
PooledMonobehaviour[] prefabs; |
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 System.IO; | |
using System.Linq; | |
using System.Globalization; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
using System; |
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 System.Collections.Generic; | |
public class PlayerPrefsTools | |
{ | |
public static void GetAllPlayerPrefKeys(ref List<string> keys) | |
{ | |
if (keys != null) | |
{ | |
keys.Clear(); | |
} |
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
public class SpreadSheetConnector { | |
private string[] _scopes = { SheetsService.Scope.Spreadsheets }; // Change this if you're accessing Drive or Docs | |
private string _applicationName = "My Application Name from Google API Project "; | |
private string _spreadsheetId = "xdMsqBc3wblahblahblahblahkeygoeshere"; | |
private SheetsService _sheetsService; | |
private void ConnectToGoogle() { | |
GoogleCredential credential; |
OlderNewer