Validate player start navigation mode
This commit is contained in:
@@ -9,6 +9,7 @@ import type { ModelInstance } from "../assets/model-instances";
|
||||
import { isModelInstanceCollisionMode } from "../assets/model-instances";
|
||||
import {
|
||||
isPlayerStartColliderMode,
|
||||
isPlayerStartNavigationMode,
|
||||
getPlayerStartColliderHeight,
|
||||
type InteractableEntity,
|
||||
type PointLightEntity,
|
||||
@@ -1152,6 +1153,17 @@ function validatePlayerStartEntity(
|
||||
);
|
||||
}
|
||||
|
||||
if (!isPlayerStartNavigationMode(entity.navigationMode)) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
"error",
|
||||
"invalid-player-start-navigation-mode",
|
||||
"Player Start navigation mode must be firstPerson or thirdPerson.",
|
||||
`${path}.navigationMode`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!isPlayerStartColliderMode(entity.collider.mode)) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
|
||||
Reference in New Issue
Block a user