/// <inheritdoc /> public PlayerEntityCreationContext([NotNull] NetworkEntityGuid entityGuid, [NotNull] PlayerEntitySessionContext sessionContext, EntityPrefab prefabType, Vector3 initialPosition, float orientation) { if (!Enum.IsDefined(typeof(EntityPrefab), prefabType)) { throw new InvalidEnumArgumentException(nameof(prefabType), (int)prefabType, typeof(EntityPrefab)); } EntityGuid = entityGuid ?? throw new ArgumentNullException(nameof(entityGuid)); SessionContext = sessionContext ?? throw new ArgumentNullException(nameof(sessionContext)); PrefabType = prefabType; InitialPosition = initialPosition; Orientation = orientation; }
/// <inheritdoc /> public PlayerSessionClaimedEventArgs([NotNull] NetworkEntityGuid entityGuid, Vector3 spawnPosition, [NotNull] PlayerEntitySessionContext sessionContext) { EntityGuid = entityGuid ?? throw new ArgumentNullException(nameof(entityGuid)); SpawnPosition = spawnPosition; SessionContext = sessionContext ?? throw new ArgumentNullException(nameof(sessionContext)); }
/// <inheritdoc /> public PlayerEntityEnterWorldCreationContext([NotNull] PlayerEntitySessionContext sessionContext, Vector3 spawnPosition) { SessionContext = sessionContext ?? throw new ArgumentNullException(nameof(sessionContext)); SpawnPosition = spawnPosition; }