- Home /
Unity Engine script assemblies not accessible in my package
I have this project; a package I'm developing that's extending Unity's Layout Element component. However, when I build I get errors like below
Packages\UnityLayoutElementExtended\Editor\Editors\LayoutElementExtendedEditor.cs(2,19): error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)
Packages\UnityLayoutElementExtended\Editor\Editors\LayoutElementExtendedEditor.cs(8,48): error CS0246: The type or namespace name 'LayoutElementEditor' could not be found (are you missing a using directive or an assembly reference?)
Packages\UnityLayoutElementExtended\Editor\PropertyDrawers\LayoutElementExtendedValuePropertyDrawer.cs(7,61): error CS0246: The type or namespace name 'PropertyDrawer' could not be found (are you missing a using directive or an assembly reference?)
I have script assemblies for both sections of my code (Scripts and Editor). I think I've set their references correctly
The errors above are like I need to set UnityEngine and UnityEditor themselves as references but they do not appear as an option to do so. I'm kind of stumped as to what the problem is.
I have a feeling I'm missing something really simple or this is a Unity bug. Anyone else have similar issues?
I'm on Windows Unity 2020.
Answer by QuantumCalzone · Dec 07, 2020 at 09:11 AM
Ah, so the issue was that my editor Assembly Reference needed to exclude all platforms except the editor. Yay for simple solution!
Your answer
![](https://koobas.hobune.stream/wayback/20220613021205im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can't import custom package,,Can't import custom packages 0 Answers
Packages Missing/Not Up To date? 0 Answers
After updating Version Control to 1.14.17 these errors come up 0 Answers
how to properly add custom scene(s) to a custom package in Samples~ folder? 0 Answers
How to work with Unity Package Manager in Unity 2017.2.x+ 1 Answer