Skip to content

Instantly share code, notes, and snippets.

View terrehbyte's full-sized avatar
Keqing Story Quest When?

Terry Nguyen terrehbyte

Keqing Story Quest When?
View GitHub Profile

p.netshowcorrections 1

shows you server-client corrections in position

@terrehbyte
terrehbyte / UnityCollab.md
Last active May 9, 2016 23:34
A rough guide on how2unity4tems.

Unity Collaboration Guidelines

So you want to make a game in Unity with more than one person (meaning, not you!). Here's a quick list of things that you'll want to look out for. You can read the description below them for any relevant steps or information.

1. Unity Versions

As Unity introduces new features and API changes, the stability of your codebase

@jackcarter
jackcarter / slack_delete.py
Last active September 7, 2025 07:08
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@eyecatchup
eyecatchup / material-design-breakpoints.css
Last active December 4, 2020 20:08
CSS media queries based on the breakpoint guidance published by the Material Design team. http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoint
/* Material Design Adaptive Breakpoints */
/*
Below you'll find CSS media queries based on the breakpoint guidance
published by the Material Design team. You can choose to use, customise
or remove these breakpoints based on your needs.
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints
*/
/* mobile-small */
@nemotoo
nemotoo / .gitattributes
Last active December 2, 2025 14:40
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@nothings
nothings / kotaku_hzd.md
Last active September 4, 2024 06:33
Why Frustum Culling Matters, and Why It's Not Important

There is a nice GIF illustrating a technique called "frustum culling" in this Kotaku article: http://kotaku.com/horizon-zero-dawn-uses-all-sorts-of-clever-tricks-to-lo-1794385026

The interwebs being what they are, this has also led to some controversy.

Some people have interpreted the opening sentence "Every time you move the camera in Horizon Zero Dawn, the game is doing all sorts of under-the-hood calculations, loading and unloading chunks of world to ensure that it all runs properly," as being about the GIF; that's not what frustum culling does, but that's probably not what the article's author meant anyway.

@nicolasdao
nicolasdao / open_source_licenses.md
Last active November 27, 2025 22:24
What you need to know to choose an open source license.
@aras-p
aras-p / rebuild_postmortem.md
Last active July 20, 2017 05:20
2017 end of June "rebuilds too much" regression postmortem

Basically throughout 2017 June, Unity trunk had a problem where all C++ source files would be recompiled if you just did an Editor build followed by Standalone build, and were doing an Editor build again. Most of the build team was away (vacations/conferences), so it wasn't fixed ASAP :(

This is the fix: <url_removed>

I have spent close to three days tracking in down; in retrospect should have found it way sooner. Not quite sure why I didn’t :(

Summary of the issue

@QuantumCalzone
QuantumCalzone / LayoutElementExtended.cs
Last active April 1, 2021 23:08
An extension of Unity's LayoutElement script that enable more flexible adaptation such as matching another RecTransform's dimensions or setting maximum preferred values. Put the Inspector and Property Drawer scripts in an Editor folder. Also available as a package at https://github.com/QuantumCalzone/UnityLayoutElementExtended
using UnityEngine;
using UnityEngine.UI;
namespace QuantumCalzone
{
[AddComponentMenu("Layout/Extended/Layout Element Extended")]
[RequireComponent(typeof(RectTransform))]
public class LayoutElementExtended : LayoutElement
{
public LayoutElementExtendedValue MinWidthExtended = new LayoutElementExtendedValue();
@Beefster09
Beefster09 / scale.frag
Last active June 30, 2024 22:32
GLSL: smooth pixel scaling
#version 330 core
in vec2 frag_uv;
uniform sampler2D virtual_screen;
uniform float sharpness = 2.0;
out vec4 frag_color;
float sharpen(float pix_coord) {