Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
from pyPgSQL import PgSQL
import os
import argparse
def DebugPrint(string):
print '[DEBUG] %s' % string
class Changeset:
@hiroki-o
hiroki-o / MeshCombiner.cs
Last active December 14, 2015 15:09
Combine all mesh of children into one mesh
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
public class MeshCombiner : MonoBehaviour {
void Start() {
MeshFilter[] meshFilters = GetComponentsInChildren<MeshFilter>() as MeshFilter[];
@hiroki-o
hiroki-o / DisableAnimationImport.js
Created June 5, 2013 10:11
Disable Animation import on Unity Editor (effective above v4.2)
class DisableAnimationImport extends AssetPostprocessor {
function OnPreprocessModel () {
if (assetPath.Contains("@@")) {
var modelImporter : ModelImporter = assetImporter;
modelImporter.importAnimation = false;
}
}
}
@hiroki-o
hiroki-o / NewBehaviourScript.cs
Last active August 29, 2015 14:03
Instantiate Error test
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public GameObject enemyPrefab;
// Use this for initialization
void Start ()
{
@hiroki-o
hiroki-o / SetSpriteTag.cs
Created February 15, 2017 08:00
[AssetBundleGraphTool] Custom node sample code to set SpriteTag by Group
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine.AssetBundles.GraphTool;
@hiroki-o
hiroki-o / LoadByAssetList.cs
Last active February 19, 2017 11:36
Custom Loader Node script that uses TextAsset as source of assets to load
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine.AssetBundles.GraphTool;
@hiroki-o
hiroki-o / FilterByTextureAlpha.cs
Created February 21, 2017 07:25
AssetBundleGraphTool custom filter class/Filter by texture's alpha channel info
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
@hiroki-o
hiroki-o / CheckUnwantedAssetsInDependency.cs
Created February 24, 2017 22:09
[ABGT 1.2] Check if unwanted dependencies are included into asset bundle
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine.AssetBundles.GraphTool;
@hiroki-o
hiroki-o / GroupingBySize.cs
Created February 24, 2017 22:45
[ABGT 1.2] Group assets by runtime memory size
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEditor;
using V1=AssetBundleGraph;
using Model=UnityEngine.AssetBundles.GraphTool.DataModel.Version2;
@hiroki-o
hiroki-o / ExtractSharedAssets.cs
Last active February 25, 2017 09:39
[ABGT 1.2] Find shared dependencies between bundles and automatically create new shared asset bundles
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine.AssetBundles.GraphTool;