Skip to content

Instantly share code, notes, and snippets.

View chiuan's full-sized avatar
🐒

ChiuanWei chiuan

🐒
  • Shenzhen
View GitHub Profile
@rolftimmermans
rolftimmermans / compress-folder-with-tinypng.jsx
Created June 25, 2014 14:24
Compressing all PNG images in a folder and its subfolders with TinyPNG
#target photoshop
/* Open the given file, and compress with TinyPNG. */
function compressFile(file) {
var document = open(file);
if (document.mode == DocumentMode.INDEXEDCOLOR) {
document.changeMode(ChangeMode.RGB);
}
@jbevain
jbevain / README.md
Last active November 16, 2023 12:11
pdb2mdb for Visual Studio 2015

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.

@mzaks
mzaks / Entitas-BT.cs
Last active September 5, 2022 11:55
Sketch for Entitas-CSharp Behaviour Tree implementation
// Based on http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php
public enum NodeStatus
{
Success, Failure, Running
}
public interface IBehaviorNode
{
NodeStatus Execute(Entity entity);
@juanarzola
juanarzola / ChangeType.cs
Last active October 6, 2016 08:44
UniRx observable wrappers for Entitas entity and group events
using System;
namespace Entitas {
/** Used in the *AnyChangeObservable methods to observe multiple change types */
[Flags]
public enum ChangeType : short{
Addition = 1 << 0,
Replacement = 1 << 1,
Removal = 1 << 2,
@Tsiannian
Tsiannian / client.go
Created August 19, 2016 08:44
a go client to check the echo server limit.
package main
import (
"bufio"
"encoding/binary"
"fmt"
"net"
"os"
"time"
)
@Protonz
Protonz / TweenObservable.cs
Last active February 26, 2018 19:46
Using UniRx to create a TweenStream
using System;
using System.Collections;
using UniRx;
using UnityEngine;
using System.Threading;
namespace UniRx {
public static partial class CustomObservable {