- Home /
DLL extension methods not showing up in Unity
Hi, I'm wondering if anyones come across something like this. I have a DLL that contains a lot of my logic and I have some extension methods defined there. While they show up and compile fine in the DLL they don't show up in unity. Like this:
public static class IInfoServiceExtensions{
public static void CreateKin<T>(this IInfoService<T> service) where T : PlayerInfo{
DispatchEvent(new Event(stuff));
}
}
Works fine in the DLL but doesn't show up in unity scripts!
Answer by Bunny83 · Feb 06, 2014 at 11:16 AM
Some points you should check:
Have you copied the compiled DLL into the asset folder of your project?
Are your DLL-classes inside a namespace (which is usually the default)?
Do you have a "using YOURNAMESPACE" in the script where you want to use the extension?
Thank you so much! II forgot to include the extension namespace in my script.
Your answer
![](https://koobas.hobune.stream/wayback/20220613132706im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Is it possible to RPC a C# extension method? 1 Answer
Flip over an object (smooth transition) 3 Answers