This commit is contained in:
1 parent
cc6acb188d
commit
9f95ba3082
24 files changed
+891
-78
No files matched your search
@@ -11,7 +11,7 @@ use scene::{document::SceneDocument, strip_schema_version, validate_level_text};
|
||||
use serde::de::DeserializeSeed;
|
||||
use shared::{
|
||||
flush_level_object_hydration, infer_actor_kind, strip_hydrated_entity, validate_actor, ActorId,
|
||||
ActorKind, ActorName, ActorValidationError, ColliderDesc, EditorVisibility,
|
||||
ActorKind, ActorName, ActorValidationError, BrushDesc, ColliderDesc, EditorVisibility,
|
||||
HierarchySiblingIndex, InspectorOrder, LevelObject, LightDesc, MaterialDesc, MaterialOverride,
|
||||
ModelRef, ObjectiveMarker, PhysicsBody, PlayerSpawn, PostProcessVolumeDesc, PrefabInstance,
|
||||
PrefabRef, Primitive, RigidBodyDesc, StaticMeshRenderer, TeamSpawn, TriggerVolume, WeaponSpawn,
|
||||
@@ -389,6 +389,21 @@ fn format_actor_validation(err: ActorValidationError) -> String {
|
||||
ActorValidationError::MissingTransform => {
|
||||
"Save failed: level object missing Transform".into()
|
||||
}
|
||||
ActorValidationError::BrushMissingDesc => {
|
||||
"Save failed: Brush actor requires BrushDesc".into()
|
||||
}
|
||||
ActorValidationError::BrushHasPrimitive => {
|
||||
"Save failed: Brush actor cannot have Primitive".into()
|
||||
}
|
||||
ActorValidationError::BrushHasStaticMeshRenderer => {
|
||||
"Save failed: Brush actor cannot have StaticMeshRenderer".into()
|
||||
}
|
||||
ActorValidationError::BrushHasLight => {
|
||||
"Save failed: Brush actor cannot have LightDesc".into()
|
||||
}
|
||||
ActorValidationError::BrushHasModelRef => {
|
||||
"Save failed: Brush actor cannot have ModelRef".into()
|
||||
}
|
||||
ActorValidationError::StaticMeshMissingPrimitive => {
|
||||
"Save failed: StaticMesh actor requires Primitive or StaticMeshRenderer with a mesh slot"
|
||||
.into()
|
||||
@@ -462,6 +477,7 @@ fn save_entities(world: &mut World, path: &Path, entities: Vec<Entity>) -> Resul
|
||||
.allow_component::<ActorKind>()
|
||||
.allow_component::<InspectorOrder>()
|
||||
.allow_component::<Primitive>()
|
||||
.allow_component::<BrushDesc>()
|
||||
.allow_component::<StaticMeshRenderer>()
|
||||
.allow_component::<MaterialDesc>()
|
||||
.allow_component::<MaterialOverride>()
|
||||
|
||||
Reference in new issue
Block a user