Browse Source

场景整理导出AB包

develop
杨栋梁 2 years ago
parent
commit
14e66f473a
  1. 6
      .vsconfig
  2. 6731
      Assets/30WanWeiShengWu/WanWeiShengWu.prefab
  3. 8
      Assets/BuildingScene.meta
  4. 451
      Assets/BuildingScene.unity
  5. 2
      Assets/BuildingScene.unity.meta
  6. BIN
      Assets/BuildingScene/NavMesh-Car.asset
  7. 8
      Assets/BuildingScene/NavMesh-Car.asset.meta
  8. BIN
      Assets/BuildingScene/NavMesh-Man.asset
  9. 8
      Assets/BuildingScene/NavMesh-Man.asset.meta
  10. 8
      Assets/MscPublic2.meta
  11. 8
      Assets/StreamingAssets.meta
  12. 8
      Assets/StreamingAssets/AssetBundles.meta
  13. 8
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB.meta
  14. BIN
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB
  15. 7
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB.manifest
  16. 7
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB.manifest.meta
  17. 7
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB.meta
  18. BIN
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene
  19. 74
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene.manifest
  20. 7
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene.manifest.meta
  21. 7
      Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene.meta
  22. 8
      Assets/Tool.meta
  23. 8
      Assets/Tool/Editor.meta
  24. 544
      Assets/Tool/Editor/SceneTool.cs
  25. 11
      Assets/Tool/Editor/SceneTool.cs.meta

6
.vsconfig

@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

6731
Assets/30WanWeiShengWu/WanWeiShengWu.prefab

File diff suppressed because it is too large Load Diff

8
Assets/BuildingScene.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 89fa00787f44eff4d9d3877a3e16e08d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

451
Assets/BuildingScene.unity

@ -112,6 +112,457 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &704398955
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 704398956}
m_Layer: 0
m_Name: EvacuatePoints
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &704398956
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 704398955}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1330558374}
- {fileID: 1625425589}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1207013892
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1207013894}
- component: {fileID: 1207013893}
m_Layer: 0
m_Name: TeamTargetParent
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1207013893
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1207013892}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c03a1a14af66ddc4b9f0f18b89b0d053, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1207013894
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1207013892}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1330558373
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1330558374}
- component: {fileID: 1330558378}
- component: {fileID: 1330558377}
- component: {fileID: 1330558376}
- component: {fileID: 1330558375}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1330558374
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1330558373}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 62.8, y: 0, z: 264.7}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 704398956}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1330558375
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1330558373}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 49a6ba4f46ec21b4c8a83dce618eda97, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!65 &1330558376
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1330558373}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 0
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1330558377
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1330558373}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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
--- !u!33 &1330558378
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1330558373}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1368959077
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1368959079}
- component: {fileID: 1368959078}
m_Layer: 0
m_Name: Car
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1368959078
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368959077}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a5ac11cc976e418e8d13136b07e1f52, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AgentTypeID: -1372625422
m_CollectObjects: 0
m_Size: {x: 10, y: 10, z: 10}
m_Center: {x: 0, y: 2, z: 0}
m_LayerMask:
serializedVersion: 2
m_Bits: 32768
m_UseGeometry: 0
m_DefaultArea: 0
m_IgnoreNavMeshAgent: 1
m_IgnoreNavMeshObstacle: 1
m_OverrideTileSize: 0
m_TileSize: 256
m_OverrideVoxelSize: 0
m_VoxelSize: 0.1
m_BuildHeightMesh: 0
m_NavMeshData: {fileID: 23800000, guid: df1725f47b5255242bd32e779f35c608, type: 2}
--- !u!4 &1368959079
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368959077}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1625425588
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1625425589}
- component: {fileID: 1625425593}
- component: {fileID: 1625425592}
- component: {fileID: 1625425591}
- component: {fileID: 1625425590}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1625425589
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1625425588}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -267.8, y: 0, z: -56.4}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 704398956}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1625425590
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1625425588}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 49a6ba4f46ec21b4c8a83dce618eda97, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!65 &1625425591
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1625425588}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 0
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1625425592
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1625425588}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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
--- !u!33 &1625425593
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1625425588}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1729849515
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1729849517}
- component: {fileID: 1729849516}
m_Layer: 0
m_Name: GetAreaTargetManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1729849516
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729849515}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e01c388cf4175aa49b4973deb437d754, type: 3}
m_Name:
m_EditorClassIdentifier:
cameraInitPos: {x: -9.38, y: 0, z: 112.4578}
initDis: 120
init_X: 210.2
init_Y: 20
children: []
--- !u!4 &1729849517
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729849515}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2100948121
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2100948123}
- component: {fileID: 2100948122}
m_Layer: 0
m_Name: Man
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2100948122
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2100948121}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a5ac11cc976e418e8d13136b07e1f52, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AgentTypeID: 0
m_CollectObjects: 0
m_Size: {x: 10, y: 10, z: 10}
m_Center: {x: 0, y: 2, z: 0}
m_LayerMask:
serializedVersion: 2
m_Bits: 98304
m_UseGeometry: 0
m_DefaultArea: 0
m_IgnoreNavMeshAgent: 1
m_IgnoreNavMeshObstacle: 1
m_OverrideTileSize: 0
m_TileSize: 256
m_OverrideVoxelSize: 0
m_VoxelSize: 0.07666667
m_BuildHeightMesh: 0
m_NavMeshData: {fileID: 23800000, guid: efc2ad9148c56184b92a0f52e7d593ff, type: 2}
--- !u!4 &2100948123
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2100948121}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2554013191123863033
PrefabInstance:
m_ObjectHideFlags: 0

