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
[InitializeOnLoad] | |
public static class AutoImportRequiredPackages | |
{ | |
static readonly List<string> requiredPackageList = new List<string>() | |
{ | |
"[email protected]", | |
"[email protected]", | |
"[email protected]" | |
}; |
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
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge eol=lf | |
*.anim filter=lfs diff=lfs merge=lfs -text | |
*.unity merge=unityyamlmerge eol=lf | |
*.physicsMaterial2D merge=unityyamlmerge eol=lf | |
*.physicsMaterial merge=unityyamlmerge eol=lf | |
*.asset merge=unityyamlmerge eol=lf |
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 UnityEngine; | |
public static class TransformExtension | |
{ | |
public static Transform FirstChildOrDefault(this Transform parent, Func<Transform, bool> query) | |
{ | |
Transform result = null; | |
if (query(parent)) |
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 UniRx.Async; | |
using SimpleJSON; | |
using UnityEngine.Networking; | |
public enum Currency | |
{ | |
BGN, NZD, ILS, RUB, CAD, USD, PHP, CHF, AUD, JPY, TRY, HKD, MYR, HRK, CZK, IDR, DKK, | |
NOK, HUF, GBP, MXN, THB, ISK, ZAR, BRL, SGD, PLN, INR, KRW, RON, CNY, SEK, EUR | |
} |
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.Collections.Generic; | |
using UnityEngine; | |
using System.IO; | |
using UnityEngine.Networking; | |
using UniRx.Async; | |
public class FileWatcher : MonoBehaviour | |
{ | |
static readonly string watchFolderPath = Application.streamingAssetsPath; |
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/DissappearablePositiveX" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
_DissolvePosition("Dissolve Position", Range(0, 1000)) = 0 | |
} |
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
// | |
// Transparent unlit shader for Spray | |
// | |
// Vertex format: | |
// position.xyz = vertex position | |
// texcoord.xy = uv for GPGPU buffers | |
// | |
// Position buffer format: | |
// .xyz = particle position | |
// .w = life (+0.5 -> -0.5) |
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/SimpleUnlit" { | |
Properties{ | |
_Aspect("Aspect Ratio", Float) = 1.66 | |
} | |
SubShader{ | |
LOD 200 | |
CGINCLUDE |
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
#pragma once | |
#include <string> | |
#include <GLFW\glfw3.h> | |
#include <FreeImage\FreeImage.h> | |
using namespace std; | |
class FrameCapturer { | |
private: |
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
void centering(GLFWwindow* window) { | |
// Get screen resolution | |
const GLFWvidmode * mode = glfwGetVideoMode(glfwGetPrimaryMonitor()); | |
int screen_width = mode->width, screen_height = mode->height; | |
int halfx = screen_width / 2, halfy = screen_height / 2; | |
int hw = WIN_SIZE_X / 2, hh = WIN_SIZE_Y / 2; | |
int posx = halfx - hw, posy = halfy - hh; |
NewerOlder