Skip to content

Instantly share code, notes, and snippets.

View Naphier's full-sized avatar
🐲

Sean Mann Naphier

🐲
View GitHub Profile
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@ocus
ocus / build.gradle
Created January 19, 2017 15:38
Android Library Project - Copy AAR from build/outputs/aar/PROJECT-VARIANT.aar to build/PROJECT-VARIANT-VERSION_NAME.aar after each assembleVARIANT task
android.libraryVariants.all { variant ->
def variantName = variant.name.capitalize()
def copyTaskName = "copy${variantName}Artifacts"
def assembleTaskName = "assemble${variantName}"
task(copyTaskName, type: Copy, dependsOn: assembleTaskName, group: "build") {
variant.outputs.each { output ->
def newOutputName = output.outputFile.name.replace(".aar", "-" + android.defaultConfig.versionName + ".aar")
from(output.outputFile.parent) {
include output.outputFile.name
rename output.outputFile.name, newOutputName
@ousttrue
ousttrue / FFMpegYUV4Texture.cs
Last active September 20, 2024 02:44
TextureUpdater for Unity by ffmpeg
using UnityEngine;
using System.IO;
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Collections;
public class FFMpegYUV4Texture : MonoBehaviour
{
@naojitaniguchi
naojitaniguchi / VideoPicker.cs
Last active September 15, 2020 10:17
Video Picker for Unity iOS native plugin call sample, Using UIImagePickerController
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class VideoPicker : MonoBehaviour {
public Texture2D shareButtonImage; // Use this for initialization
[DllImport("__Internal")]
private static extern void OpenVideoPicker(string game_object_name, string function_name);
@vdavez
vdavez / docx2md.md
Last active June 17, 2024 19:40
Convert a Word Document into MD

Converting a Word Document to Markdown in Two Moves

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

The Solution

As it turns out, there are several open-source tools that allow for conversion between file types. Pandoc is one of them, and it's powerful. In fact, pandoc's website says "If you need to convert files from one markup format into another, pandoc is your swiss-army knife." But, although pandoc can convert from markdown into .docx, it doesn't work in the other direction.