2
Assets/BuildingScene.unity.meta

@ -3,5 +3,5 @@ guid: 077afb36e9c74b843ad7bb8345a0ff22
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleName: buildingscene
assetBundleVariant:

BIN
Assets/BuildingScene/NavMesh-Car.asset

Binary file not shown.

8
Assets/BuildingScene/NavMesh-Car.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: df1725f47b5255242bd32e779f35c608
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 23800000
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/BuildingScene/NavMesh-Man.asset

Binary file not shown.

8
Assets/BuildingScene/NavMesh-Man.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: efc2ad9148c56184b92a0f52e7d593ff
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 23800000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/MscPublic2.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e461da297b7929b49b2ebd18af9272d5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/StreamingAssets.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 18bd83e7ead479445b941b6b734cf7df
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/StreamingAssets/AssetBundles.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a293b0a451b174e4fb394291c249f14c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: befb203dd6eb99844be9c8187f30c743
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB

Binary file not shown.

7
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB.manifest

@ -0,0 +1,7 @@
ManifestFileVersion: 0
CRC: 3827883197
AssetBundleManifest:
AssetBundleInfos:
Info_0:
Name: buildingscene
Dependencies: {}

7
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB.manifest.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6433baba71ee5724fb554d1c8d4ac980
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/WanWeiShengWuAB.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8d02802fdbd3b204baf2760daa7da221
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene

Binary file not shown.

74
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene.manifest

@ -0,0 +1,74 @@
ManifestFileVersion: 0
CRC: 469771162
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: d2a26bd5f67192cd3eaa7c1929de0b32
TypeTreeHash:
serializedVersion: 2
Hash: 2353adc51596df781e9743e4c602a23e
HashAppended: 0
ClassTypes:
- Class: 1
Script: {instanceID: 0}
- Class: 4
Script: {instanceID: 0}
- Class: 21
Script: {instanceID: 0}
- Class: 23
Script: {instanceID: 0}
- Class: 28
Script: {instanceID: 0}
- Class: 33
Script: {instanceID: 0}
- Class: 43
Script: {instanceID: 0}
- Class: 48
Script: {instanceID: 0}
- Class: 64
Script: {instanceID: 0}
- Class: 65
Script: {instanceID: 0}
- Class: 89
Script: {instanceID: 0}
- Class: 104
Script: {instanceID: 0}
- Class: 108
Script: {instanceID: 0}
- Class: 114
Script: {fileID: 11500000, guid: 1e3fdca004f2d45fe8abbed571a8abd5, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: a30477d3d23f2bc4a8924ffb4b1b7e62, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: c03a1a14af66ddc4b9f0f18b89b0d053, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: 0b9c305761a78ca41b5f94428fa22b82, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: 7a5ac11cc976e418e8d13136b07e1f52, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: e01c388cf4175aa49b4973deb437d754, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: b8b046bc0ab99e94cb2c70fd441b8fc7, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: 138657bd20cc99148b95741de3a954f1, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: 4302e11eb254e4548aed561b2bbc99d4, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: b133d14efd54f9841a1659ef37479be7, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: c6c3bcee76738264da0b700ac7402719, type: 3}
- Class: 114
Script: {fileID: 11500000, guid: 49a6ba4f46ec21b4c8a83dce618eda97, type: 3}
- Class: 115
Script: {instanceID: 0}
- Class: 123
Script: {instanceID: 0}
- Class: 157
Script: {instanceID: 0}
- Class: 238
Script: {instanceID: 0}
- Class: 258
Script: {instanceID: 0}
Assets:
- Assets/BuildingScene.unity
Dependencies: []

