-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversations and API refactor #108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/inworld-ai/inworld-unreal-sdk into inworld-base-uobjects-interfaces
Add InworldSessionComponent to GameState if none exist
…/inworld-ai/inworld-unreal-sdk into inworld-base-uobjects-interfaces
…orld-ai/inworld-unreal-sdk into conversations-refactor-merge
Add configuration to Inworld Session Component
Forward connection state over rep fixup nodes to use SessionComponent for ease of use
art-vozniuk
approved these changes
May 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
InworldClient
Convert from struct to UObject. Unreal structs cannot have UFUNCTION. Enables the ability to directly interface with raw API if desired in BP/CPP, or make custom implementation of wrapper that interfaces with UInworldClient.
InworldSession/InworldPlayer/InworldCharacter
There's a bit of logic that will remain consistent across various implementations of using Unreal SDK. It is encouraged to use the provided default components, but these separate objects with their interface makes it easier to pick and choose the provided classes if desired.
These uobjects will replicate out of the box as long as they have a replicated outer AActor in their ownership hierarchy. No need to maintain replicated variables on custom components, simply bind to events fired by OnReps. This uses Subobject replication, similar to Epic's Gameplay Ability System.
Owner Interfaces
Create an interface for each Session/Player/Character that promises functionality required by the UObject. The outer object that implements this interface is responsible for the lifecycle of the object.
For example, the InworldCharacterComponent is an Owner of InworldCharacter. It is responsible for creating the object, replicating the object, registering the InworldCharacter to a Session, etc.
InworldSessionComponent
Equivalent of the InworldCharacterComponent/InworldPlayerComponent, but for InworldSession. In order to be replicated, the InworldSession must have a replicated outer. This is not possible with the subsystem. Also, to use seamless travel, WorldSubsystems are shutdown between. Using a component on an actor enables the transfer of the session between worlds without needing to save/stop/load the session.
Currently, the Actor populates the InworldApiSubsystem with its InworldSession for backwards compatibility.
By default, if the InworldApiSubsystem finds itself without a session at beginplay, one will be created for backwards compatibility with using InworldApi directly.
We will also need the ability to enable client-side sessions in multi-player. Although this is not yet supported, it will be feasible with these changes by simply creating a session on the client, and registering characters to this client-side session.