Skip to content

Instantly share code, notes, and snippets.

Avatar

Jb Evain jbevain

View GitHub Profile
View UnityProjectExtractor.cs
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
namespace UnityProjectExtractor
{
internal readonly struct PathMap
{
private readonly string _projectDirectory;
View netstd.cs
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
View NoWarn.cs
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
View IsDeferred
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index e09132e2798..aa109ebd70d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -1786,6 +1786,11 @@ namespace Mono.Debugger.Soft
Send (CommandSet.VM, (int)CmdVM.STOP_BUFFERING);
}
+ internal VersionInfo VM_IsDeferred () {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.DEFERRED, null);
View 0.9.6-mdb-partial-class-fix.diff
diff --git a/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs b/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
index 05ab3fb..e55109f 100644
--- a/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
+++ b/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
@@ -94,7 +94,6 @@ static void ReadLocalVariables (MethodEntry entry, MethodBody body, Scope [] sco
void ReadLineNumbers (MethodEntry entry, InstructionMapper mapper)
{
- Document document = null;
var table = entry.GetLineNumberTable ();
View truefalse.cs
using System;
struct Vector3
{
public float X, Y, Z;
public static bool operator true(Vector3 v)
{
return v.X != 0 && v.Y != 0 && v.Z != 0;
}
View omnisharp-roslyn-sign.diff
diff --git a/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs b/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
index 3ebdeb9..66c8236 100644
--- a/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
+++ b/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
@@ -134,6 +134,12 @@ public void Initalize(IConfiguration configuration)
compilationOptions = compilationOptions.WithAllowUnsafe(true);
}
+ if (projectFileInfo.SignAssembly && !string.IsNullOrEmpty(projectFileInfo.AssemblyOriginatorKeyFile))
+ {
View UnityComputeShader.md

#The hacky way of getting VS to provide syntax highlighting for Unity's compute shaders.

  1. Turn off Visual Studio

  2. In C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\VC

As administrator, remove the read-only flag on the file VC_Pkg_Core_Registration.pkgdef, and edit it in a evelated text editor.

  1. Search for .cginc, and for each cginc entry in the file, add a similar entry for .compute. Like this:
View AssemblyRenamer.cs
using System;
using Mono.Cecil;
class AssemblyRenamer
{
private static void Main(string[] args)
{
var file = args[0];
var newName = args[1];
@jbevain
jbevain / README.md
Last active Aug 5, 2021
pdb2mdb for Visual Studio 2015
View README.md

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.