handle modules larger than 1x1, widen door size to allow walking around it
This commit is contained in:
@@ -5,6 +5,7 @@ PrefabInstance:
|
|||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Modification:
|
m_Modification:
|
||||||
|
serializedVersion: 2
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 913127997918145164, guid: 30bf75759c019b843afd4c6aeb694159,
|
- target: {fileID: 913127997918145164, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
@@ -12,6 +13,26 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Generic Door Entrance
|
value: Generic Door Entrance
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1823695629757333073, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 94d63268ac1ac034d8c0af72dd04a346, type: 2}
|
||||||
|
- target: {fileID: 2697478118666722512, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: size.x
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2697478118666722512, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: size.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4139350260725193015, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 94d63268ac1ac034d8c0af72dd04a346, type: 2}
|
||||||
- target: {fileID: 4775571204437220950, guid: 30bf75759c019b843afd4c6aeb694159,
|
- target: {fileID: 4775571204437220950, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
@@ -72,10 +93,21 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6067040365495472252, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 94d63268ac1ac034d8c0af72dd04a346, type: 2}
|
||||||
|
- target: {fileID: 6259937801360820257, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 94d63268ac1ac034d8c0af72dd04a346, type: 2}
|
||||||
- target: {fileID: 8741597917111152084, guid: 30bf75759c019b843afd4c6aeb694159,
|
- target: {fileID: 8741597917111152084, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 2100000, guid: 94d63268ac1ac034d8c0af72dd04a346, type: 2}
|
objectReference: {fileID: 2100000, guid: 94d63268ac1ac034d8c0af72dd04a346, type: 2}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 30bf75759c019b843afd4c6aeb694159, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 30bf75759c019b843afd4c6aeb694159, type: 3}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ PrefabInstance:
|
|||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Modification:
|
m_Modification:
|
||||||
|
serializedVersion: 2
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 913127997918145164, guid: 30bf75759c019b843afd4c6aeb694159,
|
- target: {fileID: 913127997918145164, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
@@ -12,6 +13,26 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Generic Door Exit
|
value: Generic Door Exit
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1823695629757333073, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 3e334d6799a0d0040a41fe4794da90f5, type: 2}
|
||||||
|
- target: {fileID: 2697478118666722512, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: size.x
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2697478118666722512, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: size.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4139350260725193015, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 3e334d6799a0d0040a41fe4794da90f5, type: 2}
|
||||||
- target: {fileID: 4775571204437220950, guid: 30bf75759c019b843afd4c6aeb694159,
|
- target: {fileID: 4775571204437220950, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
@@ -72,10 +93,21 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6067040365495472252, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 3e334d6799a0d0040a41fe4794da90f5, type: 2}
|
||||||
|
- target: {fileID: 6259937801360820257, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 3e334d6799a0d0040a41fe4794da90f5, type: 2}
|
||||||
- target: {fileID: 8741597917111152084, guid: 30bf75759c019b843afd4c6aeb694159,
|
- target: {fileID: 8741597917111152084, guid: 30bf75759c019b843afd4c6aeb694159,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 2100000, guid: 3e334d6799a0d0040a41fe4794da90f5, type: 2}
|
objectReference: {fileID: 2100000, guid: 3e334d6799a0d0040a41fe4794da90f5, type: 2}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 30bf75759c019b843afd4c6aeb694159, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 30bf75759c019b843afd4c6aeb694159, type: 3}
|
||||||
|
|||||||
@@ -1,10 +1,399 @@
|
|||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1913834045633648974
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4111078790584261234}
|
||||||
|
- component: {fileID: 930567536218305092}
|
||||||
|
- component: {fileID: 4139350260725193015}
|
||||||
|
- component: {fileID: 6851462248859848297}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Bottom Left
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4111078790584261234
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1913834045633648974}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -0.45, y: 0, z: -0.45}
|
||||||
|
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6060240960858060261}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &930567536218305092
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1913834045633648974}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &4139350260725193015
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1913834045633648974}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &6851462248859848297
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1913834045633648974}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &2393410069396553260
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7573266324358532870}
|
||||||
|
- component: {fileID: 5021870322124495607}
|
||||||
|
- component: {fileID: 6259937801360820257}
|
||||||
|
- component: {fileID: 5294991032816247984}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Top Right
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7573266324358532870
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2393410069396553260}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1.45, y: 0, z: 0.45}
|
||||||
|
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6060240960858060261}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &5021870322124495607
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2393410069396553260}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &6259937801360820257
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2393410069396553260}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &5294991032816247984
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2393410069396553260}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &3378197021456377203
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8723730948981272237}
|
||||||
|
- component: {fileID: 5404148238049893153}
|
||||||
|
- component: {fileID: 6067040365495472252}
|
||||||
|
- component: {fileID: 7980204004685275879}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Top Left
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &8723730948981272237
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3378197021456377203}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -0.45, y: 0, z: 0.45}
|
||||||
|
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6060240960858060261}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &5404148238049893153
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3378197021456377203}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &6067040365495472252
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3378197021456377203}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &7980204004685275879
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3378197021456377203}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &5330158691791872551
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4122861465983034065}
|
||||||
|
- component: {fileID: 6871736232808740964}
|
||||||
|
- component: {fileID: 1823695629757333073}
|
||||||
|
- component: {fileID: 8902430086341030450}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Bottom Right
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4122861465983034065
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5330158691791872551}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1.45, y: 0, z: -0.45}
|
||||||
|
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6060240960858060261}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &6871736232808740964
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5330158691791872551}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &1823695629757333073
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5330158691791872551}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &8902430086341030450
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5330158691791872551}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1001 &4110777154808243535
|
--- !u!1001 &4110777154808243535
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Modification:
|
m_Modification:
|
||||||
|
serializedVersion: 2
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 3864228228344123331, guid: ad2655de8289afa40aa520f9fc474681,
|
- target: {fileID: 3864228228344123331, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
@@ -17,11 +406,21 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalScale.y
|
propertyPath: m_LocalScale.y
|
||||||
value: 2
|
value: 2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7279153380729290489, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7279153380729290489, guid: ad2655de8289afa40aa520f9fc474681,
|
- target: {fileID: 7279153380729290489, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7279153380729290489, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
- target: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
@@ -79,6 +478,23 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents:
|
m_RemovedComponents:
|
||||||
- {fileID: 4604142456167599783, guid: ad2655de8289afa40aa520f9fc474681, type: 3}
|
- {fileID: 4604142456167599783, guid: ad2655de8289afa40aa520f9fc474681, type: 3}
|
||||||
|
m_AddedGameObjects:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 4111078790584261234}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 4122861465983034065}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 8723730948981272237}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 7573266324358532870}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: ad2655de8289afa40aa520f9fc474681, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: ad2655de8289afa40aa520f9fc474681, type: 3}
|
||||||
--- !u!1 &913127997918145164 stripped
|
--- !u!1 &913127997918145164 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -98,3 +514,10 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 696181e3eda449d49d4c1c88b07d7b05, type: 3}
|
m_Script: {fileID: 11500000, guid: 696181e3eda449d49d4c1c88b07d7b05, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
size: {x: 2, y: 2}
|
||||||
|
--- !u!4 &6060240960858060261 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7860513085978939562, guid: ad2655de8289afa40aa520f9fc474681,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4110777154808243535}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
|||||||
@@ -1,47 +1,122 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System.Linq;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Range = EscapeRoomEngine.Engine.Runtime.Utilities.Range;
|
||||||
|
|
||||||
namespace EscapeRoomEngine.Engine.Runtime
|
namespace EscapeRoomEngine.Engine.Runtime
|
||||||
{
|
{
|
||||||
public struct Placement
|
public struct Placement
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The placement position is always considered to be at <c>(0.5, 0.5)</c> relative to the placement.
|
||||||
|
///
|
||||||
|
/// <example>In a placement of size <c>(1, 1)</c>, the position is at the center of the placement. In a larger placement, the position is in the center of the bottom left square meter.</example>
|
||||||
|
/// </summary>
|
||||||
public Vector3Int position;
|
public Vector3Int position;
|
||||||
public Vector2Int size;
|
public Vector2Int size;
|
||||||
public Orientation orientation;
|
public Orientation orientation;
|
||||||
|
|
||||||
/// <summary>
|
public Vector3Int BottomLeft {
|
||||||
/// Create a set with every possible combination of position and orientation given the dimensions.
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// The size of all placements will be (1, 1).
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public List<Placement> EveryPlacement
|
|
||||||
{
|
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var placements = new List<Placement>();
|
var sizeMinusOne = size - Vector2Int.one;
|
||||||
|
return orientation switch
|
||||||
for (var zIter = 0; zIter < size.y; zIter++)
|
|
||||||
{
|
{
|
||||||
for (var xIter = 0; xIter < size.x; xIter++)
|
Orientation.North => position,
|
||||||
{
|
Orientation.East => position - new Vector3Int(0, 0, sizeMinusOne.x),
|
||||||
placements.AddRange(OrientationExtensions.EveryOrientation().Select(o => new Placement
|
Orientation.South => position - new Vector3Int(sizeMinusOne.x, 0, sizeMinusOne.y),
|
||||||
{
|
Orientation.West => position - new Vector3Int(sizeMinusOne.y, 0, 0),
|
||||||
position = new Vector3Int(xIter, 0, zIter),
|
_ => throw new ArgumentOutOfRangeException()
|
||||||
size = Vector2Int.one,
|
};
|
||||||
orientation = o
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return placements;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string PositionAndOrientation() => $"{{({position.x}, {position.z}), {orientation}}}";
|
/// <summary>
|
||||||
|
/// Create a set with every possible combination of position and orientation of placements that fit in a given space.
|
||||||
|
/// The size of the placements are given by this placement.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="space">The generated placements will fit inside the placement of the given space.</param>
|
||||||
|
public List<Placement> EveryPlacementInSpace(Space space)
|
||||||
|
{
|
||||||
|
var placements = new List<Placement>();
|
||||||
|
var sizeMinusOne = size - Vector2Int.one;
|
||||||
|
var spaceSize = space.rrPlacement.size;
|
||||||
|
|
||||||
|
foreach (var o in OrientationExtensions.EveryOrientation())
|
||||||
|
{
|
||||||
|
Range x;
|
||||||
|
Range z;
|
||||||
|
|
||||||
|
switch (o)
|
||||||
|
{
|
||||||
|
case Orientation.North:
|
||||||
|
x = new Range(0, spaceSize.x - sizeMinusOne.x);
|
||||||
|
z = new Range(0, spaceSize.y - sizeMinusOne.y);
|
||||||
|
break;
|
||||||
|
case Orientation.East:
|
||||||
|
x = new Range(0, spaceSize.x - sizeMinusOne.y);
|
||||||
|
z = new Range(sizeMinusOne.x, spaceSize.y);
|
||||||
|
break;
|
||||||
|
case Orientation.South:
|
||||||
|
x = new Range(sizeMinusOne.x, spaceSize.x);
|
||||||
|
z = new Range(sizeMinusOne.y, spaceSize.y);
|
||||||
|
break;
|
||||||
|
case Orientation.West:
|
||||||
|
x = new Range(sizeMinusOne.y, spaceSize.x);
|
||||||
|
z = new Range(0, spaceSize.y - sizeMinusOne.x);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
|
||||||
|
placements.AddRange(ConstrainedPlacements(o, size, x, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
return placements;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<Placement> ConstrainedPlacements(
|
||||||
|
Orientation orientation,
|
||||||
|
Vector2Int size,
|
||||||
|
Range xRange, Range zRange)
|
||||||
|
{
|
||||||
|
var placements = new List<Placement>(xRange.Length * zRange.Length);
|
||||||
|
|
||||||
|
for (var z = zRange.min; z < zRange.max; z++)
|
||||||
|
{
|
||||||
|
for (var x = xRange.min; x < xRange.max; x++)
|
||||||
|
{
|
||||||
|
placements.Add(new Placement
|
||||||
|
{
|
||||||
|
position = new Vector3Int(x, 0, z),
|
||||||
|
size = size,
|
||||||
|
orientation = orientation
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return placements;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performs the specified action for each position inside the size of this placement.
|
||||||
|
///
|
||||||
|
/// <example>For the placement {(2, 0, 3), (1, 2), East} the action would be called twice with the parameters (2, 0, 3) and (3, 0, 3).</example>
|
||||||
|
/// </summary>
|
||||||
|
public void ForEachPosition(Action<Vector3Int> action)
|
||||||
|
{
|
||||||
|
var bottomLeft = BottomLeft;
|
||||||
|
|
||||||
|
for (var z = 0; z < (orientation is Orientation.North or Orientation.South ? size.y : size.x); z++)
|
||||||
|
{
|
||||||
|
for (var x = 0; x < (orientation is Orientation.North or Orientation.South ? size.x : size.y); x++)
|
||||||
|
{
|
||||||
|
action(bottomLeft + new Vector3Int(x, 0, z));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ToStringShort() => $"{{{position}, {orientation}}}";
|
||||||
public override string ToString() => $"{{{position}, {size}, {orientation}}}";
|
public override string ToString() => $"{{{position}, {size}, {orientation}}}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,13 +9,16 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
|
|||||||
{
|
{
|
||||||
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space)
|
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space)
|
||||||
{
|
{
|
||||||
float width = space.rrPlacement.size.x - 1;
|
float width = space.rrPlacement.size.x;
|
||||||
float length = space.rrPlacement.size.y - 1;
|
float length = space.rrPlacement.size.y;
|
||||||
|
|
||||||
candidates.RemoveAll(candidate =>
|
candidates.RemoveAll(candidate =>
|
||||||
{
|
{
|
||||||
var xRel = candidate.position.x / width;
|
var bottomLeft = candidate.BottomLeft;
|
||||||
var zRel = candidate.position.z / length;
|
var center = new Vector2(bottomLeft.x, bottomLeft.z) +
|
||||||
|
new Vector2(candidate.size.x / 2f, candidate.size.y / 2f);
|
||||||
|
var xRel = center.x / width;
|
||||||
|
var zRel = center.y / length;
|
||||||
|
|
||||||
return candidate.orientation !=
|
return candidate.orientation !=
|
||||||
(zRel > xRel
|
(zRel > xRel
|
||||||
|
|||||||
@@ -9,10 +9,22 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
|
|||||||
{
|
{
|
||||||
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space)
|
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space)
|
||||||
{
|
{
|
||||||
space.AllModules.ForEach(other =>
|
space.AllModules.ForEach(other => // for all other module ...
|
||||||
{
|
other.srPlacement.ForEachPosition(otherPosition => // ... positions ...
|
||||||
candidates.RemoveAll(candidate => candidate.position.Equals(other.SrPosition));
|
candidates.RemoveAll(candidate => // ... remove every candidate that ...
|
||||||
});
|
{
|
||||||
|
var remove = false;
|
||||||
|
|
||||||
|
candidate.ForEachPosition(position => // ... anywhere inside its bounds ...
|
||||||
|
{
|
||||||
|
if (!remove)
|
||||||
|
{
|
||||||
|
remove = position.Equals(otherPosition); // ... overlaps with other modules' position
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return remove;
|
||||||
|
})));
|
||||||
|
|
||||||
return candidates;
|
return candidates;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,17 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
|
|||||||
|
|
||||||
candidates.RemoveAll(candidate =>
|
candidates.RemoveAll(candidate =>
|
||||||
{
|
{
|
||||||
var position = candidate.position;
|
var keep = false;
|
||||||
return position.x > 0 && position.x < right && position.z > 0 && position.z < top;
|
|
||||||
|
candidate.ForEachPosition(position =>
|
||||||
|
{
|
||||||
|
if (!keep)
|
||||||
|
{
|
||||||
|
keep = position.x == 0 || position.x == right || position.z == 0 || position.z == top;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return !keep;
|
||||||
});
|
});
|
||||||
|
|
||||||
return candidates;
|
return candidates;
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
|
|||||||
}
|
}
|
||||||
|
|
||||||
var placementCandidates = Candidates(
|
var placementCandidates = Candidates(
|
||||||
space.rrPlacement.EveryPlacement,
|
module.srPlacement.EveryPlacementInSpace(space),
|
||||||
module.description.placementRequirements,
|
module.description.placementRequirements,
|
||||||
module, space);
|
module, space);
|
||||||
|
|
||||||
Logger.Log($"placement candidates: {string.Join(", ", placementCandidates.ToList().ConvertAll(c => c.PositionAndOrientation()))}", LogType.RequirementResolution);
|
Logger.Log($"placement candidates: {string.Join(", ", placementCandidates.ToList().ConvertAll(c => c.ToStringShort()))}", LogType.RequirementResolution);
|
||||||
|
|
||||||
if (placementCandidates.Count > 0)
|
if (placementCandidates.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
17
Assets/Engine/Runtime/Utilities/Range.cs
Normal file
17
Assets/Engine/Runtime/Utilities/Range.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
namespace EscapeRoomEngine.Engine.Runtime.Utilities
|
||||||
|
{
|
||||||
|
public struct Range
|
||||||
|
{
|
||||||
|
public int min, max;
|
||||||
|
|
||||||
|
public int Length => max - min;
|
||||||
|
|
||||||
|
public Range(int min, int max)
|
||||||
|
{
|
||||||
|
this.min = min;
|
||||||
|
this.max = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{{{min}, ..., {max}}}";
|
||||||
|
}
|
||||||
|
}
|
||||||
3
Assets/Engine/Runtime/Utilities/Range.cs.meta
Normal file
3
Assets/Engine/Runtime/Utilities/Range.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c02bc5b9e6d74d6eaab716d63b53a48f
|
||||||
|
timeCreated: 1669288906
|
||||||
@@ -17,6 +17,6 @@ MonoBehaviour:
|
|||||||
type: 3}
|
type: 3}
|
||||||
preconditionRequirements: []
|
preconditionRequirements: []
|
||||||
placementRequirements:
|
placementRequirements:
|
||||||
- {fileID: 11400000, guid: 43eb2a566a244964aa3a3319eaafe1a8, type: 2}
|
|
||||||
- {fileID: 11400000, guid: 1f1825b71bae09c438a1cb52603347d6, type: 2}
|
|
||||||
- {fileID: 11400000, guid: ed4830127e9381245a6af07e42c52422, type: 2}
|
- {fileID: 11400000, guid: ed4830127e9381245a6af07e42c52422, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 1f1825b71bae09c438a1cb52603347d6, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 43eb2a566a244964aa3a3319eaafe1a8, type: 2}
|
||||||
|
|||||||
Reference in New Issue
Block a user