Comments (14)
Hi, I'm glad you like it :)
The reason I removed support for properties is because you can actually hide logic in getters and setters. Components represent data only and properties could indicate sth else.
What is your use-case with NoesisGUI? Can that be solved differently?
from entitas.
Well, my current use is implementing a group of entities as a DependencyProperty. Let's say those entities are Countries. This way in my xaml file, I can easily call the DependencyProperty as an ItemsSource named Countries. I couldn't fill a ListBox more easily, let's say I want to show country names, I just need a {Binding country.Tag} (country being a CountryComponent and Tag the Property) set in a DataTemplate. If I want to show more data, I just need more bindings like this one.
For now I can see two other ways to achieve this. Due to the nature of Entitas (it's reactive), I could handle adding/updating/removing myself, that means way more lines of C# code and avoiding the binding feature. Also I could create a data Model that would mimic my components structure, except fields would be properties this time. To sum it up, it can be solved differently but it's far from convenient.
I understand why you're enforcing this rule, but a guideline should be enough, don't you think ? :)
from entitas.
You could always create a separate interface with your properties defined then refer to the component by that interface if you wanted.
from entitas.
I'll reenable support for properties in the next version
from entitas.
@Roms6 Read-Write properties are now supported in Entitas 0.29.0
Please let me know if it works for you now.
from entitas.
Hey @sschmid, thanks for reenabling this feature. I just made a quick test, and it seems the CodeGenerator is behaving the same way : properties are just ignored. I made a simple TestComponent with a string property (fully declared, not an auto-property). Edit: doesn't work when using an auto-property too.
from entitas.
My bad... I saw the TypeReflectionProvider is not updated yet... sorry :) I'll update it!
from entitas.
I fixed it. Here are the zip files, so you don't have to wait for the next release ;)
Entitas-CSharp.zip
Entitas-Unity.zip
Let me know, if it works for you now
from entitas.
It works like a charm. Thank you very much :)
from entitas.
Awesome! You're welcome :)
from entitas.
I just noticed we can't visualize / edit component properties through the Unity Editor. But I guess that's more a matter of finishing making Entitas "friendly" towards component properties.
from entitas.
You are right. I will reopen this issue to remind me to fix that.
from entitas.
Hey! Should work now in release 0.29.1
Updated VisualDebugging and CodeGenerator
from entitas.
Thank you, I just updated it and everything seems perfect :)
from entitas.
Related Issues (20)
- broken doc link HOT 2
- Wiki closed for editing
- Unity crashes when clicking on a GameObject with Component of Entitas HOT 8
- Remove DesperateDevs dependencies
- [SOLVED] Unity 2022.3.4f1: Exceptions + broken inspector when looking at any entity HOT 16
- Add/Replace/Remove vs Set/Unset HOT 5
- Boolean in setttings for unique components to actually be unique
- A component with multiple contexts +events, only make event listeners for 1 context
- Could not resolve type with token ... expected class System.Threading.CancellationToken HOT 10
- How to generate codes in a project which has several csproj files? HOT 1
- Update on Entitas 2.0-beta and my situation HOT 3
- [1.14.1]code gen twice and compile error HOT 1
- there is a Error, on click Tools/Jenny/Gennerate, how can I do? HOT 4
- _group.GetEntities().AsParallel().ForAll(Execute);这段语句有GC HOT 2
- Is it feasible to use Entitas in the backend? HOT 7
- Entity Behaviour in Unity inspector not visible HOT 2
- Removal of crucial SearchPaths when executing the wiz command
- How to get all group in some context, without reflection。
- GUI Null ref when trying to view entity in inspector HOT 1
- generator issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entitas.