- Home /
Using Cecil in Unity
I am trying to use Cecil, a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format. See link : http://www.mono-project.com/docs/tools+libraries/libraries/Mono.Cecil/
using System;
using UnityEditor;
using Mono.Cecil;
public class TestCecil
{
[MenuItem("Assets/TestMenu")]
protected static void LookForUnusedClasses(){
}
}
But I have the following error :
The type or namespace name
Cecil
does not exist in the namespaceMono
. Are you missing an assembly reference?
Not sure if this changes anything, but I tried switching from .Net 2.0 Subset to regular, but I still get the same errors. Thanks in Advance.
Answer by Bunny83 · Jun 25, 2016 at 01:52 AM
Well do you have that library actually inside your project? If not you have to copy the DLL into your Assets folder. Keep in mind that the mono framework in Unity is not an actual globally available framework as it's used as embedded environment inside Unity. Only some core files are automatically included. Any other files need to be copied manually.
Your answer
Follow this Question
Related Questions
namespace support in unity 1 Answer
Why does System.IO assembly give linker errors in Unity 3 when they worked fine b4 2 Answers
Why does Boo not see namespaces from dlls? 1 Answer
The type or namespace name `Web' does not exist in the namespace `System' 3 Answers
The type or namespace name `SingletonMonoBehaviour`1' could not be found 2 Answers