This file contains hidden or 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
Shader "Custom/Flow Map" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
// Flow | |
_FlowMap ("Flow Map", 2D) = "white" {} | |
_FlowSpeed ("Flow Speed", float) = 0.05 |
This file contains hidden or 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; | |
public static class CameraExtensions { | |
public static void LayerCullingShow(this Camera cam, int layerMask) { | |
cam.cullingMask |= layerMask; | |
} | |
public static void LayerCullingShow(this Camera cam, string layer) { | |
LayerCullingShow(cam, 1 << LayerMask.NameToLayer(layer)); |
This file contains hidden or 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
# : << 'EOF' | |
# https://github.com/gpakosz/.tmux | |
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, | |
# without any warranty. | |
# Copyright 2012— Gregory Pakosz (@gpakosz). | |
# | |
# ------------------------------------------------------------------------------ | |
# /!\ DO NOT EDIT THIS FILE | |
# instead, override your .local customization file copy, see README.md /!\ | |
# ------------------------------------------------------------------------------ |
This file contains hidden or 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; | |
public static class AndroidIdRetriever | |
{ | |
public static string Retrieve() | |
{ | |
AndroidJavaClass clsUnity = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
AndroidJavaObject objActivity = clsUnity.GetStatic<AndroidJavaObject>("currentActivity"); | |
AndroidJavaObject objResolver = objActivity.Call<AndroidJavaObject>("getContentResolver"); | |
AndroidJavaClass clsSecure = new AndroidJavaClass("android.provider.Settings$Secure"); |
This file contains hidden or 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; | |
public class AlarmClock : MonoBehaviour | |
{ | |
const string ACTION_SET_ALARM = "android.intent.action.SET_ALARM"; | |
const string EXTRA_HOUR = "android.intent.extra.alarm.HOUR"; | |
const string EXTRA_MINUTES = "android.intent.extra.alarm.MINUTES"; | |
const string EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE"; | |
public void OnClick() |
This file contains hidden or 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; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Xml.Serialization; | |
using UnityEngine; | |
namespace Com.Nravo.FlipTheBoard.PersistantStorage | |
{ |
This file contains hidden or 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
#if UNITY_ANDROID | |
using UnityEngine; | |
using System; | |
public static class AndroidNativePicker | |
{ | |
public delegate void OnDatePicked(int year,int month,int day); | |
public delegate void OnTimePicked(int hourOfDay, int minute); | |
public static void ShowDatePicker(OnDatePicked callback) |
This file contains hidden or 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; | |
/// <summary> | |
/// PlayerPrefs wrapper to provide saving boolean values. | |
/// </summary> | |
public static class CustomPlayerPrefs | |
{ | |
private const int StorageFalse = 0; | |
private const int StorageTrue = 1; |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using BetterDefines.Editor.Entity; | |
using UnityEditor; | |
namespace BetterDefines.Editor | |
{ | |
public static class BetterDefinesUtils | |
{ |
This file contains hidden or 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( | |
()=> | |
{ |
NewerOlder