Coder Social home page Coder Social logo

Comments (14)

sschmid avatar sschmid commented on May 1, 2024

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.

Roms6 avatar Roms6 commented on May 1, 2024

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.

ForgeMistress avatar ForgeMistress commented on May 1, 2024

You could always create a separate interface with your properties defined then refer to the component by that interface if you wanted.

from entitas.

sschmid avatar sschmid commented on May 1, 2024

I'll reenable support for properties in the next version

from entitas.

sschmid avatar sschmid commented on May 1, 2024

@Roms6 Read-Write properties are now supported in Entitas 0.29.0

Please let me know if it works for you now.

from entitas.

Roms6 avatar Roms6 commented on May 1, 2024

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.

sschmid avatar sschmid commented on May 1, 2024

My bad... I saw the TypeReflectionProvider is not updated yet... sorry :) I'll update it!

from entitas.

sschmid avatar sschmid commented on May 1, 2024

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.

Roms6 avatar Roms6 commented on May 1, 2024

It works like a charm. Thank you very much :)

from entitas.

sschmid avatar sschmid commented on May 1, 2024

Awesome! You're welcome :)

from entitas.

Roms6 avatar Roms6 commented on May 1, 2024

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.

sschmid avatar sschmid commented on May 1, 2024

You are right. I will reopen this issue to remind me to fix that.

from entitas.

sschmid avatar sschmid commented on May 1, 2024

Hey! Should work now in release 0.29.1

Updated VisualDebugging and CodeGenerator

from entitas.

Roms6 avatar Roms6 commented on May 1, 2024

Thank you, I just updated it and everything seems perfect :)

from entitas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.