This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.ShortcutManagement; | |
using System.Linq; | |
[InitializeOnLoad] | |
public class SwitchShortcutsProfileOnPlay | |
{ | |
private const string PlayingProfileId = "Playing"; | |
private static string _activeProfileId; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://forum.unity.com/threads/yaml-fileid-hash-function-for-dll-scripts.252075/#post-1695479 | |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Security.Cryptography; | |
// Taken from http://www.superstarcoders.com/blogs/posts/md4-hash-algorithm-in-c-sharp.aspx | |
// Probably not the best implementation of MD4, but it works. | |
public class MD4 : HashAlgorithm | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc DisableForRigExport() | |
{ | |
for( $eachMesh in `ls -selection -l` ) | |
{ | |
setAttr ($eachMesh + ".overrideColor", 4); | |
setAttr ($eachMesh + ".overrideEnabled", 1); | |
setAttr ($eachMesh + ".overrideDisplayType", 2); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc ExportAllDagChildren() | |
{ | |
$savedSel = ls("-selection", "-l"); | |
select(ls("-l","-fl", "-type", "transform", "-dag", listRelatives("-ad", "-f"))); | |
for( $eachMesh in `ls -selection -l` ) | |
{ | |
$overrided = getAttr ($eachMesh + ".overrideEnabled"); | |
if($overrided != 1) | |
{ | |
continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
[ | |
"ext":"unity", | |
"ext":"mat", | |
"ext":"prefab", | |
"ext":"asset", | |
"ext":"csv", | |
"ext":"txt", | |
"ext":"shader", | |
"ext":"cginc", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal ENABLEDELAYEDEXPANSION | |
FOR /D %%G in ("*") DO ( | |
svn commit "%%~fG" --message="Committing %%~nxG" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static List<Transform> GetTransforms(Transform inTransform) | |
{ | |
List<Transform> returnTransforms = new List<Transform>(); | |
foreach (Transform t in inTransform) | |
{ | |
if(t != null) | |
{ | |
returnTransforms.Add(t); | |
} | |
returnTransforms.AddRange(GetTransforms(t)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static List<GameObject> GetGameObjects(GameObject inGameObject) | |
{ | |
List<GameObject> returnGOs = new List<GameObject>(); | |
foreach (Transform t in inGameObject.transform) | |
{ | |
GameObject eachGO = t.gameObject; | |
if(eachGO != null) | |
{ | |
returnGOs.Add(eachGO); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DEBUG_ON | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SwapUVs : AssetPostprocessor | |
{ | |
const string CLabel = "pp_swapuvs"; // Asset needs to have this label to be processed |