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
allprojects { | |
def mappings = [ | |
'android.support.annotation': 'androidx.annotation', | |
'android.arch.lifecycle': 'androidx.lifecycle', | |
'android.support.v4.app.NotificationCompat': 'androidx.core.app.NotificationCompat', | |
'android.support.v4.app.ActivityCompat': 'androidx.core.app.ActivityCompat', | |
'android.support.v4.content.ContextCompat': 'androidx.core.content.ContextCompat', | |
'android.support.v13.app.FragmentCompat': 'androidx.legacy.app.FragmentCompat', | |
'android.arch.lifecycle.Lifecycle': 'androidx.lifecycle.Lifecycle', | |
'android.arch.lifecycle.LifecycleObserver': 'androidx.lifecycle.LifecycleObserver', |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MyPluginIsBananas : MonoBehaviour | |
{ | |
const string ToastClassName = "android.widget.Toast"; | |
public void OnMyButtonClick() | |
{ |
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; | |
public static class UnityExtensionMethods | |
{ | |
#region go_utils | |
public static void Activate(this GameObject go) | |
{ | |
go.SetActive(true); | |
} |
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; | |
using UnityEditor; | |
public static class DumpEditorTextures | |
{ | |
const string AssetsFolder = "Assets"; | |
const string TexturesDestFolderNamePro = "TexturesPro"; | |
const string TexturesDestFolderNameNormal = "TexturesNormal"; | |
static readonly string TexturesDestPathPro = Path.Combine(AssetsFolder, TexturesDestFolderNamePro); |
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
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 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 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 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 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 | |
{ |