From de96196339d6309570ad57b427ff05b0533ff798 Mon Sep 17 00:00:00 2001 From: s470618 Date: Mon, 20 Dec 2021 02:42:51 +0100 Subject: [PATCH] yellow tree --- SW-Unity/Assets/Resources/EU43_6.obj.meta | 14 +++- SW-Unity/Assets/Resources/EU43_Cutted.mat | 79 +++++++++++++++++++ .../Assets/Resources/EU43_Cutted.mat.meta | 8 ++ SW-Unity/Assets/Scripts/Main.cs | 12 ++- 4 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 SW-Unity/Assets/Resources/EU43_Cutted.mat create mode 100644 SW-Unity/Assets/Resources/EU43_Cutted.mat.meta diff --git a/SW-Unity/Assets/Resources/EU43_6.obj.meta b/SW-Unity/Assets/Resources/EU43_6.obj.meta index 644fa5b8..3ab66b00 100644 --- a/SW-Unity/Assets/Resources/EU43_6.obj.meta +++ b/SW-Unity/Assets/Resources/EU43_6.obj.meta @@ -1,9 +1,14 @@ fileFormatVersion: 2 guid: fe832048bb874c14190fe2aa133ca554 ModelImporter: - serializedVersion: 19301 + serializedVersion: 21100 internalIDToNameTable: [] - externalObjects: {} + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: EU43lef3 + second: {fileID: 2100000, guid: b2a4d340a3284cc4ea1f9fdb1fc02c04, type: 2} materials: materialImportMode: 1 materialName: 0 @@ -49,6 +54,7 @@ ModelImporter: useFileUnits: 1 keepQuads: 0 weldVertices: 1 + bakeAxisConversion: 0 preserveHierarchy: 0 skinWeightsMode: 0 maxBonesPerVertex: 4 @@ -58,6 +64,9 @@ ModelImporter: secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 secondaryUVPackMargin: 4 useFileScale: 1 tangentSpace: @@ -91,6 +100,7 @@ ModelImporter: animationType: 2 humanoidOversampling: 1 avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 0 additionalBone: 0 userData: assetBundleName: diff --git a/SW-Unity/Assets/Resources/EU43_Cutted.mat b/SW-Unity/Assets/Resources/EU43_Cutted.mat new file mode 100644 index 00000000..4deb4d05 --- /dev/null +++ b/SW-Unity/Assets/Resources/EU43_Cutted.mat @@ -0,0 +1,79 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: EU43_Cutted + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/SW-Unity/Assets/Resources/EU43_Cutted.mat.meta b/SW-Unity/Assets/Resources/EU43_Cutted.mat.meta new file mode 100644 index 00000000..f8da6018 --- /dev/null +++ b/SW-Unity/Assets/Resources/EU43_Cutted.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b2a4d340a3284cc4ea1f9fdb1fc02c04 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/SW-Unity/Assets/Scripts/Main.cs b/SW-Unity/Assets/Scripts/Main.cs index 81775275..e1cfcca0 100644 --- a/SW-Unity/Assets/Scripts/Main.cs +++ b/SW-Unity/Assets/Scripts/Main.cs @@ -128,9 +128,17 @@ public class Main : MonoBehaviour randomShiftZ = random.Next(0, maxShiftValue); GameObject tree = SelectRandomTree(); - if (tree.name.StartsWith("AS")) + if (tree.name.StartsWith("AS") || tree.name.StartsWith("EU")) { - renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector))); + if (tree.name.StartsWith("AS")) + { + renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector))); + } + else + { + renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVectorShiftX))); + } + } else {