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

Temp Setup Guide for 1.14.1 #1055

Open
eterlan opened this issue Feb 11, 2023 · 18 comments
Open

Temp Setup Guide for 1.14.1 #1055

eterlan opened this issue Feb 11, 2023 · 18 comments

Comments

@eterlan
Copy link

eterlan commented Feb 11, 2023

It's quite struggling for me to grasp all the infomation from issue to setup the project, maybe it's just me not smart enough but anyway. For someone who watch video and want to try this wonderful framework.
Tutorial or installing guide is temproraly broken, so follow these steps instead.

  1. Create a new Unity project.
  2. Download Entitas and Jenny from releases. Copy the content inside Entitas to Assets/, then copy the content inside Jenny to project root folder. It should looks exactly like this project Sample.
  3. Paste anything
  4. In the menu bar, find Tools -> Jenny -> Preference -> Edit Jenny/properties. Copy the content from Sample Jenny.properties to override this file.
  5. Assets -> Open C# projects to open your Rider (no idea what would happens to VS or VSCode). Rider -> Terminal input: dotnet Jenny/Jenny.Generator.Cli.dll server
  6. Rider -> Terminal click "+" to open another window and type: dotnet Jenny/Jenny.Generator.Cli.dll client gen
  7. If folder structure is correct, than it should have no problems in win10, Unity2022.2.1f1

Tips:

  1. Visual Debugger doesn't work. There is no observers , if deactivate "Reload domain" in Project Settings -> Editor #999
@emadgh
Copy link

emadgh commented Feb 21, 2023

Hi, I'm new to Entitas, the documents doesn't match the current version. I'm a little confused.

After doing all above it generates 0 files. The generator just create an empty "Generated" folder.

@eterlan
Copy link
Author

eterlan commented Feb 22, 2023

@emadgh Hi, yes it's quite confused.. Did you download the sample project metioned in step 2? Can you generate file with command in that project? If that's fine (should be fine), it should be no problem if you has exactly same folder structure as that sample project has.
Also, Don't use the generate button in Jenny, it's broken at this time.

@Vikta5
Copy link

Vikta5 commented Feb 24, 2023

I will add a few comments:

  • you must have the NET core sdk installed, and necessarily version 6, no higher;
  • personally, dotnet command did not work for me in the rider terminal. But these commands work in ordinary cmd or powershell;
  • you need to make an auto-import of jenny.properties before inserting them from the example (if this is not done, they will still be replaced at the first launch of the client);
  • after you replace the properties, the jenny window will take the form corresponding to the tutorial, and you will be able to edit contexts;
  • and yes, the Generation green button didn't work. Sometimes with error, sometimes just generate 0 files.

It is all work in win11.

UPD: The problem with the rider's terminal was at my side (rider took local, not global PATH, where dotnet was registered)

@emadgh
Copy link

emadgh commented Feb 24, 2023

@Vikta5 Hi there, the sample project is working and generating code via Terminal is possible,
I removed everything and start using it for learning Entitas.
Thanks.

@bb8bb9
Copy link

bb8bb9 commented Mar 10, 2023

I really trying this guide, but in the end just intall the v1.13 :/

@huyinings
Copy link

the documents doesn't match the current version .it takes me half day to start entitas .here 's my steps.

use "dotnet --info" in cmd to make sure u install the dotnet sdks 6.

  1. download the entitas.zip and jenny.zip in the lastest releases version (like 1.14.1)

  2. unzip them in seprate folder

  3. create a new unity3d project.(for ex: 2021.3.18f)

  4. after this step, the structure like project Sample

    1. copy the whole content inside the entitas's zip to Assets/ 。 the search path in jeny properties (from Sample ) need this。
    2. copy the whole content inside the jeny's zip to project root folder .
  5. open C# Project once inside unity ,or create a empty C# script after compiled success。

  6. copy the Jenny.properties and Entitas.properties from Sample to project root.

  7. excute cmd :

    cd My/Project #which is project root,jeny is here .
    dotnet Jenny/Jenny.Generator.Cli.dll gen
  8. u will see the generated code in unity from cmd。

@heavyfront
Copy link

Hi. I have this issue - Specify the project file to use, as this "project path" contains several of these files. What i need to do? Help pls.

@helpmoy
Copy link

helpmoy commented Jul 16, 2023

where is Jenny.properties and Entitas.properties? please tell me ,brother thankyou

@sschmid
Copy link
Owner

sschmid commented Jul 17, 2023

Sorry for the confusion! The setup with Entitas 1.14 changed a little but because I migrated to dotnet 6.0 (instead of mono).

As always, if you have any issues or trouble getting Entitas or Jenny to work, I strongly recommend having a look at the sample game:

Even when the docs are not updated yet, this sample game is always up to date and uses the latest Entitas version. It's always worth checking it.

