Skip to content

Instantly share code, notes, and snippets.

@xldeveloper
xldeveloper / Console.cs
Created April 14, 2016 09:38 — forked from mminer/Console.cs
Unity script to display in-game debug console.
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A console to display Unity's debug logs in-game.
/// </summary>
public class Console : MonoBehaviour
{
struct Log
{
@xldeveloper
xldeveloper / VolumetricImageEffect.cs
Created June 21, 2016 15:49 — forked from unitycoder/VolumetricImageEffect.cs
VolumetricImageEffect - Image Effect Script
using UnityEngine;
[ExecuteInEditMode]
public class VolumetricImageEffect : MonoBehaviour
{
public float exposure=0.6f;
public float decay = 0.95f;
public float density = 0.96f;
public float weight = 0.4f;
public float clamp = 1f;
@xldeveloper
xldeveloper / BehaviourButtonsEditor
Created November 22, 2016 14:48
Add editor buttons to your MonoBehaviours methods
using UnityEditor;
using UnityEngine;
namespace BitStrap
{
/// <summary>
/// Custom editor for all MonoBehaviour scripts in order to draw buttons for all button attributes (<see cref="ButtonAttribute"/>).
/// </summary>
[CustomEditor( typeof( MonoBehaviour ), true, isFallback = true )]
[CanEditMultipleObjects]
@xldeveloper
xldeveloper / multiple_ssh_setting.md
Created June 10, 2018 12:01 — forked from dreftymac/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@xldeveloper
xldeveloper / encrypted-git-repo.md
Created June 10, 2018 12:07
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@xldeveloper
xldeveloper / git_and_unity.md
Created June 10, 2018 13:00 — forked from Ikalou/git_and_unity.md
Git and Unity

Using Git with Unity

Git logo

Git is a popular free and open source distributed version control system.

I am new to Unity, but as a long time git user, I wanted to use git for my Unity projects. The bottom line is... it doesn't work nearly as well as I would like it to.

@xldeveloper
xldeveloper / SteamCMDCommmandsandCionvars
Created June 24, 2018 11:52 — forked from dgibbs64/SteamCMDCommmandsandCionvars
SteamCMD Commands and Convars
Convars:
app_info_http_min = "0" :
app_info_http_num_sockets = "8" :
AsyncFileIODisableWrite = "0" :
AsyncFileIOExpectOutstandingIO = "16" :
AsyncFileIOForceGenericIO = "0" :
AsyncFileIOMaxPending = "128" :
AsyncFileIOReadHandleCache = "32" :
AsyncFileIOWriteHandleCache = "128" :
batterypercent = "0" :
@xldeveloper
xldeveloper / MemoryTips.cs
Created October 8, 2018 13:16 — forked from Guendeli/MemoryTips.cs
Memory Conservation tips for Unity
// Let's talk about memory conservation
// If a Unity API returns an array, it allocates a new copy.
// Every time it is accessed, Even if the values do not change.
// Bad Sample 1: this code allocate too many Arrays
for ( int i = 0;i < Input.touches.Length; i++ ) // Get() accessor call + creating copy
{
Touch touch = Input.touches[i]; // Creating copy
// …
}
@xldeveloper
xldeveloper / .gitattributes-lfs-unity
Created June 15, 2021 19:43 — forked from bpesquet/.gitattributes-lfs-unity
.gitattributes file for LFS with Unity
* text=auto
# Unity files
*.meta -text -merge=unityamlmerge
*.unity -text -merge=unityamlmerge
*.asset -text -merge=unityamlmerge
*.prefab -text -merge=unityamlmerge
# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text