Skip to content

Instantly share code, notes, and snippets.

@Arakade
Arakade / AssertionComponentEditor.cs.patch
Created July 13, 2014 14:07
Remove type.IsSerializable test which blocks Comparer's Vector3 members showing in AssertionComponent Editor.
.../UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs | 3 ---
1 file changed, 3 deletions(-)
diff --git a/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs b/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs
index c5d19a0..90411fd 100644
--- a/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs
+++ b/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs
@@ -201,9 +201,6 @@ namespace UnityTest
{
foreach (var prop in script.Action.GetType ().GetFields (BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly))
@Arakade
Arakade / AssertionComponentEditor.cs.patch
Created July 13, 2014 14:17
AssertionComponentEditor should includeChildren so Comparer/ActionBase subclasses can include Arrays, etc.
.../UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs b/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs
index 1860f7b..c5d19a0 100644
--- a/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs
+++ b/ProjectName/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs
@@ -208,7 +208,7 @@ namespace UnityTest
var sp = so.FindProperty(prop.Name);
if (sp != null)
@Arakade
Arakade / UltimateGameTools-Fracturing-ResetWithTimeout.patch
Last active January 1, 2016 00:09
A patch for Ultimate Game Tools' "Fracturing" Unity3D plugin that adds ability to call FracturedObject.ResetChunks() while still using lifetime timers (DieTimer). UGT: http://www.ultimategametools.com/products/fracturing/ Proposed: http://forum.unity3d.com/threads/184170-Ultimate-Fracturing-amp-Destruction-editor-extension-for-Unity-3D?p=1460344…
diff -ru C:\Users\User\Dev\Unity3D\FracturingNoChanges\Assets\Ultimate Game Tools\Fracturing\Editor\FracturedObjectEditor.cs C:\Users\User\Dev\Unity3D\SnowFallFracturedExperiment\Assets\Ultimate Game Tools\Fracturing\Editor\FracturedObjectEditor.cs
--- C:\Users\User\Dev\Unity3D\FracturingNoChanges\Assets\Ultimate Game Tools\Fracturing\Editor\FracturedObjectEditor.cs Tue Dec 10 20:01:47 2013
+++ C:\Users\User\Dev\Unity3D\SnowFallFracturedExperiment\Assets\Ultimate Game Tools\Fracturing\Editor\FracturedObjectEditor.cs Sat Dec 21 18:24:45 2013
@@ -56,6 +56,7 @@
SerializedProperty PropEventDetachedMinLifeTime;
SerializedProperty PropEventDetachedMaxLifeTime;
SerializedProperty PropEventDetachedOffscreenLifeTime;
+ SerializedProperty PropEventDetachedDestroyRatherThanInactivate;
SerializedProperty PropEventDetachedMinMass;
SerializedProperty PropEventDetachedMinVelocity;
@Arakade
Arakade / MasterAudio.cs.patch
Created January 24, 2014 23:24
Patch for Unity3D MasterAudio v3.3.6 producing all sound variations when PlaySound*AndForget() methods used (more makePlaySoundResult use needed). Diff looks much larger than it actually is due to added indentation needed.
diff --git "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\MasEC0A.tmp\\MasterAudio-b3070d8-left.cs" "b/C:\\Users\\User\\Dev\\Unity3D\\MusicExperiments\\Assets\\DarkTonic\\MasterAudio\\Scripts\\Singleton\\MasterAudio.cs"
index 4d6ccf1..c9b20e9 100644
--- "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\MasEC0A.tmp\\MasterAudio-b3070d8-left.cs"
+++ "b/C:\\Users\\User\\Dev\\Unity3D\\MusicExperiments\\Assets\\DarkTonic\\MasterAudio\\Scripts\\Singleton\\MasterAudio.cs"
@@ -1092,62 +1092,67 @@ public class MasterAudio : MonoBehaviour {
do {
playedState = PlaySoundIfAvailable(randomSource, sourcePosition, volumePercentage, pitch, _group, sourceTrans, attachToSource, delaySoundTime, useVector3, makePlaySoundResult);
-
- if (playedState != null && (playedState.SoundPlayed || playedState.SoundScheduled)) {
@Arakade
Arakade / AstarPathEditor.cs.all-assemblies-part-2.patch
Created February 15, 2016 09:35
Part 2 of a patch for A* Project's AstarPathEditor that fixes sections guarded by #define ASTARDEBUG
diff --git "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Ast5870.tmp\\AstarPathEditor-25a36d5-left.cs" "b/D:\\Users\\User\\Dev\\Unity3D\\AIExperiments\\Assets\\AstarPathfindingProject\\Editor\\AstarPathEditor.cs"
index 2d23473..2e27f4b 100644
--- "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Ast5870.tmp\\AstarPathEditor-25a36d5-left.cs"
+++ "b/D:\\Users\\User\\Dev\\Unity3D\\AIExperiments\\Assets\\AstarPathfindingProject\\Editor\\AstarPathEditor.cs"
@@ -1,3 +1,5 @@
+#define ASTARDEBUG
+
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
@Arakade
Arakade / GridGeneratorEditor.cs.patch
Created February 15, 2016 23:21
A* Project patch to enable ASTARDEBUG shift-mouse-over displaying path information
diff --git "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Gri8182.tmp\\GridGeneratorEditor-c900cb4-left.cs" "b/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Gri8162.tmp\\GridGeneratorEditor-bd6560d-right.cs"
index b636bd5..1facb21 100644
--- "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Gri8182.tmp\\GridGeneratorEditor-c900cb4-left.cs"
+++ "b/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Gri8162.tmp\\GridGeneratorEditor-bd6560d-right.cs"
@@ -1,3 +1,5 @@
+#define ASTARDEBUG
+
using UnityEngine;
using UnityEditor;
using Pathfinding.Serialization.JsonFx;
@Arakade
Arakade / Base.cs.patch
Created February 16, 2016 10:57
A* Project better colours for tag visualization
diff --git "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Bas7CB4.tmp\\Base-25a36d5-left.cs" "b/D:\\Users\\User\\Dev\\Unity3D\\AIExperiments\\Assets\\AstarPathfindingProject\\Generators\\Base.cs"
index c530058..a8802b7 100644
--- "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Bas7CB4.tmp\\Base-25a36d5-left.cs"
+++ "b/D:\\Users\\User\\Dev\\Unity3D\\AIExperiments\\Assets\\AstarPathfindingProject\\Generators\\Base.cs"
@@ -304,7 +304,7 @@ namespace Pathfinding {
c = Color.Lerp (AstarColor.ConnectionLowLerp,AstarColor.ConnectionHighLerp, ((float)node.Penalty-AstarPath.active.debugFloor) / (AstarPath.active.debugRoof-AstarPath.active.debugFloor));
break;
case GraphDebugMode.Tags:
- c = AstarMath.IntToColor ((int)node.Tag,0.5F);
+ c = AstarColor.GetAreaColor(node.Tag);
@Arakade
Arakade / unity-pkg-extract.sh
Created April 29, 2016 19:39
Extract unitypackage contents from extracted directory into more normal form.
#!/bin/bash
# Extract unitypackage contents from extracted directory into more normal form.
# Rupert Key, 2014/09/15-ish
# TODO: Make it extract from the .unitypackage (tar.gz) so don't need initial extract step.
# RK: On updating, don't forget to update the public version!
# Public: If you want, please ping me with any changes / requests.
if [ $# -ne 2 -o "$1" == "-h" ] ; then
@Arakade
Arakade / RandomGrabBag.cs
Created May 20, 2016 13:32
A way to repeatedly randomly choose from an initially provided set of possibilities.
// Copyright Rupert Key, 2016
// Published under BSD license (commercial-friendly use as you wish but recognize owner wrote it)
using System.Collections.Generic;
// uses UnityEngine for Random.Range()
namespace UGS.Random {
/// <summary>
/// A way to repeatedly randomly choose from an initially provided set of possibilities.
@Arakade
Arakade / RippleCreator.cs.patch
Last active September 3, 2016 12:58
Patch for RealisticWater Unity Asset's RippleCreator to integrate with MasterAudio for splash sound. https://www.assetstore.unity3d.com/en/#!/content/33434
diff --git a/Assets/RealisticWater/Scripts/Water/RippleCreator.cs b/Assets/RealisticWater/Scripts/Water/RippleCreator.cs
index 9282d1b..cee8c48 100644
--- a/Assets/RealisticWater/Scripts/Water/RippleCreator.cs
+++ b/Assets/RealisticWater/Scripts/Water/RippleCreator.cs
@@ -1,3 +1,6 @@
+// define to include Master Audio integration for splash sound
+#define MASTERAUDIO
+
using UnityEngine;
using System.Collections.Generic;