Skip to content

Instantly share code, notes, and snippets.

View daltonbr's full-sized avatar
🎮
Brighton - UK

Dalton Lima daltonbr

🎮
Brighton - UK
View GitHub Profile
@toxicFork
toxicFork / TextureAtlasSlicer.cs
Last active November 24, 2019 08:28
TextureAtlasSlicer.cs
using System;
using System.Collections.Generic;
using System.Xml;
using UnityEditor;
using UnityEngine;
public class TextureAtlasSlicer : EditorWindow {
[MenuItem("CONTEXT/TextureImporter/Slice Sprite Using XML")]
public static void SliceUsingXML(MenuCommand command)
{
@FullStackForger
FullStackForger / .gitignore
Last active April 6, 2024 13:19
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@omgwtfgames
omgwtfgames / A set of Unity3D extension methods
Last active March 2, 2024 17:44
Some useful extension method for Unity3D
A collection of useful C# extension methods for the Unity engine.
@Chippit
Chippit / switchLibrary.py
Last active February 21, 2019 15:29
Script to handle producing symbolic links for various Library folders in Unity, to ease multi-platform development and reduce unneeded import time.
#! /usr/bin/env python3
#
# Handles producing symbolic links to various library folders, for different
# texture compression options in Unity Android, or to switch libraries for
# different platforms
#
# Unity stores all its imported data inside its ./Library/ folder, containing
# only derived data for your project. When switching platforms or texture
# compression settings, contents of this folder change accordingly, but can
# be preserved between switches. This script can help needlessly importing
@sebingel
sebingel / StreamEquals.cs
Last active March 16, 2021 22:28
Compare two streams bit by bit in C#
private bool StreamEquals(Stream a, Stream b)
{
if (a == b)
{
return true;
}
if (a == null || b == null)
{
throw new ArgumentNullException(a == null ? "a" : "b");
@Hotrian
Hotrian / HeadlessScript.cs
Last active September 17, 2020 23:54
Takes a normal Unity Standalone Player Window and hides it off screen and from the Taskbar :). This was made because -batchmode seems to automatically call -nographics now, which breaks things :(.
using System;
using UnityEngine;
using System.Runtime.InteropServices;
public class HeadlessScript : MonoBehaviour
{
#if UNITY_STANDALONE_WIN && !UNITY_EDITOR
[DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
static extern IntPtr FindWindowByCaption(IntPtr zeroOnly, string lpWindowName);
@rafayali
rafayali / unity.gitignore
Created August 9, 2017 07:54
.gitignore for Unity 2017 projects using VS 2017
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# Visual Studio 2015 cache directory
/.vs/
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active June 14, 2024 17:31
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@mattiaswargren-zz
mattiaswargren-zz / PostProcessXCodeComplianceFix.cs
Created August 30, 2017 14:30
Unity ITSAppUsesNonExemptEncryption export compliance Post Process
#if UNITY_IOS
using UnityEditor.Callbacks;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using System.IO;
public class PostProcessXCodeComplianceFix
{
[PostProcessBuild]
public static void ChangeXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
@mrbar42
mrbar42 / README.md
Last active June 9, 2024 09:55
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8