-
Notifications
You must be signed in to change notification settings - Fork 485
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
Feature/player persistence base foundation #342
Feature/player persistence base foundation #342
Conversation
…runtime lists & associated assets)
/// this connection, meaning it will persist between scenes. | ||
/// </summary> | ||
[RequireComponent(typeof(NetworkObject))] | ||
public class BossRoomPlayer : NetworkBehaviour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"PersistentPlayer"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has since been renamed.
/// A runtime list of <see cref="BossRoomPlayer"/> objects that is populated both on clients and server. | ||
/// </summary> | ||
[CreateAssetMenu] | ||
public class BossRoomPlayerRuntimeCollection : RuntimeCollection<BossRoomPlayer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PersistentPlayerRuntimeCollection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has since been renamed.
Jira task here.
Changes:
Introduction of
PersistentPlayer
NetworkBehaviour.PersistentPlayer
will be attached to MLAPI's "Default Player Prefab" (coming in a subsequent PR) and will persist throughout scene changes for the duration of a connection.Introduction of
ScriptableObject
runtime sets, namelyPersistentPlayerRuntimeCollection
andServerCharacterRuntimeCollection
, where the former is populated on both clients and server while the latter is populated only on the server. This is will be referenced in several state prefabs, and the Player/PlayerCharacter prefabs themselves, with the goal being removing hard references between systems (eg. Players and UI).