Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator does not work if Entitas is not in Assets folder root #72

Closed
aaronjbaptiste opened this issue Feb 25, 2016 · 1 comment
Closed

Comments

@aaronjbaptiste
Copy link

Reproduced in a new Unity Project:

  1. Create a folder "Plugins" in Assets

  2. Add the Entitas package into Plugins. So the structure looks like:

    Assets/Plugins/Entitas/Enitas
    Assets/Plugins/Entitas/Enitas.CodeGenerator
    Assets/Plugins/Entitas/Enitas.*

  3. Create a simple PositionComponent

  4. Configure Entitas generated folder as: Assets/Source/Generated/

  5. Click Generate

Actual: ComponentIds and Pool are Generated, PositionComponent is not. Moving Entitas into Assets fixes the problem.

@sschmid
Copy link
Owner

sschmid commented Feb 26, 2016

This has sth to do with the Special Folders and Script Compilation Order and partial classes

The generated sources files extent the core files of Entitas making use of the 'partial' keyword. This requires Entitas to be in the same assembly as your source files. Moving Entitas to Plugins will actually result it to end up in Assembly-CSharp-firstpass which means you cannot compile.

Entitas for that matter is no Plugin

Unity lets you add Plugins to a project to extend the features available to Unity. Plugins are native DLLs that are typically written in C/C++. They can access third party code libraries, system calls and other things that are not provided by Unity out of the box. Plugins must be placed in a folder called Plugins to be detected by Unity and like the Editor folder, this affects the order in which scripts are compiled. See the page on Special Folders and Script Compilation Order for further details.

http://docs.unity3d.com/Manual/SpecialFolders.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants