micahosborne / uFrame

85 stars 21 forks source link

Cannot find EcsComponent in namespace Invert.uFrame.ECS #2

Open grofit opened 8 years ago

grofit commented 8 years ago

Seem to get an error when trying to build on an empty project with a single component, here were the steps:

Then got the error:

Assets/Plugins/Editor/uFrame.ECS.Editor/Components/Buffable.cs(24,48): error CS0234: The type or namespace name `EcsComponent' does not exist in the namespace `Invert.uFrame.ECS'. Are you missing an assembly reference?

I am using unity 5.3.4f and like I say it is a new project with nothing but this repo, when opening the generated code in VS it appears that the namespaces generated are wrong or have been refactored somewhere.

mkuhr commented 8 years ago

Only on Github version: Not for the Unity Asset. We have the uframeECS Architect and Editor sources so on default one of those is open.

Thats how you use it :

  1. Open any workspace and import once or the next step will not work. Basically the Dialogue has to disappear.
  2. You have to create a new database first, when you pull from Github. For that click "Database" in the lower left corner ofh the uFrame Graph Window and choose "Manage"
  3. Click on "New Empty Database". Choose a name and leave Codepath as is
  4. Create Workspace with your name
  5. Create Module with your Project Name
  6. Have fun. Create components, systems, events.....
grofit commented 8 years ago

So based upon this I would probably say it should default to not being in a DB so you start at the "Make a New Database" screen, as unless you know the tools and have read this message you will probably end up doing what I did and think "it doesn't work"

mkuhr commented 8 years ago

Easy and fast solution proposition: Change Assets\Plugins\Editor\uFrame.Editor\Systems\DatabaseService.cs

in line 65 from

var dbDirectories = Directory.GetDirectories(path,"*.db",SearchOption.AllDirectories); to var dbDirectories = Directory.GetDirectories(path,"*.db",SearchOption.TopDirectoryOnly);

Easy start for using ECS. With the normal flow that we know from the Unitypackage.

Pro Users can undo this to make the ECS Database visible in the uFrame Grapheditor to change the implementation?

grofit commented 8 years ago

I dont know the knock-on effects this would cause but as long as it makes workflow for getting started with ECS easier and error free then I would go for it.

:+1:

micahosborne commented 8 years ago

This would only allow databases to be created/used in the root directory. You really just need to create another database and ignore the ECS database. I get that might be confusing, but hey didn't you learn from it? :p

micahosborne commented 8 years ago

This would only allow databases to be created/used in the root directory. You really just need to create another database and ignore the ECS database. I get that might be confusing, but hey didn't you learn from it? :p

micahosborne commented 8 years ago

This would only allow databases to be created/used in the root directory. You really just need to create another database and ignore the ECS database. I get that might be confusing, but hey didn't you learn from it? :p

micahosborne commented 8 years ago

This would only allow databases to be created/used in the root directory. You really just need to create another database and ignore the ECS database. I get that might be confusing, but hey didn't you learn from it? :p

grofit commented 8 years ago

You are welcome to class it as closed and just put it down as a documentation step, or just ignore it completely, I am just aware that most people looking to try it will probably fall over at the first point without knowing this first.

mkuhr commented 8 years ago

I agree with grofit. Thats not user friendly enough. Too many people will just abandon it at this stage, when they are trying it out. And this first experience doesnt live up to this fantastic product.

Had to edit my "making it work" above, because you even have to open and import a workspace before manage database window shows up when you click it.

Whats wrong with having databases at the root directory for starters?

Or can you point me to a solution where i can have all Directories searched, but show the "Create New Database Window" without having to open any workspace.