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
| #!/bin/bash | |
| ################################################################################ | |
| # Author: Tejaskumar Tank | |
| #------------------------------------------------------------------------------- | |
| # This script will install Odoo on your Ubuntu server. It can install multiple Odoo instances | |
| # in one Ubuntu because of the different xmlrpc_ports | |
| #------------------------------------------------------------------------------- | |
| # Make a new file: | |
| # sudo nano odoo-install.sh | |
| # Place this content in it and then make the file executable: |
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; | |
| using UnityEditor; | |
| using UnityEngine.UI; | |
| using TMPro; | |
| #if (UNITY_EDITOR) | |
| public class TextToTextMeshPro : Editor | |
| { | |
| public class TextMeshProSettings | |
| { | |
| public bool Enabled; |
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; | |
| using System; | |
| /** | |
| * Source at https://gist.github.com/Fonserbc/d061905a48555e583edc | |
| * Made by @fonserbc | |
| * Inspired by Valve's PRNG in use in Dota 2 | |
| */ | |
| public class PseudoRandomBoolean { | |
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
| Setup: | |
| 1. Index buffer containing N quads (each 2 triangles), where N is the max amount of spheres. Repeating pattern of {0,1,2,1,3,2} + K*4. | |
| 2. No vertex buffer. | |
| Render N*2 triangles, where N is the number of spheres you have. | |
| Vertex shader: | |
| 1. Sphere index = N/4 (N = SV_VertexId) | |
| 2. Quad coord: Q = float2(N%2, (N%4)/2) * 2.0 - 1.0 | |
| 3. Transform sphere center -> pos |
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; | |
| /* | |
| * Created by C.J. Kimberlin (http://cjkimberlin.com) | |
| * | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2015 | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy |
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 class FGlowShader : FShader | |
| { | |
| private float _glowAmount; | |
| private Color _glowColor; | |
| public FGlowShader(float glowAmount,Color glowColor) : base("GlowShader", Shader.Find("Futile/Glow")) | |
| { | |
| _glowAmount = glowAmount; | |
| _glowColor = glowColor; | |
| needsApply = true; |
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( | |
| ()=> | |
| { |
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
| private static void ShareImageWithTextOnAndroid(string message, string imageFilePath) | |
| { | |
| AndroidJavaClass intentClass = new AndroidJavaClass("android.content.Intent"); | |
| AndroidJavaObject intentObject = new AndroidJavaObject("android.content.Intent"); | |
| intentObject.Call<AndroidJavaObject>("setAction", intentClass.GetStatic<string>("ACTION_SEND")); | |
| AndroidJavaClass uriClass = new AndroidJavaClass("android.net.Uri"); | |
| AndroidJavaObject uriObject = uriClass.CallStatic<AndroidJavaObject>("parse", "file://" + imageFilePath); | |
| intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_STREAM"), uriObject); | |
| intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), message); |