Skip to content

Instantly share code, notes, and snippets.

View sailro's full-sized avatar

Sebastien Lebreton sailro

View GitHub Profile
[Test]
public void FloatingPointEvaluation()
{
/* If you create a custom algorithm that determines whether two floating-point
* numbers can be considered equal, you must use a value that is greater than
* the Epsilon constant to establish the acceptable absolute margin of difference
* for the two values to be considered equal. Typically, that margin of difference
* is many times greater than Epsilon. */
AssertExpressionsAtLine(13, "Fields.cs", new Evaluations
{
LICENSE SYSTEM [20171026 9:26:24] No start/stop license dates set
LICENSE SYSTEM [20171026 9:26:24] Next license update check is after 2017-10-17T15:03:15
Built from '2017.2/release' branch; Version is '2017.2.0f3 (46dda1414e51) revision 4644257'; Using compiler version '160040219'
OS: 'Windows 10 (10.0.0) 64bit' Language: 'en' Physical Memory: 7167 MB
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 0
2017-10-26T16:26:24Z [Package Manager] Server::Start -- Port 62359 was selected
2017-10-26T16:26:24Z [Package Manager] Server::Start -- C:/Program Files/Unity/Editor/Data/Tools/nodejs/node.exe C:/Program Files/Unity/Editor/Data/Resources/Upm/packages/server/app.js -s 520 -p 62359
@sailro
sailro / CheckFile.cs
Last active March 9, 2018 05:49
Check Authenticode, StrongName and assembly references
using System;
using System.Text;
using Mono.Cecil;
using System.Security.Cryptography.X509Certificates;
namespace CheckFiles
{
[Flags]
enum CheckTypes
{
using System;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
using UnityEngine;
[InitializeOnLoad]
public class LangRemover {
static LangRemover()
{
@sailro
sailro / ConfigurationScript.cs
Created January 4, 2016 22:01
Enable/disable VSTU console logs
/*
With the native integration we don’t have a menu to setup options anymore. That’s because the majority of VSTU options are now
directly available within Unity project settings.
But this is not the case for the console redirection.
You should do something like this with an Editor script to properly setup what you want: (only once, this setting is global).
*/
using UnityEngine;
using UnityEngine;
using System.Collections;
using System;
using System.Text;
using System.Linq;
public class Test : MonoBehaviour {
string testCecilSpec;
int[,] dynArray;
using UnityEngine;
using System.Collections;
using System;
using System.Linq;
public class Test : MonoBehaviour {
string testCecilSpec;
int[,] dynArray;
int[][][] dynJaggedArray;
@sailro
sailro / SccFileHook.cs
Created January 23, 2015 14:12
Persist Source Code Control informations
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml.Linq;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
using UnityEngine;
@sailro
sailro / ProjectFileHook.cs
Created October 2, 2014 08:09
Fix an assembly reference in a Visual Studio Tools for Unity project
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
using UnityEngine;
[InitializeOnLoad]