Skip to content

Instantly share code, notes, and snippets.

@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active November 7, 2024 04:51
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@JackDraak
JackDraak / FishDrone.cs
Last active February 16, 2022 17:41
Unity2018 - scripting autonomous fish drones: avoiding obstacles using raycast
/// FishDrone by JackDraak
/// July 2018
/// 'changelog' viewable on GitHub.
///
using UnityEngine;
public class FishDrone : MonoBehaviour
{
private Animator animator;
private float changeDelay, changeTime;
@jzayed
jzayed / GlowLevels.shader
Created May 11, 2018 10:51
Glow Levels Shader
Shader "Sprites/GlowLevels"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_AlphaIntensity_Fade_1("_AlphaIntensity_Fade_1", Range(0, 3)) = 1
_TintRGBA_Color_1("_TintRGBA_Color_1", COLOR) = (1,1,1,1)
_AlphaIntensity_Fade_2("_AlphaIntensity_Fade_2", Range(0, 3)) = 1
_TintRGBA_Color_2("_TintRGBA_Color_2", COLOR) = (1,1,1,1)
@PixelScream
PixelScream / GravityWarp.shader
Created March 28, 2018 21:24
Gravity Warp Shader
Shader "Unlit/GravityWarp"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags {
"RenderType"="Opaque"
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@ditzel
ditzel / CameraBillboard.cs
Created February 11, 2018 13:53
Rotates an object (e.g. a canvas) to face it towards the camera
/*
* Rotates an object towards the currently active camera
*
* 1. Attach CameraBillboard component to a canvas or a game object
* 2. Specify the offset and you're done
*
**/
using UnityEngine;
@hasanbayatme
hasanbayatme / ColorPickerWindow.cs
Last active October 24, 2018 10:32
A Color Picker Window for Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class ColorPickerWindow : EditorWindow
{
protected Color color = Color.white;
protected Color32 color32 = new Color32 ( 255, 255, 255, 255 );
@n-taku
n-taku / CurvedText.cs
Last active June 2, 2023 10:56
TextMeshProでAnimationのカーブに沿って文字を並べる
using UnityEngine;
using TMPro;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
#endif
[ExecuteInEditMode]
public class CurvedText : MonoBehaviour
@M1chaelTran
M1chaelTran / WebStorm.cmd
Created August 17, 2017 11:04
Add `Open with WebStorm` to Windows right click context menu
@echo off
:: change the path below to match your installed version
SET WebStormPath=C:\Program Files\JetBrains\WebStorm 2017.2.2\bin\webstorm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%1\"" /f
@michidk
michidk / multiclone.bat
Created October 4, 2016 14:45
Clone multiple repos (listed in text file) at once
@echo off
for /F "tokens=*" %%i in (repos.txt) do call :DOSTUFF %%i
pause > nul
:DOSTUFF
echo "Cloning %~1"
git clone https://[email protected]/brokenvector/%~1.git