Comments (2)
Hi,
Thanks for you quick answer.
However, a point has been brought up a few times that making an Actor survive the transition between Levels is difficult
I don't think switching from Actor to Component would solve that issue. AFAIK, only the Game Instance (and associated subsystems) are persistent between levels, and those don't accept components (as they aren't actors).
But again, would probably break all existing projects and require them a lot of refactoring? I don't suppose there's a way to make it both Actor and ActorComponent without almost total code duplication?
That's why I suggested keeping the ATcpSocketConnection
with its existing interface, but changing the implementation to instead rely on a component that actually has the features (with more or less the same interface). That way, all existing implementation using the actor should still work, but the TCP features would also be available as a component.
However, if we actually want to solve the lifetime issue, it would be a bit more complex than that; because as mentioned above, neither actor nor component can survive level transition. An idea could be to move the TCP features to a game instance (or engine) subsystem, and have both the TCP actor and component using the underlying TCP subsystem. That way, users could choose between actors (traditional), components (modular) or subsystem (persistent) to do their TCP communication.
But that would add way too much complexity to a plugin that shines by being simple and just working. So I think neither this nor the "proxy actor with TCP component" are great ideas. I'll go ahead with the component change on my fork, but I won't make a PR for it, as it'll bring changes that don't actually fix the most common user issue (lifetime).
Thanks again for your answer and your work.
from ue4tcpsocketplugin.
Hey,
I haven't worked with UE4 in many years, so I don't know if I had any reasons to make it an Actor. Probably for the simplicity of just throwing an Actor into the scene. I don't think the conceptual difference between an Actor and an ActorComponent or SceneComponent is significant enough on its own to introduce the change, because I don't want to introduce breaking changes to existing projects for very little benefit. It's already hard enough to keep projects up to date with UE versions without plugins breaking down on you.
However, a point has been brought up a few times that making an Actor survive the transition between Levels is difficult. I wonder if making it an ActorComponent and attaching it to an Actor that survives the transition, such as PlayerState, would make the connection survive as well? (I'm writing this purely speculatively, as I don't remember what actors survive a level transition, if any. It's been a long time.)
If ActorComponents have an easier time surviving level transitions, then it'd be something interesting. But again, would probably break all existing projects and require them a lot of refactoring? I don't suppose there's a way to make it both Actor and ActorComponent without almost total code duplication?
from ue4tcpsocketplugin.
Related Issues (20)
- UE4 Crash when executing the game. HOT 2
- Messages being joined HOT 2
- Failing to connect to server HOT 4
- Binaries folder consume lots of memory HOT 1
- Header or queries parameters HOT 1
- UE5.0 compatibility HOT 6
- Connecting with my custom TCP server HOT 1
- How to listen and receive data from server? HOT 2
- Need a release for 4.24 HOT 1
- ConnectionId has bug? HOT 3
- 5.2 HOT 1
- Received message data is not returned as complete HOT 2
- Connection problem
- Persistent connection through level HOT 4
- An explicit Category specifier is required HOT 1
- ck cashing HOT 2
- About TCP server api HOT 1
- Error When Using With HoloLens Project HOT 4
- Set SOCKET Options in Plugin HOT 2
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 ue4tcpsocketplugin.