This file contains 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 System.Collections; | |
using UnityEngine; | |
namespace Assets.Tools | |
{ | |
public class PrefabBenchmarker : MonoBehaviour | |
{ | |
public GameObject PrefabUnderTest; | |
public int InstancesToCreate = 1000; | |
public int FramesToTest = 100; |
This file contains 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
IEnumerable<string> ErrorsFor3(string[] hayStack, string[] needles, Func<string, string, string> errorMessageGenerator) | |
{ | |
return hayStack.Select(hay => needle.FirstOrDefault(hay.Contains)) | |
.Where(n => n != null) | |
.Select(matchingNeedle => errormessageGenerator(hay, matchingNeedle)); | |
} |
This file contains 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
string s = "RHUBARB" + "æ" + "CUSTARD"; | |
var c = s[7]; | |
var i = (int)c; | |
Debug.Log(c); // expect æ in console | |
Debug.Log(i); // expect 230 in console |
This file contains 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
# unneeded Unity folders | |
temp/ | |
library/ | |
screenshots/ | |
# VS user files | |
*.csproj.user | |
*.suo | |
# unneeded VS project files |
This file contains 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
*.tif filter=lfs diff=lfs merge=lfs -text | |
*.cubemap filter=lfs diff=lfs merge=lfs -text | |
*.tga filter=lfs diff=lfs merge=lfs -text | |
*.png filter=lfs diff=lfs merge=lfs -text | |
*.raw filter=lfs diff=lfs merge=lfs -text | |
*.wav filter=lfs diff=lfs merge=lfs -text | |
*.psd filter=lfs diff=lfs merge=lfs -text | |
*.mov filter=lfs diff=lfs merge=lfs -text | |
*.fbx filter=lfs diff=lfs merge=lfs -text |
This file contains 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; | |
namespace FunkyGeek.Core | |
{ | |
/// <summary> | |
/// Adds a list of components (typically from this or child GameObjects) to the global registry. | |
/// </summary> | |
public class AddToRegistry : MonoBehaviour | |
{ | |
public Object[] ObjectsToAdd; |
This file contains 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 System; | |
using System.Linq; | |
using Diagnostics; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
namespace Events | |
{ | |
public static class EventAggregator |
This file contains 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
function GitPrompt() | |
{ | |
Write-Host | |
$realLASTEXITCODE = $LASTEXITCODE | |
$Host.UI.RawUI.ForegroundColor = "White" | |
Write-Host $pwd.ProviderPath -NoNewLine -ForegroundColor Green | |
checkGit($pwd.ProviderPath) | |
$global:LASTEXITCODE = $realLASTEXITCODE | |
Write-Host "`ngit> " -NoNewLine -ForegroundColor "DarkGray" | |
} |
This file contains 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 System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
public class SelectionHistory : EditorWindow | |
{ | |
private const int NumberOfItemsToKeep = 6; | |
private const string MultiSelectPrefix = "+"; | |
private const int ItemsPerRow = 2; |
This file contains 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; | |
namespace Assets.Phunk.Core | |
{ | |
public static class Log | |
{ | |
#region Error | |
public static void ErrorFormat(UnityEngine.Object context, string template, params object[] args) | |
{ | |
var message = string.Format(template, args); |
OlderNewer