7
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene.manifest.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: df0b1594e4fba9b44a2027b725f2a052
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
Assets/StreamingAssets/AssetBundles/WanWeiShengWuAB/buildingscene.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f2cd7615ccc2c9a40b4422c191d2d4a2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Tool.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b91d69e07d78d4043a1d30ae549897ca
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Tool/Editor.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 395078d1b843b504ab133c23e82e252e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

544
Assets/Tool/Editor/SceneTool.cs

@ -0,0 +1,544 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.AI;
using System.IO;
using System.Text;
using System;
public class SceneTool
{
[MenuItem("SceneTool/SetFloorMessage")]//添加FloorMessage脚本绑定楼层信息
public static void SetFloorMessage()
{
Transform neiParent = GameObject.Find("shinei").transform.GetChild(0);
for (int i = 0; i < neiParent.childCount; i++)
{
//Debug.Log(neiParent.GetChild(i).name);
if (!neiParent.GetChild(i).GetComponent<FloorMessage>())
{
neiParent.GetChild(i).gameObject.AddComponent<FloorMessage>();
}
FloorMessage msg = neiParent.GetChild(i).GetComponent<FloorMessage>();
msg.targetTrans = GetTarget(neiParent.GetChild(i));
msg.buildNum = neiParent.name;
if (!neiParent.GetChild(i).name.ToLower().Contains("m"))
{
string floornum = neiParent.GetChild(i).name.Substring
(neiParent.GetChild(i).name.ToLower().IndexOf("nei") + 3, neiParent.GetChild(i).name.Length - 3);
msg.floorNum = int.Parse(floornum);
msg.interlayerNum = 0;
}
else
{
msg.floorNum = int.Parse(neiParent.GetChild(i).name.Substring
(neiParent.GetChild(i).name.ToLower().IndexOf("nei") + 3, neiParent.GetChild(i).name.ToLower().IndexOf("m")
- neiParent.GetChild(i).name.ToLower().IndexOf("nei") - 3));
msg.interlayerNum = int.Parse(neiParent.GetChild(i).name.Substring
(neiParent.GetChild(i).name.ToLower().IndexOf("m") + 1, neiParent.GetChild(i).name.Length -
neiParent.GetChild(i).name.ToLower().IndexOf("m") - 1));
}
}
Transform waiParent = GameObject.Find("shiwai").transform.GetChild(0);
for (int i = 0; i < waiParent.childCount; i++)
{
//Debug.Log(waiParent.GetChild(i).name);
if (!waiParent.GetChild(i).GetComponent<FloorMessage>())
{
waiParent.GetChild(i).gameObject.AddComponent<FloorMessage>();
}
FloorMessage msg = waiParent.GetChild(i).GetComponent<FloorMessage>();
msg.buildNum = waiParent.name;
if (!waiParent.GetChild(i).name.ToLower().Contains("m"))
{
string floornum = waiParent.GetChild(i).name.Substring
(waiParent.GetChild(i).name.ToLower().IndexOf("wai") + 3, waiParent.GetChild(i).name.Length - 3);
msg.floorNum = int.Parse(floornum);
msg.interlayerNum = 0;
}
else
{
msg.floorNum = int.Parse(waiParent.GetChild(i).name.Substring
(waiParent.GetChild(i).name.ToLower().IndexOf("wai") + 3, waiParent.GetChild(i).name.ToLower().IndexOf("m")
- waiParent.GetChild(i).name.ToLower().IndexOf("wai") - 3));
msg.interlayerNum = int.Parse(waiParent.GetChild(i).name.Substring
(waiParent.GetChild(i).name.ToLower().IndexOf("m") + 1, waiParent.GetChild(i).name.Length -
waiParent.GetChild(i).name.ToLower().IndexOf("m") - 1));
}
}
}
static Transform GetTarget(Transform parent)
{
for (int i = 0; i < parent.childCount; i++)
{
if (parent.GetChild(i).name.ToLower().Contains("_floor")
|| parent.GetChild(i).name.ToLower().Contains("-floor")
)
{
return parent.GetChild(i);
}
}
return parent;
}
[MenuItem("SceneTool/Setshinei")]//添加寻路层(选中shinei对象设置,注:扶梯情况特殊没有包含)
public static void SetShiNei()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Deep);
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
if ((obj[i].name.ToLower().Contains("floor") ||//地面
obj[i].name.ToLower().Contains("lt") ||
obj[i].name.ToLower().Contains("chedao") ||
obj[i].name.ToLower().Contains("ft")) && !obj[i].name.ToLower().Contains("ltcs"))
{
obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad");
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<PathFindable>())
{
obj[i].gameObject.AddComponent<PathFindable>();
}
if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>())
{
obj[i].gameObject.AddComponent<CloneGameObjInfo>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.ShiNeiMan;
if (obj[i].GetComponentInParent<FloorMessage>())
{
FloorMessage fmg = obj[i].GetComponentInParent<FloorMessage>();
obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.StaticGameObject;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum;
}
}
if (obj[i].name.ToLower().Contains("wall") ||//墙面
obj[i].name.ToLower().Contains("zhuzi"))
{
obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad");
if (!obj[i].gameObject.GetComponent<NavMeshModifier>())
{
obj[i].gameObject.AddComponent<NavMeshModifier>();
}
NavMeshModifier mod = obj[i].gameObject.GetComponent<NavMeshModifier>();
mod.overrideArea = true;
mod.area = 1;
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
}
}
}
}
[MenuItem("SceneTool/SetshineiXHS")]//设置室内消火栓属性
public static void SetSNXHS()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Deep);
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].name.ToLower().Contains("xhs") &&
obj[i].GetComponent<MeshRenderer>())
{
if (!obj[i].gameObject.GetComponent<BoxCollider>())
{
obj[i].gameObject.AddComponent<BoxCollider>();
}
if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>())
{
obj[i].gameObject.AddComponent<CloneGameObjInfo>();
}
obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.IndoorFireHydrant;
if (!obj[i].gameObject.GetComponent<InDoorHydrantMessage>())
{
obj[i].gameObject.AddComponent<InDoorHydrantMessage>();
}
if (!obj[i].gameObject.GetComponent<WaterSource>())
{
obj[i].gameObject.AddComponent<WaterSource>();
}
if (obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjID == 0)
{
long staticGameObjId = (long)GUID.NewGuid(1, 1);
obj[i].gameObject.GetComponent<CloneGameObjInfo>().SetGameObjID(staticGameObjId);
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.ShiNeiXHS;
if (obj[i].GetComponentInParent<FloorMessage>())
{
FloorMessage fmg = obj[i].GetComponentInParent<FloorMessage>();
obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum;
}
}
}
}
[MenuItem("SceneTool/DiXiaLouDing/CheNengZou")]//地面的楼顶(车能走),常见为地下建筑上的公路
public static void DiXiaLouDingCheNengZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("CarRoad");
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<PathFindable>())
{
obj[i].gameObject.AddComponent<PathFindable>();
}
if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>())
{
obj[i].gameObject.AddComponent<CloneGameObjInfo>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.ShiWaiCar;
if (obj[i].GetComponentInParent<FloorMessage>())
{
FloorMessage fmg = obj[i].GetComponentInParent<FloorMessage>();
obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.StaticGameObject;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().SpecialTag = "楼顶";
}
}
}
}
}
[MenuItem("SceneTool/DiXiaLouDing/RenNengZou")]//地面的楼顶(人能走),常见为地下建筑上的小路
public static void DiXiaLouDingRenNengZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad");
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<PathFindable>())
{
obj[i].gameObject.AddComponent<PathFindable>();
}
if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>())
{
obj[i].gameObject.AddComponent<CloneGameObjInfo>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.ShiWaiMan;
if (obj[i].GetComponentInParent<FloorMessage>())
{
FloorMessage fmg = obj[i].GetComponentInParent<FloorMessage>();
obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.StaticGameObject;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().SpecialTag = "楼顶";
}
}
}
}
}
[MenuItem("SceneTool/DiXiaLouDing/DouBuZou")]//地面的楼顶(都不能走),常见为地下建筑上的花坛
public static void DiXiaLouDingDouBuZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("CarRoad");
if (!obj[i].gameObject.GetComponent<NavMeshModifier>())
{
obj[i].gameObject.AddComponent<NavMeshModifier>();
}
NavMeshModifier mod = obj[i].gameObject.GetComponent<NavMeshModifier>();
mod.overrideArea = true;
mod.area = 1;
}
}
}
}
[MenuItem("SceneTool/PuTongLouDing/RenNengZou")]//普通的楼顶(人能走),常见为地上建筑的楼顶地板
public static void PuTongLouDingRenNengZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad");
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<PathFindable>())
{
obj[i].gameObject.AddComponent<PathFindable>();
}
if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>())
{
obj[i].gameObject.AddComponent<CloneGameObjInfo>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.LouDing;
if (obj[i].GetComponentInParent<FloorMessage>())
{
FloorMessage fmg = obj[i].GetComponentInParent<FloorMessage>();
obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.StaticGameObject;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum;
obj[i].gameObject.GetComponent<CloneGameObjInfo>().SpecialTag = "楼顶";
}
}
}
}
}
[MenuItem("SceneTool/PuTongLouDing/DouBuZou")]//普通的楼顶(都不能走)
public static void PuTongLouDingDouBuZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad");
if (!obj[i].gameObject.GetComponent<NavMeshModifier>())
{
obj[i].gameObject.AddComponent<NavMeshModifier>();
}
NavMeshModifier mod = obj[i].gameObject.GetComponent<NavMeshModifier>();
mod.overrideArea = true;
mod.area = 1;
}
}
}
}
[MenuItem("SceneTool/ShiWai/CheNengZou")]//地面(车能走),常见为公路
public static void ShiWaiCheNengZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("CarRoad");
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<PathFindable>())
{
obj[i].gameObject.AddComponent<PathFindable>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.ShiWaiCar;
}
}
}
}
[MenuItem("SceneTool/ShiWai/RenNengZou")]//地面(人能走),常见为小路
public static void ShiWaiRenNengZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad");
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<PathFindable>())
{
obj[i].gameObject.AddComponent<PathFindable>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.ShiWaiMan;
}
}
}
}
[MenuItem("SceneTool/ShiWai/DouBuZou")]//地面(都不能走),常见为花坛
public static void ShiWaiDouBuZou()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
obj[i].gameObject.layer = LayerMask.NameToLayer("CarRoad");
if (!obj[i].gameObject.GetComponent<NavMeshModifier>())
{
obj[i].gameObject.AddComponent<NavMeshModifier>();
}
NavMeshModifier mod = obj[i].gameObject.GetComponent<NavMeshModifier>();
mod.overrideArea = true;
mod.area = 1;
}
}
}
}
[MenuItem("SceneTool/TeShu/YouGuanDing")]//油罐顶
public static void YouGuanDing()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.YouGuanDing;
}
}
}
}
[MenuItem("SceneTool/TeShu/YouGuanBi")]//油罐壁
public static void YouGuanBi()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.YouGuanBi;
}
}
}
}
[MenuItem("SceneTool/TeShu/WeiXianPinYunShuChe")]//危险运输车
public static void WeiXianPinYunShuChe()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered);
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].GetComponent<MeshRenderer>())
{
if (!obj[i].gameObject.GetComponent<MeshCollider>())
{
obj[i].gameObject.AddComponent<MeshCollider>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneEnumsHelp>())
{
obj[i].gameObject.AddComponent<CloneEnumsHelp>();
}
CloneEnumsHelp cloneEnumsHelp = obj[i].gameObject.GetComponent<CloneEnumsHelp>();
cloneEnumsHelp.cloneOnFloorType = CloneOnFloorType.WeiXianPinYunShuChe;
}
}
}
}
}

11
Assets/Tool/Editor/SceneTool.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 480927d3e866cd840af0bdda984ded96
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save