Skip to content
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

Merged
merged 5 commits into from
Jun 4, 2021

Conversation

fernando-cortez
Copy link
Collaborator

@fernando-cortez fernando-cortez commented May 27, 2021

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, namely PersistentPlayerRuntimeCollection and ServerCharacterRuntimeCollection, 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).

@fernando-cortez fernando-cortez added the 1-Needs Review PR needs attention from the assignee and reviewers label May 27, 2021
/// this connection, meaning it will persist between scenes.
/// </summary>
[RequireComponent(typeof(NetworkObject))]
public class BossRoomPlayer : NetworkBehaviour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"PersistentPlayer"?

Copy link
Collaborator Author

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PersistentPlayerRuntimeCollection

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has since been renamed.

@SamuelBellomo SamuelBellomo merged commit 067bcd6 into develop Jun 4, 2021
@SamuelBellomo SamuelBellomo deleted the feature/player-persistence-base-foundation branch June 4, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-Needs Review PR needs attention from the assignee and reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants