Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@TinyTeaTree TinyTeaTree commented Jul 11, 2020

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

@m4a4

This comment has been minimized.

Copy link

@m4a4 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
You can’t perform that action at this time.