Skip to content

Instantly share code, notes, and snippets.

@jbevain
Created November 26, 2014 13:15
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jbevain/a982cc580fb796c93e4e to your computer and use it in GitHub Desktop.
Save jbevain/a982cc580fb796c93e4e to your computer and use it in GitHub Desktop.
Project Generation Hook to remove references to Boo.Lang and UnityScript assemblies
using System;
using UnityEngine;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
[InitializeOnLoad]
public class ReferenceRemovalProjectHook
{
static ReferenceRemovalProjectHook()
{
const string references = "\r\n <Reference Include=\"Boo.Lang\" />\r\n <Reference Include=\"UnityScript.Lang\" />";
ProjectFilesGenerator.ProjectFileGeneration += (string name, string content) =>
content.Replace(references, "");
}
}
@TinyTeaTree
Copy link

Does not work for me in Unity 2019.3. But i did not know about this hook, will experiment
image

@m4a4
Copy link

m4a4 commented Aug 9, 2020

For anyone quickly looking, one of the forks has a working update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment