miwarnec / DOTSNET

Public DOTSNET issue tracker
20 stars 0 forks source link

Entity names are lost in the client world #29

Closed joshfix closed 3 years ago

joshfix commented 4 years ago

Is your feature request related to a problem? Please describe. No. I am currently building a visualization tool where I will only spawn a fixed number of entities. On the server, I give these specific names that reflect their real-world names and that's great. On the client, I just get hundreds of entities all named after the prefab it was originally spawned from.

Describe the solution you'd like To preserve entity names on the client.

Describe alternatives you've considered I actually don't understand how/why/when I would NEED to access the entity names on the client for any type of in-game logic. I'm guessing that's actually a bad solution, and I should be using a component for that. However, when I'm developing/debugging and I'm inspecting the client's entities in the entity debugger, it would be really great if I could find the specific named entity I am looking for in the list so I can inspect the component values as it's updating.

LuisEGomezV commented 3 years ago

Are you talking about synchronizing the Entity name, set by "EntityManager.SetName()" ?

joshfix commented 3 years ago

That is correct.

LuisEGomezV commented 3 years ago

Are you aware that the Entity name only exists in the Editor, and for debugging purposes, right?

LuisEGomezV commented 3 years ago

I mean, if you need an actual "name" field, you could just add a component for it. And sync it like any other field, with a NetworkMessage. Maybe I'm missing something haha, but I don't understand why DOTSNET should be in charge of this.

joshfix commented 3 years ago

I think I stated in the original ticket that I was requesting it for debugging purposes. In the server world, I see my list of named entities. In the client world, I see the same prefab name listed over and over. DOTSNET is taking the entities from the server world and putting them into the client world, and losing the name in the process. That is why I would assume DOTSNET is in charge of it.

LuisEGomezV commented 3 years ago

Ok, seems valid. Sorry I missed the part where you stated that was for debugging purposes (everything else made me think like you were building logic on top of EntityManager.SetName, and I just wanted to prevent you from doing that). I kinda disagree with all this, but maybe ends up being a useful feature.

miwarnec commented 3 years ago

yep, sadly only available in Editor. well, going to close the issue because it's not really a dotsnet bug and there are plenty of other open ones to look at. might get back to it when I have time to add features again :)