场景管理
parent
3b89e03acc
commit
64e4005737
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9f658f3e28a7c9f46be1a494261d6c18
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8ff8a1ecaacc9f349898fd33baf59a23
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0cf880a22f837124c95a972787b0eca6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: aa468074512439243a7e5a6df417772a, type: 3}
|
||||
m_Name: pinetree_07
|
||||
m_EditorClassIdentifier:
|
||||
prefab: {fileID: 0}
|
||||
renderInfo: {fileID: 11400000, guid: e9335ec60bc54ae4b8ddeceb4d030f03, type: 2}
|
||||
useTGS: 0
|
||||
radius: 1
|
||||
isEraser: 0
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 48cac189b3375df49bcffcb365033814
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: aa468074512439243a7e5a6df417772a, type: 3}
|
||||
m_Name: pinetree_07_green
|
||||
m_EditorClassIdentifier:
|
||||
prefab: {fileID: 0}
|
||||
renderInfo: {fileID: 11400000, guid: 611328916df864a49b0e344b3f2d702f, type: 2}
|
||||
useTGS: 0
|
||||
radius: 1
|
||||
isEraser: 0
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 27bb9514a35387d4d912663aae5fbbdd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 545e80cdabc78024398cdeedadd72d18
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7afce2eead227e14ca8ef68a13adbb83
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_branch
|
||||
m_Shader: {fileID: 4800000, guid: cdc1a657442dcd34ea53fadaa03d7cb4, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHA_TEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ALPHA_TEST: 1
|
||||
- _AmbientMultiplier: 1
|
||||
- _CutOff: 0.5
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 591ddc592f34e35458cd513c9fa03c8f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_branch_3080
|
||||
m_Shader: {fileID: 4800000, guid: cdc1a657442dcd34ea53fadaa03d7cb4, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHA_TEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ALPHA_TEST: 1
|
||||
- _AmbientMultiplier: 1
|
||||
- _CutOff: 0.5
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 50960365a4b4f5049a786a2d7e659d3d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_branch_3080_transparent
|
||||
m_Shader: {fileID: 4800000, guid: 92e20a2352bfd4843854ef88177fea84, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AmbientMultiplier: 1
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c3ae1e388f564354db0ac1caad373ee6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_branch_6424
|
||||
m_Shader: {fileID: 4800000, guid: cdc1a657442dcd34ea53fadaa03d7cb4, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHA_TEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ALPHA_TEST: 1
|
||||
- _AmbientMultiplier: 1
|
||||
- _CutOff: 0.5
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 06275e53e2ce9e64ea9fc263d0d467d5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_branch_transparent
|
||||
m_Shader: {fileID: 4800000, guid: 92e20a2352bfd4843854ef88177fea84, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AmbientMultiplier: 1
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c5c0ffab4b494c942b38a0877a5c0fa7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_leaves
|
||||
m_Shader: {fileID: 4800000, guid: cdc1a657442dcd34ea53fadaa03d7cb4, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHA_TEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ALPHA_TEST: 1
|
||||
- _AmbientMultiplier: 1
|
||||
- _CutOff: 0.5
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.84276724, g: 0.8414123, b: 0.2199675, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 68326c9bb2fba294989c1e0c26a4e6fc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_leaves_2882
|
||||
m_Shader: {fileID: 4800000, guid: cdc1a657442dcd34ea53fadaa03d7cb4, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHA_TEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ALPHA_TEST: 1
|
||||
- _AmbientMultiplier: 1
|
||||
- _CutOff: 0.5
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.9056604, g: 0.6863652, b: 0.6863652, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ca59b3cad95aa1643860fee53836090e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_leaves_8125
|
||||
m_Shader: {fileID: 4800000, guid: cdc1a657442dcd34ea53fadaa03d7cb4, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHA_TEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ALPHA_TEST: 1
|
||||
- _AmbientMultiplier: 1
|
||||
- _CutOff: 0.5
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.8867924, g: 0.48243734, b: 0.48243734, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c4ebd0e05fe8ed4479ddb6444c068ce4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_leaves_8125_transparent
|
||||
m_Shader: {fileID: 4800000, guid: 92e20a2352bfd4843854ef88177fea84, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AmbientMultiplier: 1
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.8867924, g: 0.48243734, b: 0.48243734, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8092fa627f0ce6d4293dcba7d972d551
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: tree_leaves_transparent
|
||||
m_Shader: {fileID: 4800000, guid: 92e20a2352bfd4843854ef88177fea84, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fd033de6625091e4b984090fd025f535, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AmbientMultiplier: 1
|
||||
- _ShadowIntensity: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 314aebc3d8cb1f44a94e5fd938abe2ae
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: db4e9962296f60f45872c567b8af5c41
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4357363629614094773
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9066999977269872205}
|
||||
- component: {fileID: 5196018159892433211}
|
||||
- component: {fileID: 4933581124988119049}
|
||||
m_Layer: 0
|
||||
m_Name: pinetree_07_green
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 4294967295
|
||||
m_IsActive: 1
|
||||
--- !u!4 &9066999977269872205
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4357363629614094773}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 2.99, y: 0.69, z: -6.44}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &5196018159892433211
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4357363629614094773}
|
||||
m_Mesh: {fileID: 4335258, guid: d8fec4d55fba9b04e87c5c900271f2c5, type: 3}
|
||||
--- !u!23 &4933581124988119049
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4357363629614094773}
|
||||
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: 06275e53e2ce9e64ea9fc263d0d467d5, type: 2}
|
||||
- {fileID: 2100000, guid: ca59b3cad95aa1643860fee53836090e, 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}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ae8d3db191abc3046856e1cee8d117f2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1586667202083438961
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7931645060675964333}
|
||||
- component: {fileID: 535055031937521122}
|
||||
- component: {fileID: 137566954833917471}
|
||||
m_Layer: 0
|
||||
m_Name: pinetree_07_green_3735
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 4294967295
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7931645060675964333
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1586667202083438961}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 2.99, y: 0.69, z: -6.44}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &535055031937521122
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1586667202083438961}
|
||||
m_Mesh: {fileID: 4335258, guid: d8fec4d55fba9b04e87c5c900271f2c5, type: 3}
|
||||
--- !u!23 &137566954833917471
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1586667202083438961}
|
||||
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: 50960365a4b4f5049a786a2d7e659d3d, type: 2}
|
||||
- {fileID: 2100000, guid: c4ebd0e05fe8ed4479ddb6444c068ce4, 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}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 02de318a8e704f344be5127dc9ed5751
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 59830c507a8c9994b877a8eaa2d46f50
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 478663069aaffb6448103ad45fb5e8c1, type: 3}
|
||||
m_Name: pinetree_07_green_renderInfo
|
||||
m_EditorClassIdentifier:
|
||||
opaqueMaterial: []
|
||||
transparentMaterial: []
|
||||
meshes: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 611328916df864a49b0e344b3f2d702f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 478663069aaffb6448103ad45fb5e8c1, type: 3}
|
||||
m_Name: pinetree_07_renderInfo
|
||||
m_EditorClassIdentifier:
|
||||
opaqueMaterial: []
|
||||
transparentMaterial: []
|
||||
meshes: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e9335ec60bc54ae4b8ddeceb4d030f03
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -27,8 +27,8 @@ Transform:
|
|||
m_GameObject: {fileID: 1261262978292087713}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -4.91, y: -0.00000035762787, z: 36.38}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
/// <summary>
|
||||
/// 存储场景中物件渲染所需的基本数据,每个场景笔刷都会绑定一份该对象,可以用于在场景中标识某个笔刷刷上的游戏物体
|
||||
/// </summary>
|
||||
public class SceneObjectRenderInfo : ScriptableObject
|
||||
{
|
||||
[ReadOnly]
|
||||
[LabelText("不透明材质")]
|
||||
public List<Material> opaqueMaterial = new();
|
||||
|
||||
[ReadOnly]
|
||||
[LabelText("半透明材质")]
|
||||
public List<Material> transparentMaterial = new();
|
||||
|
||||
[ReadOnly]
|
||||
[LabelText("网格")]
|
||||
public List<Mesh> meshes = new();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 478663069aaffb6448103ad45fb5e8c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7b775a1e295e6204ca63e60f1bc00ec4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
public class NLDSceneManager : MonoBehaviour, IEnumerable
|
||||
{
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
private List<SceneObject> _sceneObjects = new();
|
||||
|
||||
public void AddSceneObject(SceneObject so)
|
||||
{
|
||||
if(_sceneObjects.Contains(so))
|
||||
return;
|
||||
_sceneObjects.Add(so);
|
||||
}
|
||||
|
||||
public void RemoveSceneObject(SceneObject so)
|
||||
{
|
||||
var index = _sceneObjects.FindIndex(obj => obj == so);
|
||||
if(index < 0)
|
||||
return;
|
||||
_sceneObjects.RemoveAt(index);
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return _sceneObjects.GetEnumerator();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 46398fcea7ee9e54894dfc4e5364d137
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
public enum ESceneObjectType
|
||||
{
|
||||
None = 0,
|
||||
Tree = 1, //树
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 场景中对象,可以方便地执行一些渲染上的效果,如半透,面片渲染等
|
||||
/// </summary>
|
||||
public class SceneObject : MonoBehaviour
|
||||
{
|
||||
#region Fields
|
||||
|
||||
[SerializeField]
|
||||
[LabelText("是否半透")]
|
||||
[OnValueChanged("Refresh")]
|
||||
private bool _transparent;
|
||||
|
||||
[SerializeField]
|
||||
[LabelText("是否使用面片")]
|
||||
[OnValueChanged("Refresh")]
|
||||
private bool _useSurface;
|
||||
|
||||
[ReadOnly]
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
private SceneObjectRenderInfo _renderInfo;
|
||||
|
||||
#endregion
|
||||
|
||||
#region API
|
||||
|
||||
public bool Transparent
|
||||
{
|
||||
get => _transparent;
|
||||
set
|
||||
{
|
||||
if (_transparent != value)
|
||||
{
|
||||
_transparent = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseSurface
|
||||
{
|
||||
get => _useSurface;
|
||||
set
|
||||
{
|
||||
if (_useSurface != value)
|
||||
{
|
||||
_useSurface = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Refresh()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: af559d87428e7cc4ab1c48d151b613b7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
[Header(Main map)]
|
||||
_MainTex ("MainTex", 2D) = "white" {}
|
||||
_BaseTint("Base Tint", color) = (1,1,1,1)
|
||||
_Color("Base Tint", color) = (1,1,1,1)
|
||||
|
||||
_CutOff("Alpha测试值",Range(0,1)) = 0.5
|
||||
_ShadowIntensity("阴影强度",Range(0,1)) = 1
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
SAMPLER(sampler_MainTex);
|
||||
|
||||
half4 _MainTex_ST;
|
||||
half4 _BaseTint;
|
||||
half4 _Color;
|
||||
half4 _BaseColorBottom;
|
||||
half4 _BaseColorTop;
|
||||
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
clip(baseColor.a - _CutOff);
|
||||
#endif
|
||||
|
||||
half3 albedo = baseColor * _BaseTint;
|
||||
half3 albedo = baseColor * _Color;
|
||||
half3 mainLightColor = mainLight.color.rgb;
|
||||
//漫反射
|
||||
half3 diffuse = saturate(dot(N, L)) * albedo * mainLightColor;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
{
|
||||
[Header(Main map)]
|
||||
_MainTex ("MainTex", 2D) = "white" {}
|
||||
_BaseTint("Base Tint", color) = (1,1,1,1)
|
||||
_Color("Base Tint", color) = (1,1,1,1)
|
||||
|
||||
_ShadowIntensity("阴影强度",Range(0,1)) = 1
|
||||
_AmbientMultiplier("环境光强度",Range(0,2)) = 1
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
SAMPLER(sampler_MainTex);
|
||||
|
||||
half4 _MainTex_ST;
|
||||
half4 _BaseTint;
|
||||
half4 _Color;
|
||||
half4 _BaseColorBottom;
|
||||
half4 _BaseColorTop;
|
||||
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
half4 baseColor = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv);
|
||||
|
||||
half4 albedo = baseColor * _BaseTint;
|
||||
half4 albedo = baseColor * _Color;
|
||||
half3 mainLightColor = mainLight.color.rgb;
|
||||
//漫反射
|
||||
half3 diffuse = saturate(dot(N, L)) * albedo * mainLightColor;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class MaterialUtil
|
||||
{
|
||||
//拷贝材质上的属性到另一个材质
|
||||
public static void CopyMaterialProp(Material mat1, Material mat2)
|
||||
{
|
||||
mat2.mainTexture = mat1.mainTexture;
|
||||
mat2.color = mat1.color;
|
||||
}
|
||||
|
||||
//拷贝材质上的属性到新的指定shader材质
|
||||
public static Material CopyMaterialWithShader(Material mat1, Shader shader = null)
|
||||
{
|
||||
shader = shader ? shader : mat1.shader;
|
||||
var mat2 = new Material(shader)
|
||||
{
|
||||
name = mat1.name
|
||||
};
|
||||
CopyMaterialProp(mat1, mat2);
|
||||
return mat2;
|
||||
}
|
||||
|
||||
//以指定shader替换gameobject上的所有材质,此函数会新建材质
|
||||
public static List<Material> ReplaceMaterialOnGameObject(GameObject go, Shader shader = null)
|
||||
{
|
||||
if (!EditorUtility.IsPersistent(go))
|
||||
{
|
||||
Debug.LogError($"当前gameobject不是asset中的预制体!");
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Material> result = new();
|
||||
var meshRenderers = go.GetComponentsInChildren<MeshRenderer>();
|
||||
foreach (var meshRenderer in meshRenderers)
|
||||
{
|
||||
var mats = meshRenderer.sharedMaterials;
|
||||
for (int i = 0; i < mats.Length; i++)
|
||||
{
|
||||
mats[i] = CopyMaterialWithShader(mats[i], shader);
|
||||
result.Add(mats[i]);
|
||||
}
|
||||
|
||||
meshRenderer.sharedMaterials = mats;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<Material> CreateMaterialWithShaderOnGameObject(GameObject go, Shader shader)
|
||||
{
|
||||
if (!EditorUtility.IsPersistent(go))
|
||||
{
|
||||
Debug.LogError($"当前gameobject不是asset中的预制体!");
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Material> result = new();
|
||||
var meshRenderers = go.GetComponentsInChildren<MeshRenderer>();
|
||||
foreach (var meshRenderer in meshRenderers)
|
||||
{
|
||||
var mats = meshRenderer.sharedMaterials;
|
||||
for (int i = 0; i < mats.Length; i++)
|
||||
{
|
||||
var newMat = CopyMaterialWithShader(mats[i], shader);
|
||||
result.Add(newMat);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 43560d9d31b7d0844876652d614e374d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,344 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using Sirenix.OdinInspector.Editor;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(NLDSceneManager))]
|
||||
public class NLDSceneManagerInspector : Editor
|
||||
{
|
||||
private const string SCENE_BRUSH_PATH = "Assets/Art/Scene/SceneBrush/Brush/Editor";
|
||||
private const string SCENE_RENDER_INFO_PATH = "Assets/Art/Scene/SceneBrush/SceneRenderInfo";
|
||||
|
||||
private List<SceneBrush> _showBrushes = new();
|
||||
|
||||
private bool _isSelectingBrush;
|
||||
private bool _isCreatingBrush;
|
||||
|
||||
private SceneBrush _currBrush;
|
||||
private string _brushName;
|
||||
private EBrushType _brushType;
|
||||
private string _searchStr;
|
||||
|
||||
private bool _isDirty;
|
||||
private Vector2 _scrollPosition;
|
||||
private NLDSceneManager _sceneManager;
|
||||
|
||||
private PreviewRenderUtility _previewRenderUtility;
|
||||
|
||||
private GameObject Prefab => _currBrush != null ? _currBrush.prefab : null;
|
||||
|
||||
private void ValidateData()
|
||||
{
|
||||
if (_previewRenderUtility == null)
|
||||
{
|
||||
_previewRenderUtility = new PreviewRenderUtility();
|
||||
|
||||
//We set the previews camera to 6 units back, look towards the middle of the 'scene'
|
||||
|
||||
_previewRenderUtility.camera.transform.rotation = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HasPreviewGUI()
|
||||
{
|
||||
ValidateData();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
RefreshData();
|
||||
}
|
||||
|
||||
protected void OnDisable()
|
||||
{
|
||||
if (_previewRenderUtility != null)
|
||||
{
|
||||
_previewRenderUtility.Cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshData()
|
||||
{
|
||||
RefreshAllBrush();
|
||||
RefreshBrushToShow();
|
||||
}
|
||||
|
||||
private void RefreshAllBrush()
|
||||
{
|
||||
SceneBrushHelper.RefreshAllBrush();
|
||||
}
|
||||
|
||||
private void RefreshBrushToShow()
|
||||
{
|
||||
_showBrushes.Clear();
|
||||
foreach (var brush in SceneBrushHelper.AllBrushes)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_searchStr) || brush.name.ToLower().Contains(_searchStr.ToLower()))
|
||||
{
|
||||
_showBrushes.Add(brush);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckCreateBrush()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_brushName))
|
||||
{
|
||||
Debug.LogError("笔刷名为空!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_brushType == EBrushType.None)
|
||||
{
|
||||
Debug.LogError("笔刷类型为空!");
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var brush in SceneBrushHelper.AllBrushes)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(brush);
|
||||
if (Path.GetFileNameWithoutExtension(path) == _brushName)
|
||||
{
|
||||
Debug.LogError("当前笔刷名字已存在,请重新命名!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool CheckPreview()
|
||||
{
|
||||
return Prefab != null;
|
||||
}
|
||||
|
||||
public override void OnPreviewGUI(Rect r, GUIStyle background)
|
||||
{
|
||||
if (Event.current.type == EventType.Repaint && CheckPreview())
|
||||
{
|
||||
_previewRenderUtility.BeginPreview(r, background);
|
||||
_previewRenderUtility.camera.farClipPlane = 100;
|
||||
var meshRenderer = Prefab.GetComponent<MeshRenderer>();
|
||||
var meshFilter = Prefab.GetComponent<MeshFilter>();
|
||||
if (meshRenderer == null || meshFilter == null || meshRenderer.sharedMaterials.Length == 0 ||
|
||||
meshFilter.sharedMesh == null)
|
||||
return;
|
||||
var mesh = meshFilter.sharedMesh;
|
||||
var bounds = meshRenderer.bounds;
|
||||
var y = bounds.center.y;
|
||||
var height = bounds.size.y + 1;
|
||||
var fov = _previewRenderUtility.camera.fieldOfView;
|
||||
var z = -(height / 2) / Mathf.Tan(Mathf.Deg2Rad * (fov / 2));
|
||||
var cameraPos = new Vector3(0, y, z);
|
||||
_previewRenderUtility.camera.transform.position = cameraPos;
|
||||
var materials = meshRenderer.sharedMaterials;
|
||||
for (int i = 0; i < mesh.subMeshCount; i++)
|
||||
{
|
||||
if (i < materials.Length)
|
||||
_previewRenderUtility.DrawMesh(mesh, Matrix4x4.identity, materials[i], i);
|
||||
}
|
||||
|
||||
_previewRenderUtility.camera.Render();
|
||||
|
||||
var result_render = _previewRenderUtility.EndPreview();
|
||||
GUI.DrawTexture(r, result_render, ScaleMode.StretchToFill, false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
//base.OnInspectorGUI();
|
||||
_isDirty = false;
|
||||
DrawBrushSelecting();
|
||||
DrawCreateBrush();
|
||||
DrawBrush();
|
||||
if (_isDirty)
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
private void DrawBrushSelecting()
|
||||
{
|
||||
if (_isSelectingBrush)
|
||||
{
|
||||
RefreshBrushToShow();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
_searchStr = EditorGUILayout.TextField("搜索笔刷", _searchStr);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
//RefreshBrushToShow();
|
||||
}
|
||||
|
||||
var scrollViewHeight = Mathf.Min(200, 30 * (_showBrushes.Count + 1) + 10);
|
||||
_scrollPosition =
|
||||
GUILayout.BeginScrollView(_scrollPosition, GUI.skin.box, GUILayout.Height(scrollViewHeight));
|
||||
EditorGUILayout.BeginHorizontal(GUI.skin.label, GUILayout.Height(20));
|
||||
EditorGUILayout.LabelField("笔刷名", GUILayout.Width(150));
|
||||
EditorGUILayout.LabelField("笔刷类型", GUILayout.Width(150));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
foreach (var brush in _showBrushes)
|
||||
{
|
||||
if (brush == _currBrush)
|
||||
GUI.color = Color.cyan;
|
||||
EditorGUILayout.BeginHorizontal(GUI.skin.box, GUILayout.Height(20));
|
||||
EditorGUILayout.LabelField(brush.name, GUILayout.Width(150));
|
||||
EditorGUILayout.LabelField(brush.brushType.ToString(), GUILayout.Width(150));
|
||||
if (GUILayout.Button("选择"))
|
||||
{
|
||||
_currBrush = brush;
|
||||
}
|
||||
|
||||
GUI.color = Color.white;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
if (SceneBrushHelper.AllBrushes.Count > 0)
|
||||
{
|
||||
if (!_isSelectingBrush && GUILayout.Button("选择笔刷"))
|
||||
{
|
||||
_isSelectingBrush = true;
|
||||
}
|
||||
|
||||
if (_isSelectingBrush && GUILayout.Button("选择完毕"))
|
||||
{
|
||||
_scrollPosition = Vector2.zero;
|
||||
_isSelectingBrush = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_isSelectingBrush = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawCreateBrush()
|
||||
{
|
||||
if (!_isCreatingBrush)
|
||||
{
|
||||
if (GUILayout.Button("创建笔刷"))
|
||||
{
|
||||
_isCreatingBrush = true;
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
_brushName = EditorGUILayout.TextField("新建笔刷名", _brushName);
|
||||
_brushType = (EBrushType)EditorGUILayout.EnumPopup("新建笔刷类型", _brushType);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
if (GUILayout.Button("创建"))
|
||||
{
|
||||
if (!CheckCreateBrush())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var renderInfoName = $"{_brushName}_renderInfo";
|
||||
var renderInfoPath = $"{SCENE_RENDER_INFO_PATH}/{renderInfoName}.asset";
|
||||
EditorUtil.CreateAnUniqueAsset(CreateInstance<SceneObjectRenderInfo>(), renderInfoPath);
|
||||
AssetDatabase.Refresh();
|
||||
var renderInfo = AssetDatabase.LoadAssetAtPath<SceneObjectRenderInfo>(renderInfoPath);
|
||||
renderInfo.name = renderInfoName;
|
||||
|
||||
var brushName = _brushName;
|
||||
var brushPath = $"{SCENE_BRUSH_PATH}/{brushName}.asset";
|
||||
switch (_brushType)
|
||||
{
|
||||
case EBrushType.Tree:
|
||||
EditorUtil.CreateAnUniqueAsset(CreateInstance<SceneBrushTree>(), brushPath);
|
||||
break;
|
||||
case EBrushType.Building:
|
||||
EditorUtil.CreateAnUniqueAsset(CreateInstance<SceneBrushBuilding>(), brushPath);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
var brush = AssetDatabase.LoadAssetAtPath<SceneBrush>(brushPath);
|
||||
brush.renderInfo = renderInfo;
|
||||
brush.name = brushName;
|
||||
|
||||
EditorUtility.SetDirty(renderInfo);
|
||||
EditorUtility.SetDirty(brush);
|
||||
_isDirty = true;
|
||||
|
||||
_currBrush = brush;
|
||||
_isCreatingBrush = false;
|
||||
RefreshData();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("取消创建"))
|
||||
{
|
||||
_isCreatingBrush = false;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawBrush()
|
||||
{
|
||||
if (_currBrush != null)
|
||||
{
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.ObjectField("当前笔刷:", _currBrush, typeof(SceneBrush), false);
|
||||
EditorGUILayout.ObjectField("当前渲染信息:", _currBrush.renderInfo, typeof(SceneObjectRenderInfo), false);
|
||||
GUI.enabled = true;
|
||||
|
||||
if (_currBrush.prefab != null)
|
||||
GUI.enabled = false;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var prefab =
|
||||
EditorGUILayout.ObjectField("笔刷预制:", _currBrush.prefab, typeof(GameObject), false) as GameObject;
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
_currBrush.OnPrefabChanged(prefab);
|
||||
}
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
DrawBrushSettings();
|
||||
|
||||
|
||||
if (GUILayout.Button("删除笔刷"))
|
||||
{
|
||||
_currBrush.OnDelete();
|
||||
var path = AssetDatabase.GetAssetPath(_currBrush);
|
||||
//DestroyImmediate(_currBrush,true);
|
||||
AssetDatabase.DeleteAsset(path);
|
||||
_currBrush = null;
|
||||
RefreshData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawBrushSettings()
|
||||
{
|
||||
if (_currBrush.Valid)
|
||||
{
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.EnumPopup("笔刷类型", _currBrush.brushType);
|
||||
GUI.enabled = true;
|
||||
|
||||
_currBrush.useTGS = EditorGUILayout.Toggle("对其网格", _currBrush.useTGS);
|
||||
_currBrush.radius = EditorGUILayout.FloatField("笔刷半径", _currBrush.radius);
|
||||
_currBrush.isEraser = EditorGUILayout.Toggle("擦子", _currBrush.isEraser);
|
||||
|
||||
_currBrush.OnInspectorGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0a2764b5e37eac94c95339d9c46ad5d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 620679bedc844cc4aab47e3e6fa40c9e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEditor;
|
||||
|
||||
public enum EBrushType
|
||||
{
|
||||
None = 0,
|
||||
Tree,
|
||||
Building,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 笔刷工具,每一个笔刷绑定了一个Prefab和一个SceneObjectRenderInfo
|
||||
/// 每一个笔刷就对应了一个具体外貌的游戏物体(如绿色的松树和白色的松树就需要两个笔刷)
|
||||
/// 需要继承自该类完成自己类型笔刷的逻辑
|
||||
/// </summary>
|
||||
public abstract class SceneBrush : ScriptableObject
|
||||
{
|
||||
#region Const
|
||||
|
||||
protected const string SCENE_BRUSH_GENERATED_PREFAB_PATH = "Assets/Art/Scene/SceneBrush/Brush/Generated/Prefabs";
|
||||
|
||||
protected const string SCENE_BRUSH_GENERATED_MATERIAL_PATH =
|
||||
"Assets/Art/Scene/SceneBrush/Brush/Generated/Materials";
|
||||
|
||||
protected const string SCENE_TRANSPARENT_SHADER = "Assets/Code/Shaders/Scene/NLD_Scene_Transparent.shader";
|
||||
protected const string SCENE_OPAQUE_SHADER = "Assets/Code/Shaders/Scene/NLD_Scene_Opaque.shader";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields And Properties
|
||||
|
||||
[Sirenix.OdinInspector.ReadOnly]
|
||||
public GameObject prefab;
|
||||
|
||||
[Sirenix.OdinInspector.ReadOnly]
|
||||
public SceneObjectRenderInfo renderInfo;
|
||||
|
||||
public abstract EBrushType brushType { get; }
|
||||
|
||||
[HideInInspector]
|
||||
public bool useTGS;
|
||||
|
||||
[HideInInspector]
|
||||
public float radius = 1;
|
||||
|
||||
[HideInInspector]
|
||||
public bool isEraser;
|
||||
|
||||
public bool Valid => prefab != null && renderInfo != null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region MainLife
|
||||
|
||||
/// <summary>
|
||||
/// 基类的该函数只能对应大部分的场景物件(如树木,石头等),建筑等特殊的需要重写该函数
|
||||
/// </summary>
|
||||
/// <param name="newPrefab"></param>
|
||||
public virtual void OnPrefabChanged(GameObject newPrefab)
|
||||
{
|
||||
if (newPrefab == null)
|
||||
{
|
||||
prefab = null;
|
||||
return;
|
||||
}
|
||||
|
||||
//预处理一下资源
|
||||
PreProcessPrefab(newPrefab);
|
||||
//如果当前预制体已经与其他笔刷绑定了,需要克隆当前预制体,因为笔刷和预制体一一对应
|
||||
if (SceneBrushHelper.GetSceneBrushByPrefab(newPrefab) != null)
|
||||
{
|
||||
var clonedPrefab = ClonePrefab(newPrefab);
|
||||
newPrefab = clonedPrefab;
|
||||
}
|
||||
|
||||
prefab = newPrefab;
|
||||
//后处理资源
|
||||
PostProcessPrefab();
|
||||
}
|
||||
|
||||
//预处理资源,如树是从TreeCreator制作的,但Unity已经不支持了,需要我们手动移除无用组件和材质并设置正确值
|
||||
protected virtual void PreProcessPrefab(GameObject k_prefab)
|
||||
{
|
||||
}
|
||||
|
||||
//后处理资源,包括生成半透明材质,记录材质和网格信息
|
||||
protected virtual void PostProcessPrefab()
|
||||
{
|
||||
//应用当前不透明材质到renderInfo上
|
||||
ApplyOpaqueMaterial();
|
||||
//创建透明材质并应用到renderInfo上
|
||||
CreateTransparentMaterialAndApply();
|
||||
//应用网格
|
||||
ApplyMesh();
|
||||
}
|
||||
|
||||
protected GameObject ClonePrefab(GameObject k_prefab)
|
||||
{
|
||||
if (k_prefab == null || !PrefabUtility.IsPartOfPrefabAsset(k_prefab))
|
||||
{
|
||||
Debug.LogError("克隆对象失败!");
|
||||
return null;
|
||||
}
|
||||
|
||||
var instance = PrefabUtility.InstantiatePrefab(k_prefab) as GameObject;
|
||||
if (instance == null)
|
||||
return null;
|
||||
PrefabUtility.UnpackPrefabInstance(instance, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction);
|
||||
var newPath =
|
||||
EditorUtil.GetAssetUniquePath($"{SCENE_BRUSH_GENERATED_PREFAB_PATH}/{name}.prefab", out var assetName);
|
||||
instance.name = assetName;
|
||||
PrefabUtility.SaveAsPrefabAsset(instance, newPath);
|
||||
DestroyImmediate(instance);
|
||||
var newPrefab = AssetDatabase.LoadAssetAtPath<GameObject>(newPath);
|
||||
//深拷贝材质
|
||||
var mats = MaterialUtil.ReplaceMaterialOnGameObject(newPrefab);
|
||||
if (mats == null)
|
||||
return null;
|
||||
foreach (var mat in mats)
|
||||
{
|
||||
EditorUtil.CreateAnUniqueAsset(mat, $"{SCENE_BRUSH_GENERATED_MATERIAL_PATH}/{mat.name}.mat");
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
return newPrefab;
|
||||
}
|
||||
|
||||
protected void ApplyOpaqueMaterial()
|
||||
{
|
||||
var meshrenderers = prefab.GetComponentsInChildren<MeshRenderer>();
|
||||
List<Material> mats = new();
|
||||
foreach (var meshRenderer in meshrenderers)
|
||||
{
|
||||
foreach (var mat in meshRenderer.sharedMaterials)
|
||||
{
|
||||
mats.Add(mat);
|
||||
}
|
||||
}
|
||||
|
||||
renderInfo.opaqueMaterial = mats;
|
||||
}
|
||||
|
||||
protected void CreateTransparentMaterialAndApply()
|
||||
{
|
||||
if (prefab == null)
|
||||
return;
|
||||
var shader = AssetDatabase.LoadAssetAtPath<Shader>(SCENE_TRANSPARENT_SHADER);
|
||||
var mats = MaterialUtil.CreateMaterialWithShaderOnGameObject(prefab, shader);
|
||||
if (mats == null)
|
||||
return;
|
||||
foreach (var mat in mats)
|
||||
{
|
||||
EditorUtil.CreateAnUniqueAsset(mat, $"{SCENE_BRUSH_GENERATED_MATERIAL_PATH}/{mat.name}_transparent.mat");
|
||||
}
|
||||
|
||||
renderInfo.transparentMaterial = mats;
|
||||
}
|
||||
|
||||
protected void ApplyMesh()
|
||||
{
|
||||
if (prefab == null)
|
||||
return;
|
||||
var meshFilters = prefab.GetComponentsInChildren<MeshFilter>();
|
||||
List<Mesh> result = new();
|
||||
foreach (var mf in meshFilters)
|
||||
{
|
||||
result.Add(mf.sharedMesh);
|
||||
}
|
||||
|
||||
renderInfo.meshes = result;
|
||||
}
|
||||
|
||||
public virtual void AfterDraw(List<GameObject> drawnObjects)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnClickOnGround()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnSwipeOnGround()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnDelete()
|
||||
{
|
||||
if (Valid)
|
||||
{
|
||||
foreach (var mat in renderInfo.transparentMaterial)
|
||||
{
|
||||
if (AssetDatabase.IsSubAsset(mat))
|
||||
{
|
||||
AssetDatabase.RemoveObjectFromAsset(mat);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Object.DestroyImmediate(mat, true);
|
||||
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(mat));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var path = AssetDatabase.GetAssetPath(renderInfo);
|
||||
//DestroyImmediate(renderInfo, true);
|
||||
AssetDatabase.DeleteAsset(path);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GUI
|
||||
|
||||
public virtual void OnInspectorGUI()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Other
|
||||
|
||||
protected void DrawAPrefab(Vector3 position)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8ea875b7bd36b7d4fa66295a03a1cb24
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SceneBrushBuilding : SceneBrush
|
||||
{
|
||||
public override EBrushType brushType => EBrushType.Building;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 06ec76ff5ff34564c8002bad94ea3ed3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class SceneBrushTree : SceneBrush
|
||||
{
|
||||
public override EBrushType brushType => EBrushType.Tree;
|
||||
|
||||
public override void OnPrefabChanged(GameObject newPrefab)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void PreProcessPrefab(GameObject k_prefab)
|
||||
{
|
||||
base.PreProcessPrefab(k_prefab);
|
||||
TreeUtil.PostProcessTree(k_prefab);
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
if (Valid)
|
||||
{
|
||||
var branchMat = renderInfo.opaqueMaterial[0];
|
||||
var leafMat = renderInfo.opaqueMaterial[1];
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var branchColor = EditorGUILayout.ColorField("树枝颜色",branchMat.color);
|
||||
var leafColor = EditorGUILayout.ColorField("树叶颜色",leafMat.color);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
branchMat.color = branchColor;
|
||||
leafMat.color = leafColor;
|
||||
renderInfo.transparentMaterial[0].color = branchColor;
|
||||
renderInfo.transparentMaterial[1].color = leafColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: aa468074512439243a7e5a6df417772a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class SceneBrushHelper
|
||||
{
|
||||
private const string SCENE_BRUSH_PATH = "Assets/Art/Scene/SceneBrush/Brush/Editor";
|
||||
|
||||
private static List<SceneBrush> _allBrushes;
|
||||
|
||||
public static List<SceneBrush> AllBrushes
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_allBrushes == null)
|
||||
{
|
||||
RefreshAllBrush();
|
||||
}
|
||||
|
||||
return _allBrushes;
|
||||
}
|
||||
}
|
||||
|
||||
public static void RefreshAllBrush()
|
||||
{
|
||||
_allBrushes = _allBrushes ?? new();
|
||||
_allBrushes.Clear();
|
||||
var guids = AssetDatabase.FindAssets("t:SceneBrush", new[] { SCENE_BRUSH_PATH });
|
||||
foreach (var guid in guids)
|
||||
{
|
||||
var path = AssetDatabase.GUIDToAssetPath(guid);
|
||||
var brush = AssetDatabase.LoadAssetAtPath<SceneBrush>(path);
|
||||
_allBrushes.Add(brush);
|
||||
}
|
||||
}
|
||||
|
||||
public static SceneBrush GetSceneBrushByPrefab(GameObject prefab)
|
||||
{
|
||||
return AllBrushes.FirstOrDefault(brush => brush.prefab == prefab);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 876f74ed02f7bfe4da0c693393216e81
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using SRF;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public static class TreeUtil
|
||||
{
|
||||
private const string TREE_OPAQUE_SHADER = "Assets/Code/Shaders/Scene/NLD_Scene_Opaque.shader";
|
||||
|
||||
[MenuItem("Assets/处理树资源")]
|
||||
private static void PostProcessTree()
|
||||
{
|
||||
var selectedObj = Selection.activeGameObject;
|
||||
if (selectedObj != null && EditorUtility.IsPersistent(selectedObj))
|
||||
{
|
||||
PostProcessTree(selectedObj);
|
||||
}
|
||||
}
|
||||
|
||||
//树是从Tree Creator生成的,目前Unity已经不支持了,需要将其中无用的资源删除并且新建材质
|
||||
public static void PostProcessTree(GameObject tree)
|
||||
{
|
||||
if (tree.GetComponent<Tree>() == null)
|
||||
{
|
||||
Debug.LogError($"当前对象上没有Tree组件,请确认{tree.name}是树!");
|
||||
EditorGUIUtility.PingObject(tree);
|
||||
return;
|
||||
}
|
||||
|
||||
CreateOpaqueMaterial(tree);
|
||||
RemoveUnUseComponent(tree);
|
||||
RemoveTreeUselessSubAsset(tree);
|
||||
EditorUtility.SetDirty(tree);
|
||||
AssetDatabase.Refresh();
|
||||
Debug.Log("处理成功!");
|
||||
}
|
||||
|
||||
//为树创建不透明材质
|
||||
private static void CreateOpaqueMaterial(GameObject tree)
|
||||
{
|
||||
var opaqueShader = AssetDatabase.LoadAssetAtPath<Shader>(TREE_OPAQUE_SHADER);
|
||||
if (opaqueShader == null)
|
||||
{
|
||||
Debug.LogError($"找不到shader:{TREE_OPAQUE_SHADER}");
|
||||
return;
|
||||
}
|
||||
|
||||
var mats = MaterialUtil.ReplaceMaterialOnGameObject(tree, opaqueShader);
|
||||
mats[0].name = "tree_branch";
|
||||
mats[1].name = "tree_leaves";
|
||||
AssetDatabase.AddObjectToAsset(mats[0],tree);
|
||||
AssetDatabase.AddObjectToAsset(mats[1],tree);
|
||||
}
|
||||
|
||||
//移除tree组件
|
||||
private static void RemoveUnUseComponent(GameObject tree)
|
||||
{
|
||||
var treeComponent = tree.GetComponent<Tree>();
|
||||
Object.DestroyImmediate(treeComponent, true);
|
||||
}
|
||||
|
||||
//删除无用资源
|
||||
private static void RemoveTreeUselessSubAsset(GameObject tree)
|
||||
{
|
||||
var assetPath = AssetDatabase.GetAssetPath(tree);
|
||||
if (string.IsNullOrEmpty(assetPath))
|
||||
return;
|
||||
var allAssets = AssetDatabase.LoadAllAssetsAtPath(assetPath);
|
||||
for (int i = allAssets.Length - 1; i >= 0; i--)
|
||||
{
|
||||
var asset = allAssets[i];
|
||||
var assetName = asset.name.ToLower();
|
||||
if (AssetDatabase.IsSubAsset(asset) && (assetName.Contains("optimized") || assetName.Contains("tree data")))
|
||||
{
|
||||
AssetDatabase.RemoveObjectFromAsset(asset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 57d79aad84df82d41ae7a579ff1d13f0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -14,6 +14,8 @@ using UnityEngine;
|
|||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Xml;
|
||||
using Debug = UnityEngine.Debug;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public static class EditorUtil
|
||||
{
|
||||
|
|
@ -366,5 +368,39 @@ public static class EditorUtil
|
|||
|
||||
return finalPath;
|
||||
}
|
||||
|
||||
|
||||
//调用此函数可以保证你保存的asset的路径不会覆盖到其他asset,此函数会自动给asset重命名,所以限制是你不能将asset的名字作为你逻辑的数据
|
||||
public static void CreateAnUniqueAsset(UnityEngine.Object asset, string path)
|
||||
{
|
||||
if (asset == null || string.IsNullOrEmpty(path))
|
||||
{
|
||||
Debug.LogError("输入参数不合法!");
|
||||
return;
|
||||
}
|
||||
|
||||
var savePath = GetAssetUniquePath(path, out var assetName);
|
||||
asset.name = assetName;
|
||||
AssetDatabase.CreateAsset(asset, savePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个唯一的路径用于保存asset,假设传入的路径已经存在,则自动生成一个新的
|
||||
/// </summary>
|
||||
/// <param name="assetPath">尝试保存的路径</param>
|
||||
/// <returns>第一个string是唯一路径,第二个string是asset的新名字</returns>
|
||||
public static string GetAssetUniquePath(string assetPath, out string assetName)
|
||||
{
|
||||
assetName = Path.GetFileNameWithoutExtension(assetPath);
|
||||
var extension = Path.GetExtension(assetPath);
|
||||
var dir = Path.GetDirectoryName(assetPath);
|
||||
var savedAsset = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(assetPath);
|
||||
if (savedAsset == null)
|
||||
{
|
||||
return assetPath;
|
||||
}
|
||||
|
||||
assetName = $"{assetName}_{Random.Range(0, 10000)}";
|
||||
var newAssetPath = $"{dir}/{assetName}{extension}";
|
||||
return GetAssetUniquePath(newAssetPath, out assetName);
|
||||
}
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
|
@ -625,6 +625,51 @@ MonoBehaviour:
|
|||
regions:
|
||||
- positions: da000000db000000dc000000dd000000f6000000f5000000f4000000c0000000c1000000c2000000a8000000a7000000a6000000bf000000d9000000f30000000e0100000f01000010010000
|
||||
initialCameraPosition: {x: 8, y: 11}
|
||||
--- !u!1 &80024553
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 80024554}
|
||||
- component: {fileID: 80024555}
|
||||
m_Layer: 0
|
||||
m_Name: SceneManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &80024554
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 80024553}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 47.29607, y: 0.90512615, z: 14.606123}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &80024555
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 80024553}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 46398fcea7ee9e54894dfc4e5364d137, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_sceneObjects: []
|
||||
--- !u!1 &482223122
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -944,7 +989,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
maxCellsSqrt: 100
|
||||
_isDirty: 0
|
||||
_isDirty: 1
|
||||
mouseIsOver: 1
|
||||
newInHierarchy: 0
|
||||
_terrain: {fileID: 0}
|
||||
|
|
@ -5091,74 +5136,6 @@ Transform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 6361149766305631761}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &2234429682673140914
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 3795476585137515725}
|
||||
m_Modifications:
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -4.91
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.00000035762787
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 36.38
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1261262978292087713, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: tree3 (23)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5c1f70249db1c48498ae0051ab23de31, type: 3}
|
||||
--- !u!1 &2250153011520707945
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -6659,12 +6636,6 @@ Transform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 5756968324359753022}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &3773390570170516250 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 14590638047720827, guid: 5c1f70249db1c48498ae0051ab23de31,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2234429682673140914}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &3776174004523833170
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -6698,7 +6669,6 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 4483834804946207631}
|
||||
- {fileID: 8545809471813741351}
|
||||
- {fileID: 3773390570170516250}
|
||||
m_Father: {fileID: 482223123}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 78.52, z: 0}
|
||||
--- !u!1 &3814670437389299295
|
||||
|
|
@ -14406,3 +14376,4 @@ SceneRoots:
|
|||
- {fileID: 1747868970}
|
||||
- {fileID: 66431737}
|
||||
- {fileID: 986161228}
|
||||
- {fileID: 80024554}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,50 @@ NavMeshSettings:
|
|||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &45959904
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 45959906}
|
||||
- component: {fileID: 45959905}
|
||||
m_Layer: 0
|
||||
m_Name: SceneManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &45959905
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 45959904}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 46398fcea7ee9e54894dfc4e5364d137, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &45959906
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 45959904}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 47.29607, y: 0.90512615, z: 14.606123}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &66431736
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -170,7 +214,7 @@ MonoBehaviour:
|
|||
_camera: {fileID: 1846858571}
|
||||
_groundMaterial: {fileID: 0}
|
||||
_mapScale: {x: 52.78, y: 26.15}
|
||||
_gridWidthHeight: {x: 0, y: 0}
|
||||
_gridWidthHeight: {x: 2, y: 2}
|
||||
initialCameraPosition: {x: 0, y: 0}
|
||||
_mapDataJson: {fileID: 0}
|
||||
_mapData:
|
||||
|
|
@ -1084,3 +1128,4 @@ SceneRoots:
|
|||
- {fileID: 1747868970}
|
||||
- {fileID: 66431737}
|
||||
- {fileID: 986161228}
|
||||
- {fileID: 45959906}
|
||||
|
|
|
|||
Loading…
Reference in New Issue