@huyinings already shared the correct steps to do, I'll summarize them again and try to answer all questions:

  • you can always get the latest version of Entitas from the releases on GitHub. Read the release notes to learn more about the changes
  • unzip the contents of Entitas.zip into your Assets folder
  • unzip the contents of Jenny.zip into the root of your project folder, outside of the Assets folder
  • compare you folder structure with Match-One when in doubt, e.g. sometimes people extract Jenny.zip differently and end up with multiple Jenny subfolders like Jenny/Jenny/Jenny.Generator.Cli.dll. To avoid confusion please have it the same way as in Match-One
  • the new command to invoke Jenny is now:
# Example jenny server
dotnet Jenny/Jenny.Generator.Cli.dll server

# Example jenny gen
dotnet Jenny/Jenny.Generator.Cli.dll gen
  • you need dotnet 6.0 installed. Latest version is dotnet 7.0 now, but you also need dotnet 6 in order to run Jenny. That's not a problem, you can have multiple dotnet runtimes installed, e.g. dotnet 6.0, 7.0, 8.0-preview. Get dotnet 6.0 here: https://dotnet.microsoft.com/en-us/download/dotnet/6.0
  • if you're not quite sure what jenny auto-update does or how it works, don't worry, just copy the Jenny.properties file from Match-One into you project folder and everything should work. Don't do jenny auto-update after you copied that file. Or at least commit it first to see the changes.
  • use the terminal and dotnet Jenny/Jenny.Generator.Cli.dll server or dotnet Jenny/Jenny.Generator.Cli.dll gen to generate. Jenny uses dotnet 6.0 and roslyn which doesn't work in Unity for now. Generating in Unity while using the roslyn data providers will fail. Generating in the terminal using jenny server is the fastest way to generate, so I think it's fine for now that it does not work in Unity. Btw, I'm currently working on replacing Jenny with C# source generators which will simplify the whole Entitas setup drastically. It will also enable namespaces for contexts and components + will support multiple projects, e.g. when using multiple Unity asmdef. See Entitas with Roslyn Code Generation via dotnet IIncrementalGenerator #1005

If you have further issue let me know, and I'll update my post!

@thenitro
Copy link

it's pity that such cool project became so absurdly overcomplicated to install/update that it became absolutely unusable. I just spent whole morning trying to figure out the migration process, and still end up with Specify which project file to use because this '/MyPath/To/Project' contains more than one project file., this is way too retarded

@sschmid
Copy link
Owner

sschmid commented Aug 23, 2023

@thenitro sorry for the inconvenience. The initial setup caused trouble for many, but is essentially the same as previously, only using dotnet 6. I'm to blame for the lack of documentation for Jenny, I'll do better in Entitas 2.0 (by removing Jenny 😅)

For now Match One's Jenny.properties is your best friend

@thenitro
Copy link

nice! can't wait for Entitas 2.0. I'm currently using 0.13 for my pet city builder project and it works nicely, just wanter to give it a little bump up, anyway good job with Entitas, just don't forget about migration from older versions ))

@synthetic-w
Copy link

I've completed all the steps but still have an issue (screenshot attached)

image

@synthetic-w
Copy link

I've completed all the steps but still have an issue (screenshot attached)

image

The first line causes an exception. But without this line the generation doesn't work properly.
Screenshot 2023-08-30 170532

@sschmid
Copy link
Owner

sschmid commented Sep 4, 2023

@synthetic-w the exception can happen when the Jenny.properties file is invalid due to wrong syntax. If you can post it we see where the problem is

@GRESHNIK512
Copy link

GRESHNIK512 commented Nov 16, 2023

Downloaded the project Match One on mac Unity 2022.3.13.f1 and 2021 I get an error when generating:

Unable to load shared library 'hostfxr' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libhostfxr, 1): image not found

@wes-kay
Copy link

wes-kay commented Nov 18, 2023

If you have further issue let me know, and I'll update my post!

I've just tried to import your project through your suggestion in this thread and it's still a pain to try and get this working using the Jenny generate.
image

Are there any real resources on this new update we can actually use?

I'm currently having to run the jenny server and do a 'Generate with server', is that what I'm supposed to do? And should it take this long? Generated 23 files in 192.2 seconds

@GRESHNIK512
Copy link

GRESHNIK512 commented Nov 22, 2023

  1. Отсутствует библиотека 'hostfxr' (dotnet fatal error hostfxr.dll)
    Необходимо перейти в папке /usr (на MacOS через Переход-Переход в папке) и скопировать содержимое папки /local/share/dotnet/"нужная версия dotnet" в папку /local/lib
  2. Не может загрузить из библиотеки 'hostfxr' (Unable to load shared library 'hostfxr')
    Переместить файл libhostfxr.dylib из /usr/local/share/dotnet/host/fxr/"нужная версия" в /usr/local/share/dotnet/shared/Microsoft.NETCore.App/"нужная версия" командой

sudo cp /usr/local/share/dotnet/host/fxr/"нужная версия"/libhostfxr.dylib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/"нужная версия"

Result in my Terminal:

Marat@Marat-iMac ~ % sudo cp /usr/local/share/dotnet/host/fxr/6.0.25/libhostfxr.dylib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/6.0.25

Link: microsoft/vscode-dotnettools#120 (comment)

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

No branches or pull requests