aha
This commit is contained in:
61
.gitignore
vendored
Normal file
61
.gitignore
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
Library
|
||||||
|
library
|
||||||
|
Temp
|
||||||
|
temp
|
||||||
|
Obj
|
||||||
|
obj
|
||||||
|
Build
|
||||||
|
build
|
||||||
|
Builds
|
||||||
|
builds
|
||||||
|
UserSettings
|
||||||
|
usersettings
|
||||||
|
MemoryCaptures
|
||||||
|
memorycaptures
|
||||||
|
Logs
|
||||||
|
logs
|
||||||
|
**/Assets/AssetStoreTools
|
||||||
|
**/assets/assetstoretools
|
||||||
|
/Assets/Plugins/PlasticSCM*
|
||||||
|
/assets/plugins/PlasticSCM*
|
||||||
|
*.private
|
||||||
|
*.private.meta
|
||||||
|
^*.private.[0-9]+$
|
||||||
|
^*.private.[0-9]+.meta$
|
||||||
|
.vs
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
.gradle
|
||||||
|
ExportedObj
|
||||||
|
.consulo
|
||||||
|
*.csproj
|
||||||
|
*.unityproj
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.tmp
|
||||||
|
*.user
|
||||||
|
*.userprefs
|
||||||
|
*.pidb
|
||||||
|
*.booproj
|
||||||
|
*.svd
|
||||||
|
*.pdb
|
||||||
|
*.mdb
|
||||||
|
*.opendb
|
||||||
|
*.VC.db
|
||||||
|
*.pidb.meta
|
||||||
|
*.pdb.meta
|
||||||
|
*.mdb.meta
|
||||||
|
sysinfo.txt
|
||||||
|
crashlytics-build.properties
|
||||||
|
*.apk
|
||||||
|
*.aab
|
||||||
|
*.app
|
||||||
|
*.unitypackage
|
||||||
|
~UnityDirMonSyncFile~*
|
||||||
|
**/Assets/AddressableAssetsData/*/*.bin*
|
||||||
|
**/assets/addressableassetsdata/*/*.bin*
|
||||||
|
**/Assets/StreamingAssets/aa.meta
|
||||||
|
**/assets/streamingassets/*/aa/*
|
||||||
|
.DS_Store*
|
||||||
|
Thumbs.db
|
||||||
|
Desktop.ini
|
BIN
.plastic/plastic.changes
Normal file
BIN
.plastic/plastic.changes
Normal file
Binary file not shown.
4
.plastic/plastic.selector
Normal file
4
.plastic/plastic.selector
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
repository "Survival Game@ballobeni08@cloud"
|
||||||
|
path "/"
|
||||||
|
br "/main"
|
||||||
|
co "/main"
|
BIN
.plastic/plastic.wktree
Normal file
BIN
.plastic/plastic.wktree
Normal file
Binary file not shown.
2
.plastic/plastic.workspace
Normal file
2
.plastic/plastic.workspace
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Survival Game
|
||||||
|
c0ca5767-b2f2-4c3a-938c-001a07ad39c8
|
1057
Assets/InputSystem_Actions.inputactions
Normal file
1057
Assets/InputSystem_Actions.inputactions
Normal file
File diff suppressed because it is too large
Load Diff
14
Assets/InputSystem_Actions.inputactions.meta
Normal file
14
Assets/InputSystem_Actions.inputactions.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 052faaac586de48259a63d0c4782560b
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||||
|
generateWrapperCode: 0
|
||||||
|
wrapperCodePath:
|
||||||
|
wrapperClassName:
|
||||||
|
wrapperCodeNamespace:
|
8
Assets/Materials.meta
Normal file
8
Assets/Materials.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3285be480b55bcc41af2063e1d870bc1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
136
Assets/Materials/CloudMat.mat
Normal file
136
Assets/Materials/CloudMat.mat
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
%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: CloudMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &5080578154030464470
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
8
Assets/Materials/CloudMat.mat.meta
Normal file
8
Assets/Materials/CloudMat.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 51adf49c828af4b42b49cd399cd49b10
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
138
Assets/Materials/DemoPlaneMat.mat
Normal file
138
Assets/Materials/DemoPlaneMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: DemoPlaneMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &6249695203784365348
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/DemoPlaneMat.mat.meta
Normal file
15
Assets/Materials/DemoPlaneMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d598d01c3db68c94692eb5c44c83de93
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/DemoPlaneMat.mat
|
||||||
|
uploadId: 355026
|
139
Assets/Materials/EmissionBlueMat.mat
Normal file
139
Assets/Materials/EmissionBlueMat.mat
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-1361300781669679935
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: EmissionBlueMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _EMISSION
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 1
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0, g: 0.34901962, b: 1, a: 1}
|
||||||
|
- _Color: {r: 0, g: 0.3490196, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 2.792157, b: 5.992157, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/EmissionBlueMat.mat.meta
Normal file
15
Assets/Materials/EmissionBlueMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5a42f8033becfcc4db580e9dd08bd6b3
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/EmissionBlueMat.mat
|
||||||
|
uploadId: 355026
|
139
Assets/Materials/EmissionYellowMat.mat
Normal file
139
Assets/Materials/EmissionYellowMat.mat
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-7340924476660754128
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: EmissionYellowMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _EMISSION
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 1
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.654902, b: 0, a: 1}
|
||||||
|
- _Color: {r: 1, g: 0.654902, b: 0, a: 1}
|
||||||
|
- _EmissionColor: {r: 11.984314, g: 7.2156863, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/EmissionYellowMat.mat.meta
Normal file
15
Assets/Materials/EmissionYellowMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a23517422c44285409996ebf0584f793
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/EmissionYellowMat.mat
|
||||||
|
uploadId: 355026
|
136
Assets/Materials/Flower1.mat
Normal file
136
Assets/Materials/Flower1.mat
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
%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: Flower1
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.654902, b: 0, a: 1}
|
||||||
|
- _Color: {r: 1, g: 0.654902, b: 0, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &3032102260634984014
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
8
Assets/Materials/Flower1.mat.meta
Normal file
8
Assets/Materials/Flower1.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6fbae7d0a7cc14941bd25d1420265239
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
138
Assets/Materials/Flower2Mat.mat
Normal file
138
Assets/Materials/Flower2Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: Flower2Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.8901961, b: 0.30588236, a: 1}
|
||||||
|
- _Color: {r: 1, g: 0.8901961, b: 0.30588233, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &302073328569408989
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/Flower2Mat.mat.meta
Normal file
15
Assets/Materials/Flower2Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1c5a335489a263f458754f8cde45f221
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Flower2Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Flower3Mat.mat
Normal file
138
Assets/Materials/Flower3Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: Flower3Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.50980395, g: 0.19215687, b: 1, a: 1}
|
||||||
|
- _Color: {r: 0.5098039, g: 0.19215682, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &5839876351184463291
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/Flower3Mat.mat.meta
Normal file
15
Assets/Materials/Flower3Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ef2c3380ea506a54a96b15b9518d303e
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Flower3Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Flower4Mat.mat
Normal file
138
Assets/Materials/Flower4Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-4666988055523656634
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Flower4Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/Flower4Mat.mat.meta
Normal file
15
Assets/Materials/Flower4Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b043653feafde9a498c209b65e6b09a7
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Flower4Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Mushroom1Mat.mat
Normal file
138
Assets/Materials/Mushroom1Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: Mushroom1Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.9529412, g: 0.62352943, b: 0.07450981, a: 1}
|
||||||
|
- _Color: {r: 0.9529411, g: 0.62352943, b: 0.07450979, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &8273787286697982776
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/Mushroom1Mat.mat.meta
Normal file
15
Assets/Materials/Mushroom1Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5835797300e10724eb31a26fa6baa1a6
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Mushroom1Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Mushroom2Mat.mat
Normal file
138
Assets/Materials/Mushroom2Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-6531324179032325065
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Mushroom2Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.13725491, b: 0, a: 1}
|
||||||
|
- _Color: {r: 1, g: 0.13725486, b: 0, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/Mushroom2Mat.mat.meta
Normal file
15
Assets/Materials/Mushroom2Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 308680fc3656cdb49aa30c04aae1eb87
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Mushroom2Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Mushroom3Mat.mat
Normal file
138
Assets/Materials/Mushroom3Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-1895889940820185893
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Mushroom3Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.49411765, g: 0.13725491, b: 0.62352943, a: 1}
|
||||||
|
- _Color: {r: 0.49411762, g: 0.13725486, b: 0.62352943, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/Mushroom3Mat.mat.meta
Normal file
15
Assets/Materials/Mushroom3Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 23f92ab09af350146b1d22ca67ed7887
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Mushroom3Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/PlantMat.mat
Normal file
138
Assets/Materials/PlantMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: PlantMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.42745098, g: 0.69803923, b: 0.16078432, a: 1}
|
||||||
|
- _Color: {r: 0.42745095, g: 0.69803923, b: 0.16078427, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &5066488160649396432
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/PlantMat.mat.meta
Normal file
15
Assets/Materials/PlantMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 49f2ecb08a0c38140b335a0a1f7f66f4
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/PlantMat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/RockMat.mat
Normal file
138
Assets/Materials/RockMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-3860915453833832309
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: RockMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.7058824, g: 0.70980394, b: 0.7490196, a: 1}
|
||||||
|
- _Color: {r: 0.7058824, g: 0.70980394, b: 0.7490196, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/RockMat.mat.meta
Normal file
15
Assets/Materials/RockMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5bfbfdebccebf0c45832bef70d1337f7
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/RockMat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/TreeGreen1Mat.mat
Normal file
138
Assets/Materials/TreeGreen1Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: TreeGreen1Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.3019608, g: 0.59607846, b: 0.15294118, a: 1}
|
||||||
|
- _Color: {r: 0.30196077, g: 0.5960784, b: 0.15294114, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &3847857020129133202
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/TreeGreen1Mat.mat.meta
Normal file
15
Assets/Materials/TreeGreen1Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cf7b2a2a4b5c2bb409c794db9d64ff3f
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/TreeGreen1Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/TreeGreen2Mat.mat
Normal file
138
Assets/Materials/TreeGreen2Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-8079581851252746576
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: TreeGreen2Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.3019608, g: 0.59607846, b: 0.15294118, a: 1}
|
||||||
|
- _Color: {r: 0.30196077, g: 0.5960784, b: 0.15294114, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/TreeGreen2Mat.mat.meta
Normal file
15
Assets/Materials/TreeGreen2Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b6747bf277df0e344ac544c7cfa37c62
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/TreeGreen2Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/TreeOrangeMat.mat
Normal file
138
Assets/Materials/TreeOrangeMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: TreeOrangeMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.9254902, g: 0.6, b: 0.1254902, a: 1}
|
||||||
|
- _Color: {r: 0.9254902, g: 0.6, b: 0.12549016, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &8055897138333884152
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/TreeOrangeMat.mat.meta
Normal file
15
Assets/Materials/TreeOrangeMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 33535d2d31f89e846b6ec7c60219cb96
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/TreeOrangeMat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/TreePinkMat.mat
Normal file
138
Assets/Materials/TreePinkMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: TreePinkMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.44705883, b: 0.6745098, a: 1}
|
||||||
|
- _Color: {r: 1, g: 0.4470588, b: 0.6745098, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &5974931177563081965
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/TreePinkMat.mat.meta
Normal file
15
Assets/Materials/TreePinkMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e8231e5e093c804458795712745c4041
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/TreePinkMat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/TreeRedMat.mat
Normal file
138
Assets/Materials/TreeRedMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: TreeRedMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.8745098, g: 0.4392157, b: 1, a: 1}
|
||||||
|
- _Color: {r: 0.8745098, g: 0.43921566, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &2337907632141962616
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/TreeRedMat.mat.meta
Normal file
15
Assets/Materials/TreeRedMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f154dff7fb489d2499686dc9f08c626a
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/TreeRedMat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/TreeYellowMat.mat
Normal file
138
Assets/Materials/TreeYellowMat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%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: TreeYellowMat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.84313726, b: 0.19215687, a: 1}
|
||||||
|
- _Color: {r: 1, g: 0.8431372, b: 0.19215682, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &9096231894155169978
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
15
Assets/Materials/TreeYellowMat.mat.meta
Normal file
15
Assets/Materials/TreeYellowMat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1b3799f72f9aa654d9f7a3787feef4ee
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/TreeYellowMat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Wood1Mat.mat
Normal file
138
Assets/Materials/Wood1Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-5042034021279010468
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Wood1Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.69803923, g: 0.42745098, b: 0.16862746, a: 1}
|
||||||
|
- _Color: {r: 0.69803923, g: 0.42745095, b: 0.16862741, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/Wood1Mat.mat.meta
Normal file
15
Assets/Materials/Wood1Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 57f391477e46ecd44af6579114e37dfb
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Wood1Mat.mat
|
||||||
|
uploadId: 355026
|
138
Assets/Materials/Wood2Mat.mat
Normal file
138
Assets/Materials/Wood2Mat.mat
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-2563699239131985293
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 9
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Wood2Mat
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, 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:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.85882354, g: 0.72156864, b: 0.57254905, a: 1}
|
||||||
|
- _Color: {r: 0.85882354, g: 0.72156864, b: 0.57254905, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
15
Assets/Materials/Wood2Mat.mat.meta
Normal file
15
Assets/Materials/Wood2Mat.mat.meta
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 983007e3e230f954187baf11f58a929d
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 157552
|
||||||
|
packageName: Simple Low Poly Nature Pack
|
||||||
|
packageVersion: 1.2
|
||||||
|
assetPath: Assets/SimpleLowPolyNature/Materials/Wood2Mat.mat
|
||||||
|
uploadId: 355026
|
8
Assets/Mirror.meta
Normal file
8
Assets/Mirror.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1c9f8dc0aab937744b75430053b820e6
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
Assets/Mirror/Authenticators.meta
Normal file
8
Assets/Mirror/Authenticators.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1b2f9d254154cd942ba40b06b869b8f3
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
192
Assets/Mirror/Authenticators/BasicAuthenticator.cs
Normal file
192
Assets/Mirror/Authenticators/BasicAuthenticator.cs
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror.Authenticators
|
||||||
|
{
|
||||||
|
[AddComponentMenu("Network/ Authenticators/Basic Authenticator")]
|
||||||
|
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-authenticators/basic-authenticator")]
|
||||||
|
public class BasicAuthenticator : NetworkAuthenticator
|
||||||
|
{
|
||||||
|
[Header("Server Credentials")]
|
||||||
|
public string serverUsername;
|
||||||
|
public string serverPassword;
|
||||||
|
|
||||||
|
[Header("Client Credentials")]
|
||||||
|
public string username;
|
||||||
|
public string password;
|
||||||
|
|
||||||
|
readonly HashSet<NetworkConnectionToClient> connectionsPendingDisconnect = new HashSet<NetworkConnectionToClient>();
|
||||||
|
|
||||||
|
#region Messages
|
||||||
|
|
||||||
|
public struct AuthRequestMessage : NetworkMessage
|
||||||
|
{
|
||||||
|
// use whatever credentials make sense for your game
|
||||||
|
// for example, you might want to pass the accessToken if using oauth
|
||||||
|
public string authUsername;
|
||||||
|
public string authPassword;
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct AuthResponseMessage : NetworkMessage
|
||||||
|
{
|
||||||
|
public byte code;
|
||||||
|
public string message;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Server
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server from StartServer to initialize the Authenticator
|
||||||
|
/// <para>Server message handlers should be registered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStartServer()
|
||||||
|
{
|
||||||
|
// register a handler for the authentication request we expect from client
|
||||||
|
NetworkServer.RegisterHandler<AuthRequestMessage>(OnAuthRequestMessage, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server from StopServer to reset the Authenticator
|
||||||
|
/// <para>Server message handlers should be unregistered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStopServer()
|
||||||
|
{
|
||||||
|
// unregister the handler for the authentication request
|
||||||
|
NetworkServer.UnregisterHandler<AuthRequestMessage>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server from OnServerConnectInternal when a client needs to authenticate
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="conn">Connection to client.</param>
|
||||||
|
public override void OnServerAuthenticate(NetworkConnectionToClient conn)
|
||||||
|
{
|
||||||
|
// do nothing...wait for AuthRequestMessage from client
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server when the client's AuthRequestMessage arrives
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="conn">Connection to client.</param>
|
||||||
|
/// <param name="msg">The message payload</param>
|
||||||
|
public void OnAuthRequestMessage(NetworkConnectionToClient conn, AuthRequestMessage msg)
|
||||||
|
{
|
||||||
|
//Debug.Log($"Authentication Request: {msg.authUsername} {msg.authPassword}");
|
||||||
|
|
||||||
|
if (connectionsPendingDisconnect.Contains(conn)) return;
|
||||||
|
|
||||||
|
// check the credentials by calling your web server, database table, playfab api, or any method appropriate.
|
||||||
|
if (msg.authUsername == serverUsername && msg.authPassword == serverPassword)
|
||||||
|
{
|
||||||
|
// create and send msg to client so it knows to proceed
|
||||||
|
AuthResponseMessage authResponseMessage = new AuthResponseMessage
|
||||||
|
{
|
||||||
|
code = 100,
|
||||||
|
message = "Success"
|
||||||
|
};
|
||||||
|
|
||||||
|
conn.Send(authResponseMessage);
|
||||||
|
|
||||||
|
// Accept the successful authentication
|
||||||
|
ServerAccept(conn);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
connectionsPendingDisconnect.Add(conn);
|
||||||
|
|
||||||
|
// create and send msg to client so it knows to disconnect
|
||||||
|
AuthResponseMessage authResponseMessage = new AuthResponseMessage
|
||||||
|
{
|
||||||
|
code = 200,
|
||||||
|
message = "Invalid Credentials"
|
||||||
|
};
|
||||||
|
|
||||||
|
conn.Send(authResponseMessage);
|
||||||
|
|
||||||
|
// must set NetworkConnection isAuthenticated = false
|
||||||
|
conn.isAuthenticated = false;
|
||||||
|
|
||||||
|
// disconnect the client after 1 second so that response message gets delivered
|
||||||
|
StartCoroutine(DelayedDisconnect(conn, 1f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator DelayedDisconnect(NetworkConnectionToClient conn, float waitTime)
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(waitTime);
|
||||||
|
|
||||||
|
// Reject the unsuccessful authentication
|
||||||
|
ServerReject(conn);
|
||||||
|
|
||||||
|
yield return null;
|
||||||
|
|
||||||
|
// remove conn from pending connections
|
||||||
|
connectionsPendingDisconnect.Remove(conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Client
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client from StartClient to initialize the Authenticator
|
||||||
|
/// <para>Client message handlers should be registered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStartClient()
|
||||||
|
{
|
||||||
|
// register a handler for the authentication response we expect from server
|
||||||
|
NetworkClient.RegisterHandler<AuthResponseMessage>(OnAuthResponseMessage, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client from StopClient to reset the Authenticator
|
||||||
|
/// <para>Client message handlers should be unregistered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStopClient()
|
||||||
|
{
|
||||||
|
// unregister the handler for the authentication response
|
||||||
|
NetworkClient.UnregisterHandler<AuthResponseMessage>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client from OnClientConnectInternal when a client needs to authenticate
|
||||||
|
/// </summary>
|
||||||
|
public override void OnClientAuthenticate()
|
||||||
|
{
|
||||||
|
AuthRequestMessage authRequestMessage = new AuthRequestMessage
|
||||||
|
{
|
||||||
|
authUsername = username,
|
||||||
|
authPassword = password
|
||||||
|
};
|
||||||
|
|
||||||
|
NetworkClient.Send(authRequestMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client when the server's AuthResponseMessage arrives
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="msg">The message payload</param>
|
||||||
|
public void OnAuthResponseMessage(AuthResponseMessage msg)
|
||||||
|
{
|
||||||
|
if (msg.code == 100)
|
||||||
|
{
|
||||||
|
//Debug.Log($"Authentication Response: {msg.message}");
|
||||||
|
|
||||||
|
// Authentication has been accepted
|
||||||
|
ClientAccept();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogError($"Authentication Response: {msg.message}");
|
||||||
|
|
||||||
|
// Authentication has been rejected
|
||||||
|
ClientReject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/Authenticators/BasicAuthenticator.cs.meta
Normal file
18
Assets/Mirror/Authenticators/BasicAuthenticator.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 28496b776660156428f00cf78289c1ec
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Authenticators/BasicAuthenticator.cs
|
||||||
|
uploadId: 736421
|
129
Assets/Mirror/Authenticators/DeviceAuthenticator.cs
Normal file
129
Assets/Mirror/Authenticators/DeviceAuthenticator.cs
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror.Authenticators
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An authenticator that identifies the user by their device.
|
||||||
|
/// <para>A GUID is used as a fallback when the platform doesn't support SystemInfo.deviceUniqueIdentifier.</para>
|
||||||
|
/// <para>Note: deviceUniqueIdentifier can be spoofed, so security is not guaranteed.</para>
|
||||||
|
/// <para>See https://docs.unity3d.com/ScriptReference/SystemInfo-deviceUniqueIdentifier.html for details.</para>
|
||||||
|
/// </summary>
|
||||||
|
[AddComponentMenu("Network/ Authenticators/Device Authenticator")]
|
||||||
|
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-authenticators/device-authenticator")]
|
||||||
|
public class DeviceAuthenticator : NetworkAuthenticator
|
||||||
|
{
|
||||||
|
#region Messages
|
||||||
|
|
||||||
|
public struct AuthRequestMessage : NetworkMessage
|
||||||
|
{
|
||||||
|
public string clientDeviceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct AuthResponseMessage : NetworkMessage { }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Server
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server from StartServer to initialize the Authenticator
|
||||||
|
/// <para>Server message handlers should be registered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStartServer()
|
||||||
|
{
|
||||||
|
// register a handler for the authentication request we expect from client
|
||||||
|
NetworkServer.RegisterHandler<AuthRequestMessage>(OnAuthRequestMessage, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server from StopServer to reset the Authenticator
|
||||||
|
/// <para>Server message handlers should be registered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStopServer()
|
||||||
|
{
|
||||||
|
// unregister the handler for the authentication request
|
||||||
|
NetworkServer.UnregisterHandler<AuthRequestMessage>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on server from OnServerConnectInternal when a client needs to authenticate
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="conn">Connection to client.</param>
|
||||||
|
public override void OnServerAuthenticate(NetworkConnectionToClient conn)
|
||||||
|
{
|
||||||
|
// do nothing, wait for client to send his id
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnAuthRequestMessage(NetworkConnectionToClient conn, AuthRequestMessage msg)
|
||||||
|
{
|
||||||
|
Debug.Log($"connection {conn.connectionId} authenticated with id {msg.clientDeviceID}");
|
||||||
|
|
||||||
|
// Store the device id for later reference, e.g. when spawning the player
|
||||||
|
conn.authenticationData = msg.clientDeviceID;
|
||||||
|
|
||||||
|
// Send a response to client telling it to proceed as authenticated
|
||||||
|
conn.Send(new AuthResponseMessage());
|
||||||
|
|
||||||
|
// Accept the successful authentication
|
||||||
|
ServerAccept(conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Client
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client from StartClient to initialize the Authenticator
|
||||||
|
/// <para>Client message handlers should be registered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStartClient()
|
||||||
|
{
|
||||||
|
// register a handler for the authentication response we expect from server
|
||||||
|
NetworkClient.RegisterHandler<AuthResponseMessage>(OnAuthResponseMessage, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client from StopClient to reset the Authenticator
|
||||||
|
/// <para>Client message handlers should be unregistered in this method.</para>
|
||||||
|
/// </summary>
|
||||||
|
public override void OnStopClient()
|
||||||
|
{
|
||||||
|
// unregister the handler for the authentication response
|
||||||
|
NetworkClient.UnregisterHandler<AuthResponseMessage>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client from OnClientConnectInternal when a client needs to authenticate
|
||||||
|
/// </summary>
|
||||||
|
public override void OnClientAuthenticate()
|
||||||
|
{
|
||||||
|
string deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier;
|
||||||
|
|
||||||
|
// Not all platforms support this, so we use a GUID instead
|
||||||
|
if (deviceUniqueIdentifier == SystemInfo.unsupportedIdentifier)
|
||||||
|
{
|
||||||
|
// Get the value from PlayerPrefs if it exists, new GUID if it doesn't
|
||||||
|
deviceUniqueIdentifier = PlayerPrefs.GetString("deviceUniqueIdentifier", Guid.NewGuid().ToString());
|
||||||
|
|
||||||
|
// Store the deviceUniqueIdentifier to PlayerPrefs (in case we just made a new GUID)
|
||||||
|
PlayerPrefs.SetString("deviceUniqueIdentifier", deviceUniqueIdentifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
// send the deviceUniqueIdentifier to the server
|
||||||
|
NetworkClient.Send(new AuthRequestMessage { clientDeviceID = deviceUniqueIdentifier } );
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called on client when the server's AuthResponseMessage arrives
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="msg">The message payload</param>
|
||||||
|
public void OnAuthResponseMessage(AuthResponseMessage msg)
|
||||||
|
{
|
||||||
|
Debug.Log("Authentication Success");
|
||||||
|
ClientAccept();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/Authenticators/DeviceAuthenticator.cs.meta
Normal file
18
Assets/Mirror/Authenticators/DeviceAuthenticator.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 60960a6ba81a842deb2fdcdc93788242
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Authenticators/DeviceAuthenticator.cs
|
||||||
|
uploadId: 736421
|
16
Assets/Mirror/Authenticators/Mirror.Authenticators.asmdef
Normal file
16
Assets/Mirror/Authenticators/Mirror.Authenticators.asmdef
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Mirror.Authenticators",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:30817c1a0e6d646d99c048fc403f5979"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e720aa64e3f58fb4880566a322584340
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Authenticators/Mirror.Authenticators.asmdef
|
||||||
|
uploadId: 736421
|
70
Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Normal file
70
Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror.Authenticators
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An authenticator that disconnects connections if they don't
|
||||||
|
/// authenticate within a specified time limit.
|
||||||
|
/// </summary>
|
||||||
|
[AddComponentMenu("Network/ Authenticators/Timeout Authenticator")]
|
||||||
|
public class TimeoutAuthenticator : NetworkAuthenticator
|
||||||
|
{
|
||||||
|
public NetworkAuthenticator authenticator;
|
||||||
|
|
||||||
|
[Range(0, 600), Tooltip("Timeout to auto-disconnect in seconds. Set to 0 for no timeout.")]
|
||||||
|
public float timeout = 60;
|
||||||
|
|
||||||
|
public void Awake()
|
||||||
|
{
|
||||||
|
authenticator.OnServerAuthenticated.AddListener(connection => OnServerAuthenticated.Invoke(connection));
|
||||||
|
authenticator.OnClientAuthenticated.AddListener(OnClientAuthenticated.Invoke);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnStartServer()
|
||||||
|
{
|
||||||
|
authenticator.OnStartServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnStopServer()
|
||||||
|
{
|
||||||
|
authenticator.OnStopServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnStartClient()
|
||||||
|
{
|
||||||
|
authenticator.OnStartClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnStopClient()
|
||||||
|
{
|
||||||
|
authenticator.OnStopClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnServerAuthenticate(NetworkConnectionToClient conn)
|
||||||
|
{
|
||||||
|
authenticator.OnServerAuthenticate(conn);
|
||||||
|
if (timeout > 0)
|
||||||
|
StartCoroutine(BeginAuthentication(conn));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnClientAuthenticate()
|
||||||
|
{
|
||||||
|
authenticator.OnClientAuthenticate();
|
||||||
|
if (timeout > 0)
|
||||||
|
StartCoroutine(BeginAuthentication(NetworkClient.connection));
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator BeginAuthentication(NetworkConnection conn)
|
||||||
|
{
|
||||||
|
//Debug.Log($"Authentication countdown started {conn} {timeout}");
|
||||||
|
yield return new WaitForSecondsRealtime(timeout);
|
||||||
|
|
||||||
|
if (!conn.isAuthenticated)
|
||||||
|
{
|
||||||
|
Debug.LogError($"Authentication Timeout - Disconnecting {conn}");
|
||||||
|
conn.Disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/Authenticators/TimeoutAuthenticator.cs.meta
Normal file
18
Assets/Mirror/Authenticators/TimeoutAuthenticator.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 24d8269a07b8e4edfa374753a91c946e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
|
||||||
|
uploadId: 736421
|
8
Assets/Mirror/CompilerSymbols.meta
Normal file
8
Assets/Mirror/CompilerSymbols.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1f8b918bcd89f5c488b06f5574f34760
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
14
Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef
Normal file
14
Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "Mirror.CompilerSymbols",
|
||||||
|
"references": [],
|
||||||
|
"optionalUnityReferences": [],
|
||||||
|
"includePlatforms": [
|
||||||
|
"Editor"
|
||||||
|
],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": []
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 325984b52e4128546bc7558552f8b1d2
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef
|
||||||
|
uploadId: 736421
|
45
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
Normal file
45
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
static class PreprocessorDefine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Add define symbols as soon as Unity gets done compiling.
|
||||||
|
/// </summary>
|
||||||
|
[InitializeOnLoadMethod]
|
||||||
|
public static void AddDefineSymbols()
|
||||||
|
{
|
||||||
|
#if UNITY_2021_2_OR_NEWER
|
||||||
|
string currentDefines = PlayerSettings.GetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup));
|
||||||
|
#else
|
||||||
|
// Deprecated in Unity 2023.1
|
||||||
|
string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||||
|
#endif
|
||||||
|
// Remove oldest when adding next month's symbol.
|
||||||
|
// Keep a rolling 12 months of symbols.
|
||||||
|
HashSet<string> defines = new HashSet<string>(currentDefines.Split(';'))
|
||||||
|
{
|
||||||
|
"MIRROR",
|
||||||
|
"MIRROR_89_OR_NEWER",
|
||||||
|
"MIRROR_90_OR_NEWER",
|
||||||
|
"MIRROR_93_OR_NEWER",
|
||||||
|
"MIRROR_96_OR_NEWER"
|
||||||
|
};
|
||||||
|
|
||||||
|
// only touch PlayerSettings if we actually modified it,
|
||||||
|
// otherwise it shows up as changed in git each time.
|
||||||
|
string newDefines = string.Join(";", defines);
|
||||||
|
if (newDefines != currentDefines)
|
||||||
|
{
|
||||||
|
#if UNITY_2021_2_OR_NEWER
|
||||||
|
PlayerSettings.SetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup), newDefines);
|
||||||
|
#else
|
||||||
|
// Deprecated in Unity 2023.1
|
||||||
|
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, newDefines);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs.meta
Normal file
18
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f1d66fe74ec6f42dd974cba37d25d453
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
|
||||||
|
uploadId: 736421
|
8
Assets/Mirror/Components.meta
Normal file
8
Assets/Mirror/Components.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9bee879fbc8ef4b1a9a9f7088bfbf726
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
12
Assets/Mirror/Components/AssemblyInfo.cs
Normal file
12
Assets/Mirror/Components/AssemblyInfo.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Tests.Common")]
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Tests")]
|
||||||
|
// need to use Unity.*.CodeGen assembly name to import Unity.CompilationPipeline
|
||||||
|
// for ILPostProcessor tests.
|
||||||
|
[assembly: InternalsVisibleTo("Unity.Mirror.Tests.CodeGen")]
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Tests.Generated")]
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Tests.Runtime")]
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Tests.Performance.Editor")]
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Tests.Performance.Runtime")]
|
||||||
|
[assembly: InternalsVisibleTo("Mirror.Editor")]
|
18
Assets/Mirror/Components/AssemblyInfo.cs.meta
Normal file
18
Assets/Mirror/Components/AssemblyInfo.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a65b9283f7a724e70b8e17cb277f4c1e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/AssemblyInfo.cs
|
||||||
|
uploadId: 736421
|
8
Assets/Mirror/Components/Discovery.meta
Normal file
8
Assets/Mirror/Components/Discovery.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b5dcf9618f5e14a4eb60bff5480284a6
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
93
Assets/Mirror/Components/Discovery/NetworkDiscovery.cs
Normal file
93
Assets/Mirror/Components/Discovery/NetworkDiscovery.cs
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
|
||||||
|
namespace Mirror.Discovery
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class ServerFoundUnityEvent<TResponseType> : UnityEvent<TResponseType> {};
|
||||||
|
|
||||||
|
[DisallowMultipleComponent]
|
||||||
|
[AddComponentMenu("Network/Network Discovery")]
|
||||||
|
public class NetworkDiscovery : NetworkDiscoveryBase<ServerRequest, ServerResponse>
|
||||||
|
{
|
||||||
|
#region Server
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Process the request from a client
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Override if you wish to provide more information to the clients
|
||||||
|
/// such as the name of the host player
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="request">Request coming from client</param>
|
||||||
|
/// <param name="endpoint">Address of the client that sent the request</param>
|
||||||
|
/// <returns>The message to be sent back to the client or null</returns>
|
||||||
|
protected override ServerResponse ProcessRequest(ServerRequest request, IPEndPoint endpoint)
|
||||||
|
{
|
||||||
|
// In this case we don't do anything with the request
|
||||||
|
// but other discovery implementations might want to use the data
|
||||||
|
// in there, This way the client can ask for
|
||||||
|
// specific game mode or something
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// this is an example reply message, return your own
|
||||||
|
// to include whatever is relevant for your game
|
||||||
|
return new ServerResponse
|
||||||
|
{
|
||||||
|
serverId = ServerId,
|
||||||
|
uri = transport.ServerUri()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (NotImplementedException)
|
||||||
|
{
|
||||||
|
Debug.LogError($"Transport {transport} does not support network discovery");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Client
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a message that will be broadcasted on the network to discover servers
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Override if you wish to include additional data in the discovery message
|
||||||
|
/// such as desired game mode, language, difficulty, etc... </remarks>
|
||||||
|
/// <returns>An instance of ServerRequest with data to be broadcasted</returns>
|
||||||
|
protected override ServerRequest GetRequest() => new ServerRequest();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Process the answer from a server
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// A client receives a reply from a server, this method processes the
|
||||||
|
/// reply and raises an event
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="response">Response that came from the server</param>
|
||||||
|
/// <param name="endpoint">Address of the server that replied</param>
|
||||||
|
protected override void ProcessResponse(ServerResponse response, IPEndPoint endpoint)
|
||||||
|
{
|
||||||
|
// we received a message from the remote endpoint
|
||||||
|
response.EndPoint = endpoint;
|
||||||
|
|
||||||
|
// although we got a supposedly valid url, we may not be able to resolve
|
||||||
|
// the provided host
|
||||||
|
// However we know the real ip address of the server because we just
|
||||||
|
// received a packet from it, so use that as host.
|
||||||
|
UriBuilder realUri = new UriBuilder(response.uri)
|
||||||
|
{
|
||||||
|
Host = response.EndPoint.Address.ToString()
|
||||||
|
};
|
||||||
|
response.uri = realUri.Uri;
|
||||||
|
|
||||||
|
OnServerFound.Invoke(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/Components/Discovery/NetworkDiscovery.cs.meta
Normal file
18
Assets/Mirror/Components/Discovery/NetworkDiscovery.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c761308e733c51245b2e8bb4201f46dc
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/Discovery/NetworkDiscovery.cs
|
||||||
|
uploadId: 736421
|
473
Assets/Mirror/Components/Discovery/NetworkDiscoveryBase.cs
Normal file
473
Assets/Mirror/Components/Discovery/NetworkDiscoveryBase.cs
Normal file
@ -0,0 +1,473 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
// Based on https://github.com/EnlightenedOne/MirrorNetworkDiscovery
|
||||||
|
// forked from https://github.com/in0finite/MirrorNetworkDiscovery
|
||||||
|
// Both are MIT Licensed
|
||||||
|
|
||||||
|
namespace Mirror.Discovery
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Base implementation for Network Discovery. Extend this component
|
||||||
|
/// to provide custom discovery with game specific data
|
||||||
|
/// <see cref="NetworkDiscovery">NetworkDiscovery</see> for a sample implementation
|
||||||
|
/// </summary>
|
||||||
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-discovery")]
|
||||||
|
public abstract class NetworkDiscoveryBase<Request, Response> : MonoBehaviour
|
||||||
|
where Request : NetworkMessage
|
||||||
|
where Response : NetworkMessage
|
||||||
|
{
|
||||||
|
public static bool SupportedOnThisPlatform { get { return Application.platform != RuntimePlatform.WebGLPlayer; } }
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("If true, broadcasts a discovery request every ActiveDiscoveryInterval seconds")]
|
||||||
|
public bool enableActiveDiscovery = true;
|
||||||
|
|
||||||
|
// broadcast address needs to be configurable on iOS:
|
||||||
|
// https://github.com/vis2k/Mirror/pull/3255
|
||||||
|
[Tooltip("iOS may require LAN IP address here (e.g. 192.168.x.x), otherwise leave blank.")]
|
||||||
|
public string BroadcastAddress = "";
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("The UDP port the server will listen for multi-cast messages")]
|
||||||
|
protected int serverBroadcastListenPort = 47777;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Time in seconds between multi-cast messages")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
float ActiveDiscoveryInterval = 3;
|
||||||
|
|
||||||
|
[Tooltip("Transport to be advertised during discovery")]
|
||||||
|
public Transport transport;
|
||||||
|
|
||||||
|
[Tooltip("Invoked when a server is found")]
|
||||||
|
public ServerFoundUnityEvent<Response> OnServerFound;
|
||||||
|
|
||||||
|
// Each game should have a random unique handshake,
|
||||||
|
// this way you can tell if this is the same game or not
|
||||||
|
[HideInInspector]
|
||||||
|
public long secretHandshake;
|
||||||
|
|
||||||
|
public long ServerId { get; private set; }
|
||||||
|
|
||||||
|
protected UdpClient serverUdpClient;
|
||||||
|
protected UdpClient clientUdpClient;
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
public virtual void OnValidate()
|
||||||
|
{
|
||||||
|
if (transport == null)
|
||||||
|
transport = GetComponent<Transport>();
|
||||||
|
|
||||||
|
if (secretHandshake == 0)
|
||||||
|
{
|
||||||
|
secretHandshake = RandomLong();
|
||||||
|
UnityEditor.Undo.RecordObject(this, "Set secret handshake");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// virtual so that inheriting classes' Start() can call base.Start() too
|
||||||
|
/// </summary>
|
||||||
|
public virtual void Start()
|
||||||
|
{
|
||||||
|
ServerId = RandomLong();
|
||||||
|
|
||||||
|
// active transport gets initialized in Awake
|
||||||
|
// so make sure we set it here in Start() after Awake
|
||||||
|
// Or just let the user assign it in the inspector
|
||||||
|
if (transport == null)
|
||||||
|
transport = Transport.active;
|
||||||
|
|
||||||
|
// Server mode? then start advertising
|
||||||
|
if (Utils.IsHeadless())
|
||||||
|
{
|
||||||
|
AdvertiseServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long RandomLong()
|
||||||
|
{
|
||||||
|
int value1 = UnityEngine.Random.Range(int.MinValue, int.MaxValue);
|
||||||
|
int value2 = UnityEngine.Random.Range(int.MinValue, int.MaxValue);
|
||||||
|
return value1 + ((long)value2 << 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure the ports are cleared no matter when Game/Unity UI exits
|
||||||
|
void OnApplicationQuit()
|
||||||
|
{
|
||||||
|
//Debug.Log("NetworkDiscoveryBase OnApplicationQuit");
|
||||||
|
Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnDisable()
|
||||||
|
{
|
||||||
|
//Debug.Log("NetworkDiscoveryBase OnDisable");
|
||||||
|
Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
//Debug.Log("NetworkDiscoveryBase OnDestroy");
|
||||||
|
Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Shutdown()
|
||||||
|
{
|
||||||
|
EndpMulticastLock();
|
||||||
|
if (serverUdpClient != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
serverUdpClient.Close();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// it is just close, swallow the error
|
||||||
|
}
|
||||||
|
|
||||||
|
serverUdpClient = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clientUdpClient != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
clientUdpClient.Close();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// it is just close, swallow the error
|
||||||
|
}
|
||||||
|
|
||||||
|
clientUdpClient = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
CancelInvoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Server
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Advertise this server in the local network
|
||||||
|
/// </summary>
|
||||||
|
public void AdvertiseServer()
|
||||||
|
{
|
||||||
|
if (!SupportedOnThisPlatform)
|
||||||
|
throw new PlatformNotSupportedException("Network discovery not supported in this platform");
|
||||||
|
|
||||||
|
StopDiscovery();
|
||||||
|
|
||||||
|
// Setup port -- may throw exception
|
||||||
|
serverUdpClient = new UdpClient(serverBroadcastListenPort)
|
||||||
|
{
|
||||||
|
EnableBroadcast = true,
|
||||||
|
MulticastLoopback = false
|
||||||
|
};
|
||||||
|
|
||||||
|
//Debug.Log($"Discovery: Advertising Server {Dns.GetHostName()}");
|
||||||
|
|
||||||
|
// listen for client pings
|
||||||
|
_ = ServerListenAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task ServerListenAsync()
|
||||||
|
{
|
||||||
|
BeginMulticastLock();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await ReceiveRequestAsync(serverUdpClient);
|
||||||
|
}
|
||||||
|
catch (ObjectDisposedException)
|
||||||
|
{
|
||||||
|
// socket has been closed
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch (Exception) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task ReceiveRequestAsync(UdpClient udpClient)
|
||||||
|
{
|
||||||
|
// only proceed if there is available data in network buffer, or otherwise Receive() will block
|
||||||
|
// average time for UdpClient.Available : 10 us
|
||||||
|
|
||||||
|
UdpReceiveResult udpReceiveResult = await udpClient.ReceiveAsync();
|
||||||
|
|
||||||
|
using (NetworkReaderPooled networkReader = NetworkReaderPool.Get(udpReceiveResult.Buffer))
|
||||||
|
{
|
||||||
|
long handshake = networkReader.ReadLong();
|
||||||
|
if (handshake != secretHandshake)
|
||||||
|
{
|
||||||
|
// message is not for us
|
||||||
|
throw new ProtocolViolationException("Invalid handshake");
|
||||||
|
}
|
||||||
|
|
||||||
|
Request request = networkReader.Read<Request>();
|
||||||
|
|
||||||
|
ProcessClientRequest(request, udpReceiveResult.RemoteEndPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reply to the client to inform it of this server
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Override if you wish to ignore server requests based on
|
||||||
|
/// custom criteria such as language, full server game mode or difficulty
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="request">Request coming from client</param>
|
||||||
|
/// <param name="endpoint">Address of the client that sent the request</param>
|
||||||
|
protected virtual void ProcessClientRequest(Request request, IPEndPoint endpoint)
|
||||||
|
{
|
||||||
|
Response info = ProcessRequest(request, endpoint);
|
||||||
|
|
||||||
|
if (info == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
using (NetworkWriterPooled writer = NetworkWriterPool.Get())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
writer.WriteLong(secretHandshake);
|
||||||
|
|
||||||
|
writer.Write(info);
|
||||||
|
|
||||||
|
ArraySegment<byte> data = writer.ToArraySegment();
|
||||||
|
// signature matches
|
||||||
|
// send response
|
||||||
|
serverUdpClient.Send(data.Array, data.Count, endpoint);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.LogException(ex, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Process the request from a client
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Override if you wish to provide more information to the clients
|
||||||
|
/// such as the name of the host player
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="request">Request coming from client</param>
|
||||||
|
/// <param name="endpoint">Address of the client that sent the request</param>
|
||||||
|
/// <returns>The message to be sent back to the client or null</returns>
|
||||||
|
protected abstract Response ProcessRequest(Request request, IPEndPoint endpoint);
|
||||||
|
|
||||||
|
// Android Multicast fix: https://github.com/vis2k/Mirror/pull/2887
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
AndroidJavaObject multicastLock;
|
||||||
|
bool hasMulticastLock;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void BeginMulticastLock()
|
||||||
|
{
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
if (hasMulticastLock) return;
|
||||||
|
|
||||||
|
if (Application.platform == RuntimePlatform.Android)
|
||||||
|
{
|
||||||
|
using (AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity"))
|
||||||
|
{
|
||||||
|
using (var wifiManager = activity.Call<AndroidJavaObject>("getSystemService", "wifi"))
|
||||||
|
{
|
||||||
|
multicastLock = wifiManager.Call<AndroidJavaObject>("createMulticastLock", "lock");
|
||||||
|
multicastLock.Call("acquire");
|
||||||
|
hasMulticastLock = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void EndpMulticastLock()
|
||||||
|
{
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
if (!hasMulticastLock) return;
|
||||||
|
|
||||||
|
multicastLock?.Call("release");
|
||||||
|
hasMulticastLock = false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Client
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Start Active Discovery
|
||||||
|
/// </summary>
|
||||||
|
public void StartDiscovery()
|
||||||
|
{
|
||||||
|
if (!SupportedOnThisPlatform)
|
||||||
|
throw new PlatformNotSupportedException("Network discovery not supported in this platform");
|
||||||
|
|
||||||
|
StopDiscovery();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Setup port
|
||||||
|
clientUdpClient = new UdpClient(0)
|
||||||
|
{
|
||||||
|
EnableBroadcast = true,
|
||||||
|
MulticastLoopback = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// Free the port if we took it
|
||||||
|
//Debug.LogError("NetworkDiscoveryBase StartDiscovery Exception");
|
||||||
|
Shutdown();
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ = ClientListenAsync();
|
||||||
|
|
||||||
|
if (enableActiveDiscovery) InvokeRepeating(nameof(BroadcastDiscoveryRequest), 0, ActiveDiscoveryInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stop Active Discovery
|
||||||
|
/// </summary>
|
||||||
|
public void StopDiscovery()
|
||||||
|
{
|
||||||
|
//Debug.Log("NetworkDiscoveryBase StopDiscovery");
|
||||||
|
Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Awaits for server response
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>ClientListenAsync Task</returns>
|
||||||
|
public async Task ClientListenAsync()
|
||||||
|
{
|
||||||
|
// while clientUpdClient to fix:
|
||||||
|
// https://github.com/vis2k/Mirror/pull/2908
|
||||||
|
//
|
||||||
|
// If, you cancel discovery the clientUdpClient is set to null.
|
||||||
|
// However, nothing cancels ClientListenAsync. If we change the if(true)
|
||||||
|
// to check if the client is null. You can properly cancel the discovery,
|
||||||
|
// and kill the listen thread.
|
||||||
|
//
|
||||||
|
// Prior to this fix, if you cancel the discovery search. It crashes the
|
||||||
|
// thread, and is super noisy in the output. As well as causes issues on
|
||||||
|
// the quest.
|
||||||
|
while (clientUdpClient != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await ReceiveGameBroadcastAsync(clientUdpClient);
|
||||||
|
}
|
||||||
|
catch (ObjectDisposedException)
|
||||||
|
{
|
||||||
|
// socket was closed, no problem
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.LogException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sends discovery request from client
|
||||||
|
/// </summary>
|
||||||
|
public void BroadcastDiscoveryRequest()
|
||||||
|
{
|
||||||
|
if (clientUdpClient == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (NetworkClient.isConnected)
|
||||||
|
{
|
||||||
|
StopDiscovery();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IPEndPoint endPoint = new IPEndPoint(IPAddress.Broadcast, serverBroadcastListenPort);
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(BroadcastAddress))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
endPoint = new IPEndPoint(IPAddress.Parse(BroadcastAddress), serverBroadcastListenPort);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.LogException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
using (NetworkWriterPooled writer = NetworkWriterPool.Get())
|
||||||
|
{
|
||||||
|
writer.WriteLong(secretHandshake);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Request request = GetRequest();
|
||||||
|
|
||||||
|
writer.Write(request);
|
||||||
|
|
||||||
|
ArraySegment<byte> data = writer.ToArraySegment();
|
||||||
|
|
||||||
|
//Debug.Log($"Discovery: Sending BroadcastDiscoveryRequest {request}");
|
||||||
|
clientUdpClient.SendAsync(data.Array, data.Count, endPoint);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// It is ok if we can't broadcast to one of the addresses
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a message that will be broadcasted on the network to discover servers
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Override if you wish to include additional data in the discovery message
|
||||||
|
/// such as desired game mode, language, difficulty, etc... </remarks>
|
||||||
|
/// <returns>An instance of ServerRequest with data to be broadcasted</returns>
|
||||||
|
protected virtual Request GetRequest() => default;
|
||||||
|
|
||||||
|
async Task ReceiveGameBroadcastAsync(UdpClient udpClient)
|
||||||
|
{
|
||||||
|
// only proceed if there is available data in network buffer, or otherwise Receive() will block
|
||||||
|
// average time for UdpClient.Available : 10 us
|
||||||
|
|
||||||
|
UdpReceiveResult udpReceiveResult = await udpClient.ReceiveAsync();
|
||||||
|
|
||||||
|
using (NetworkReaderPooled networkReader = NetworkReaderPool.Get(udpReceiveResult.Buffer))
|
||||||
|
{
|
||||||
|
if (networkReader.ReadLong() != secretHandshake)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Response response = networkReader.Read<Response>();
|
||||||
|
|
||||||
|
ProcessResponse(response, udpReceiveResult.RemoteEndPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Process the answer from a server
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// A client receives a reply from a server, this method processes the
|
||||||
|
/// reply and raises an event
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="response">Response that came from the server</param>
|
||||||
|
/// <param name="endpoint">Address of the server that replied</param>
|
||||||
|
protected abstract void ProcessResponse(Response response, IPEndPoint endpoint);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b9971d60ce61f4e39b07cd9e7e0c68fa
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/Discovery/NetworkDiscoveryBase.cs
|
||||||
|
uploadId: 736421
|
144
Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs
Normal file
144
Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror.Discovery
|
||||||
|
{
|
||||||
|
[DisallowMultipleComponent]
|
||||||
|
[AddComponentMenu("Network/Network Discovery HUD")]
|
||||||
|
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-discovery")]
|
||||||
|
[RequireComponent(typeof(NetworkDiscovery))]
|
||||||
|
public class NetworkDiscoveryHUD : MonoBehaviour
|
||||||
|
{
|
||||||
|
readonly Dictionary<long, ServerResponse> discoveredServers = new Dictionary<long, ServerResponse>();
|
||||||
|
Vector2 scrollViewPos = Vector2.zero;
|
||||||
|
|
||||||
|
public NetworkDiscovery networkDiscovery;
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
void OnValidate()
|
||||||
|
{
|
||||||
|
if (Application.isPlaying) return;
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset()
|
||||||
|
{
|
||||||
|
networkDiscovery = GetComponent<NetworkDiscovery>();
|
||||||
|
|
||||||
|
// Add default event handler if not already present
|
||||||
|
if (!Enumerable.Range(0, networkDiscovery.OnServerFound.GetPersistentEventCount())
|
||||||
|
.Any(i => networkDiscovery.OnServerFound.GetPersistentMethodName(i) == nameof(OnDiscoveredServer)))
|
||||||
|
{
|
||||||
|
UnityEditor.Events.UnityEventTools.AddPersistentListener(networkDiscovery.OnServerFound, OnDiscoveredServer);
|
||||||
|
UnityEditor.Undo.RecordObjects(new UnityEngine.Object[] { this, networkDiscovery }, "Set NetworkDiscovery");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void OnGUI()
|
||||||
|
{
|
||||||
|
if (NetworkManager.singleton == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!NetworkClient.isConnected && !NetworkServer.active && !NetworkClient.active)
|
||||||
|
DrawGUI();
|
||||||
|
|
||||||
|
if (NetworkServer.active || NetworkClient.active)
|
||||||
|
StopButtons();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawGUI()
|
||||||
|
{
|
||||||
|
GUILayout.BeginArea(new Rect(10, 10, 300, 500));
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
|
||||||
|
if (GUILayout.Button("Find Servers"))
|
||||||
|
{
|
||||||
|
discoveredServers.Clear();
|
||||||
|
networkDiscovery.StartDiscovery();
|
||||||
|
}
|
||||||
|
|
||||||
|
// LAN Host
|
||||||
|
if (GUILayout.Button("Start Host"))
|
||||||
|
{
|
||||||
|
discoveredServers.Clear();
|
||||||
|
NetworkManager.singleton.StartHost();
|
||||||
|
networkDiscovery.AdvertiseServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dedicated server
|
||||||
|
if (GUILayout.Button("Start Server"))
|
||||||
|
{
|
||||||
|
discoveredServers.Clear();
|
||||||
|
NetworkManager.singleton.StartServer();
|
||||||
|
networkDiscovery.AdvertiseServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
// show list of found server
|
||||||
|
|
||||||
|
GUILayout.Label($"Discovered Servers [{discoveredServers.Count}]:");
|
||||||
|
|
||||||
|
// servers
|
||||||
|
scrollViewPos = GUILayout.BeginScrollView(scrollViewPos);
|
||||||
|
|
||||||
|
foreach (ServerResponse info in discoveredServers.Values)
|
||||||
|
if (GUILayout.Button(info.EndPoint.Address.ToString()))
|
||||||
|
Connect(info);
|
||||||
|
|
||||||
|
GUILayout.EndScrollView();
|
||||||
|
GUILayout.EndArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StopButtons()
|
||||||
|
{
|
||||||
|
GUILayout.BeginArea(new Rect(10, 40, 100, 25));
|
||||||
|
|
||||||
|
// stop host if host mode
|
||||||
|
if (NetworkServer.active && NetworkClient.isConnected)
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Stop Host"))
|
||||||
|
{
|
||||||
|
NetworkManager.singleton.StopHost();
|
||||||
|
networkDiscovery.StopDiscovery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// stop client if client-only
|
||||||
|
else if (NetworkClient.isConnected)
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Stop Client"))
|
||||||
|
{
|
||||||
|
NetworkManager.singleton.StopClient();
|
||||||
|
networkDiscovery.StopDiscovery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// stop server if server-only
|
||||||
|
else if (NetworkServer.active)
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Stop Server"))
|
||||||
|
{
|
||||||
|
NetworkManager.singleton.StopServer();
|
||||||
|
networkDiscovery.StopDiscovery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.EndArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Connect(ServerResponse info)
|
||||||
|
{
|
||||||
|
networkDiscovery.StopDiscovery();
|
||||||
|
NetworkManager.singleton.StartClient(info.uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDiscoveredServer(ServerResponse info)
|
||||||
|
{
|
||||||
|
Debug.Log($"Discovered Server: {info.serverId} | {info.EndPoint} | {info.uri}");
|
||||||
|
|
||||||
|
// Note that you can check the versioning to decide if you can connect to the server or not using this method
|
||||||
|
discoveredServers[info.serverId] = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 88c37d3deca7a834d80cfd8d3cfcc510
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs
|
||||||
|
uploadId: 736421
|
4
Assets/Mirror/Components/Discovery/ServerRequest.cs
Normal file
4
Assets/Mirror/Components/Discovery/ServerRequest.cs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
namespace Mirror.Discovery
|
||||||
|
{
|
||||||
|
public struct ServerRequest : NetworkMessage {}
|
||||||
|
}
|
18
Assets/Mirror/Components/Discovery/ServerRequest.cs.meta
Normal file
18
Assets/Mirror/Components/Discovery/ServerRequest.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea7254bf7b9454da4adad881d94cd141
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/Discovery/ServerRequest.cs
|
||||||
|
uploadId: 736421
|
18
Assets/Mirror/Components/Discovery/ServerResponse.cs
Normal file
18
Assets/Mirror/Components/Discovery/ServerResponse.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace Mirror.Discovery
|
||||||
|
{
|
||||||
|
public struct ServerResponse : NetworkMessage
|
||||||
|
{
|
||||||
|
// The server that sent this
|
||||||
|
// this is a property so that it is not serialized, but the
|
||||||
|
// client fills this up after we receive it
|
||||||
|
public IPEndPoint EndPoint { get; set; }
|
||||||
|
|
||||||
|
public Uri uri;
|
||||||
|
|
||||||
|
// Prevent duplicate server appearance when a connection can be made via LAN on multiple NICs
|
||||||
|
public long serverId;
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/Components/Discovery/ServerResponse.cs.meta
Normal file
18
Assets/Mirror/Components/Discovery/ServerResponse.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 36f97227fdf2d7a4e902db5bfc43039c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/Discovery/ServerResponse.cs
|
||||||
|
uploadId: 736421
|
133
Assets/Mirror/Components/GUIConsole.cs
Normal file
133
Assets/Mirror/Components/GUIConsole.cs
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
// People should be able to see and report errors to the developer very easily.
|
||||||
|
//
|
||||||
|
// Unity's Developer Console only works in development builds and it only shows
|
||||||
|
// errors. This class provides a console that works in all builds and also shows
|
||||||
|
// log and warnings in development builds.
|
||||||
|
//
|
||||||
|
// Note: we don't include the stack trace, because that can also be grabbed from
|
||||||
|
// the log files if needed.
|
||||||
|
//
|
||||||
|
// Note: there is no 'hide' button because we DO want people to see those errors
|
||||||
|
// and report them back to us.
|
||||||
|
//
|
||||||
|
// Note: normal Debug.Log messages can be shown by building in Debug/Development
|
||||||
|
// mode.
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
struct LogEntry
|
||||||
|
{
|
||||||
|
public string message;
|
||||||
|
public LogType type;
|
||||||
|
|
||||||
|
public LogEntry(string message, LogType type)
|
||||||
|
{
|
||||||
|
this.message = message;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GUIConsole : MonoBehaviour
|
||||||
|
{
|
||||||
|
public int height = 80;
|
||||||
|
public int offsetY = 40;
|
||||||
|
|
||||||
|
// only keep the recent 'n' entries. otherwise memory would grow forever
|
||||||
|
// and drawing would get slower and slower.
|
||||||
|
public int maxLogCount = 50;
|
||||||
|
|
||||||
|
// Unity Editor has the Console window, we don't need to show it there.
|
||||||
|
// unless for testing, so keep it as option.
|
||||||
|
public bool showInEditor = false;
|
||||||
|
|
||||||
|
// log as queue so we can remove the first entry easily
|
||||||
|
readonly Queue<LogEntry> log = new Queue<LogEntry>();
|
||||||
|
|
||||||
|
// hotkey to show/hide at runtime for easier debugging
|
||||||
|
// (sometimes we need to temporarily hide/show it)
|
||||||
|
// Default is BackQuote, because F keys are already assigned in browsers
|
||||||
|
[Tooltip("Hotkey to show/hide the console at runtime\nBack Quote is usually on the left above Tab\nChange with caution - F keys are generally already taken in Browsers")]
|
||||||
|
public KeyCode hotKey = KeyCode.BackQuote;
|
||||||
|
|
||||||
|
// GUI
|
||||||
|
bool visible;
|
||||||
|
Vector2 scroll = Vector2.zero;
|
||||||
|
|
||||||
|
// only show at runtime, or if showInEditor is enabled
|
||||||
|
bool show => !Application.isEditor || showInEditor;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
// only show at runtime, or if showInEditor is enabled
|
||||||
|
if (show)
|
||||||
|
Application.logMessageReceived += OnLog;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnLog logs everything, even Debug.Log messages in release builds
|
||||||
|
// => this makes a lot of things easier. e.g. addon initialization logs.
|
||||||
|
// => it's really better to have than not to have those
|
||||||
|
void OnLog(string message, string stackTrace, LogType type)
|
||||||
|
{
|
||||||
|
// is this important?
|
||||||
|
// => always show exceptions & errors
|
||||||
|
// => usually a good idea to show warnings too, otherwise it's too
|
||||||
|
// easy to miss OnDeserialize warnings etc. in builds
|
||||||
|
bool isImportant = type == LogType.Error || type == LogType.Exception || type == LogType.Warning;
|
||||||
|
|
||||||
|
// use stack trace only if important
|
||||||
|
// (otherwise users would have to find and search the log file.
|
||||||
|
// seeing it in the console directly is way easier to deal with.)
|
||||||
|
// => only add \n if stack trace is available (only in debug builds)
|
||||||
|
if (isImportant && !string.IsNullOrWhiteSpace(stackTrace))
|
||||||
|
message += $"\n{stackTrace}";
|
||||||
|
|
||||||
|
// add to queue
|
||||||
|
log.Enqueue(new LogEntry(message, type));
|
||||||
|
|
||||||
|
// respect max entries
|
||||||
|
if (log.Count > maxLogCount)
|
||||||
|
log.Dequeue();
|
||||||
|
|
||||||
|
// become visible if it was important
|
||||||
|
// (no need to become visible for regular log. let the user decide.)
|
||||||
|
if (isImportant)
|
||||||
|
visible = true;
|
||||||
|
|
||||||
|
// auto scroll
|
||||||
|
scroll.y = float.MaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if (show && Input.GetKeyDown(hotKey))
|
||||||
|
visible = !visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnGUI()
|
||||||
|
{
|
||||||
|
if (!visible) return;
|
||||||
|
|
||||||
|
// If this offset is changed, also change width in NetworkManagerHUD::OnGUI
|
||||||
|
int offsetX = 300 + 20;
|
||||||
|
|
||||||
|
GUILayout.BeginArea(new Rect(offsetX, offsetY, Screen.width - offsetX - 10, height));
|
||||||
|
|
||||||
|
scroll = GUILayout.BeginScrollView(scroll, "Box", GUILayout.Width(Screen.width - offsetX - 10), GUILayout.Height(height));
|
||||||
|
foreach (LogEntry entry in log)
|
||||||
|
{
|
||||||
|
if (entry.type == LogType.Error || entry.type == LogType.Exception)
|
||||||
|
GUI.color = Color.red;
|
||||||
|
else if (entry.type == LogType.Warning)
|
||||||
|
GUI.color = Color.yellow;
|
||||||
|
|
||||||
|
GUILayout.Label(entry.message);
|
||||||
|
GUI.color = Color.white;
|
||||||
|
}
|
||||||
|
GUILayout.EndScrollView();
|
||||||
|
|
||||||
|
GUILayout.EndArea();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
Assets/Mirror/Components/GUIConsole.cs.meta
Normal file
18
Assets/Mirror/Components/GUIConsole.cs.meta
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9021b6cc314944290986ab6feb48db79
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/GUIConsole.cs
|
||||||
|
uploadId: 736421
|
8
Assets/Mirror/Components/InterestManagement.meta
Normal file
8
Assets/Mirror/Components/InterestManagement.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c66f27e006ab94253b39a55a3b213651
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fa4cbc6b9c584db4971985cb9f369077
|
||||||
|
timeCreated: 1613110605
|
@ -0,0 +1,89 @@
|
|||||||
|
// straight forward Vector3.Distance based interest management.
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
[AddComponentMenu("Network/ Interest Management/ Distance/Distance Interest Management")]
|
||||||
|
public class DistanceInterestManagement : InterestManagement
|
||||||
|
{
|
||||||
|
[Tooltip("The maximum range that objects will be visible at. Add DistanceInterestManagementCustomRange onto NetworkIdentities for custom ranges.")]
|
||||||
|
public int visRange = 500;
|
||||||
|
|
||||||
|
[Tooltip("Rebuild all every 'rebuildInterval' seconds.")]
|
||||||
|
public float rebuildInterval = 1;
|
||||||
|
double lastRebuildTime;
|
||||||
|
|
||||||
|
// cache custom ranges to avoid runtime TryGetComponent lookups
|
||||||
|
readonly Dictionary<NetworkIdentity, DistanceInterestManagementCustomRange> CustomRanges = new Dictionary<NetworkIdentity, DistanceInterestManagementCustomRange>();
|
||||||
|
|
||||||
|
// helper function to get vis range for a given object, or default.
|
||||||
|
[ServerCallback]
|
||||||
|
int GetVisRange(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
return CustomRanges.TryGetValue(identity, out DistanceInterestManagementCustomRange custom) ? custom.visRange : visRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void ResetState()
|
||||||
|
{
|
||||||
|
lastRebuildTime = 0D;
|
||||||
|
CustomRanges.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnSpawned(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
if (identity.TryGetComponent(out DistanceInterestManagementCustomRange custom))
|
||||||
|
CustomRanges[identity] = custom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnDestroyed(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
CustomRanges.Remove(identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool OnCheckObserver(NetworkIdentity identity, NetworkConnectionToClient newObserver)
|
||||||
|
{
|
||||||
|
int range = GetVisRange(identity);
|
||||||
|
return Vector3.Distance(identity.transform.position, newObserver.identity.transform.position) < range;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnRebuildObservers(NetworkIdentity identity, HashSet<NetworkConnectionToClient> newObservers)
|
||||||
|
{
|
||||||
|
// cache range and .transform because both call GetComponent.
|
||||||
|
int range = GetVisRange(identity);
|
||||||
|
Vector3 position = identity.transform.position;
|
||||||
|
|
||||||
|
// brute force distance check
|
||||||
|
// -> only player connections can be observers, so it's enough if we
|
||||||
|
// go through all connections instead of all spawned identities.
|
||||||
|
// -> compared to UNET's sphere cast checking, this one is orders of
|
||||||
|
// magnitude faster. if we have 10k monsters and run a sphere
|
||||||
|
// cast 10k times, we will see a noticeable lag even with physics
|
||||||
|
// layers. but checking to every connection is fast.
|
||||||
|
foreach (NetworkConnectionToClient conn in NetworkServer.connections.Values)
|
||||||
|
{
|
||||||
|
// authenticated and joined world with a player?
|
||||||
|
if (conn != null && conn.isAuthenticated && conn.identity != null)
|
||||||
|
{
|
||||||
|
// check distance
|
||||||
|
if (Vector3.Distance(conn.identity.transform.position, position) < range)
|
||||||
|
{
|
||||||
|
newObservers.Add(conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
// rebuild all spawned NetworkIdentity's observers every interval
|
||||||
|
if (NetworkTime.localTime >= lastRebuildTime + rebuildInterval)
|
||||||
|
{
|
||||||
|
RebuildAll();
|
||||||
|
lastRebuildTime = NetworkTime.localTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8f60becab051427fbdd3c8ac9ab4712b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/InterestManagement/Distance/DistanceInterestManagement.cs
|
||||||
|
uploadId: 736421
|
@ -0,0 +1,15 @@
|
|||||||
|
// add this to NetworkIdentities for custom range if needed.
|
||||||
|
// only works with DistanceInterestManagement.
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
[DisallowMultipleComponent]
|
||||||
|
[AddComponentMenu("Network/ Interest Management/ Distance/Distance Custom Range")]
|
||||||
|
[HelpURL("https://mirror-networking.gitbook.io/docs/guides/interest-management")]
|
||||||
|
public class DistanceInterestManagementCustomRange : NetworkBehaviour
|
||||||
|
{
|
||||||
|
[Tooltip("The maximum range that objects will be visible at.")]
|
||||||
|
public int visRange = 100;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b2e242ee38a14076a39934172a19079b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/InterestManagement/Distance/DistanceInterestManagementCustomRange.cs
|
||||||
|
uploadId: 736421
|
3
Assets/Mirror/Components/InterestManagement/Match.meta
Normal file
3
Assets/Mirror/Components/InterestManagement/Match.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5eca5245ae6bb460e9a92f7e14d5493a
|
||||||
|
timeCreated: 1622649517
|
@ -0,0 +1,164 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
[AddComponentMenu("Network/ Interest Management/ Match/Match Interest Management")]
|
||||||
|
public class MatchInterestManagement : InterestManagement
|
||||||
|
{
|
||||||
|
[Header("Diagnostics")]
|
||||||
|
[ReadOnly, SerializeField]
|
||||||
|
internal ushort matchCount;
|
||||||
|
|
||||||
|
readonly Dictionary<Guid, HashSet<NetworkMatch>> matchObjects =
|
||||||
|
new Dictionary<Guid, HashSet<NetworkMatch>>();
|
||||||
|
|
||||||
|
readonly HashSet<Guid> dirtyMatches = new HashSet<Guid>();
|
||||||
|
|
||||||
|
// LateUpdate so that all spawns/despawns/changes are done
|
||||||
|
[ServerCallback]
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
// Rebuild all dirty matches
|
||||||
|
// dirtyMatches will be empty if no matches changed members
|
||||||
|
// by spawning or destroying or changing matchId in this frame.
|
||||||
|
foreach (Guid dirtyMatch in dirtyMatches)
|
||||||
|
{
|
||||||
|
// rebuild always, even if matchObjects[dirtyMatch] is empty.
|
||||||
|
// Players might have left the match, but they may still be spawned.
|
||||||
|
RebuildMatchObservers(dirtyMatch);
|
||||||
|
|
||||||
|
// clean up empty entries in the dict
|
||||||
|
if (matchObjects[dirtyMatch].Count == 0)
|
||||||
|
matchObjects.Remove(dirtyMatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
dirtyMatches.Clear();
|
||||||
|
|
||||||
|
matchCount = (ushort)matchObjects.Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
void RebuildMatchObservers(Guid matchId)
|
||||||
|
{
|
||||||
|
foreach (NetworkMatch networkMatch in matchObjects[matchId])
|
||||||
|
if (networkMatch.netIdentity != null)
|
||||||
|
NetworkServer.RebuildObservers(networkMatch.netIdentity, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// called by NetworkMatch.matchId setter
|
||||||
|
[ServerCallback]
|
||||||
|
internal void OnMatchChanged(NetworkMatch networkMatch, Guid oldMatch)
|
||||||
|
{
|
||||||
|
// This object is in a new match so observers in the prior match
|
||||||
|
// and the new match need to rebuild their respective observers lists.
|
||||||
|
|
||||||
|
// Remove this object from the hashset of the match it just left
|
||||||
|
// Guid.Empty is never a valid matchId
|
||||||
|
if (oldMatch != Guid.Empty)
|
||||||
|
{
|
||||||
|
dirtyMatches.Add(oldMatch);
|
||||||
|
matchObjects[oldMatch].Remove(networkMatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Guid.Empty is never a valid matchId
|
||||||
|
if (networkMatch.matchId == Guid.Empty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
dirtyMatches.Add(networkMatch.matchId);
|
||||||
|
|
||||||
|
// Make sure this new match is in the dictionary
|
||||||
|
if (!matchObjects.ContainsKey(networkMatch.matchId))
|
||||||
|
matchObjects[networkMatch.matchId] = new HashSet<NetworkMatch>();
|
||||||
|
|
||||||
|
// Add this object to the hashset of the new match
|
||||||
|
matchObjects[networkMatch.matchId].Add(networkMatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnSpawned(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
if (!identity.TryGetComponent(out NetworkMatch networkMatch))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Guid networkMatchId = networkMatch.matchId;
|
||||||
|
|
||||||
|
// Guid.Empty is never a valid matchId...do not add to matchObjects collection
|
||||||
|
if (networkMatchId == Guid.Empty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Debug.Log($"MatchInterestManagement.OnSpawned({identity.name}) currentMatch: {currentMatch}");
|
||||||
|
if (!matchObjects.TryGetValue(networkMatchId, out HashSet<NetworkMatch> objects))
|
||||||
|
{
|
||||||
|
objects = new HashSet<NetworkMatch>();
|
||||||
|
matchObjects.Add(networkMatchId, objects);
|
||||||
|
}
|
||||||
|
|
||||||
|
objects.Add(networkMatch);
|
||||||
|
|
||||||
|
// Match ID could have been set in NetworkBehaviour::OnStartServer on this object.
|
||||||
|
// Since that's after OnCheckObserver is called it would be missed, so force Rebuild here.
|
||||||
|
// Add the current match to dirtyMatches for LateUpdate to rebuild it.
|
||||||
|
dirtyMatches.Add(networkMatchId);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnDestroyed(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
// Don't RebuildSceneObservers here - that will happen in LateUpdate.
|
||||||
|
// Multiple objects could be destroyed in same frame and we don't
|
||||||
|
// want to rebuild for each one...let LateUpdate do it once.
|
||||||
|
// We must add the current match to dirtyMatches for LateUpdate to rebuild it.
|
||||||
|
if (identity.TryGetComponent(out NetworkMatch currentMatch))
|
||||||
|
{
|
||||||
|
if (currentMatch.matchId != Guid.Empty &&
|
||||||
|
matchObjects.TryGetValue(currentMatch.matchId, out HashSet<NetworkMatch> objects) &&
|
||||||
|
objects.Remove(currentMatch))
|
||||||
|
dirtyMatches.Add(currentMatch.matchId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override bool OnCheckObserver(NetworkIdentity identity, NetworkConnectionToClient newObserver)
|
||||||
|
{
|
||||||
|
// Never observed if no NetworkMatch component
|
||||||
|
if (!identity.TryGetComponent(out NetworkMatch identityNetworkMatch))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Guid.Empty is never a valid matchId
|
||||||
|
if (identityNetworkMatch.matchId == Guid.Empty)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Never observed if no NetworkMatch component
|
||||||
|
if (!newObserver.identity.TryGetComponent(out NetworkMatch newObserverNetworkMatch))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Guid.Empty is never a valid matchId
|
||||||
|
if (newObserverNetworkMatch.matchId == Guid.Empty)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return identityNetworkMatch.matchId == newObserverNetworkMatch.matchId;
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnRebuildObservers(NetworkIdentity identity, HashSet<NetworkConnectionToClient> newObservers)
|
||||||
|
{
|
||||||
|
if (!identity.TryGetComponent(out NetworkMatch networkMatch))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Guid.Empty is never a valid matchId
|
||||||
|
if (networkMatch.matchId == Guid.Empty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Abort if this match hasn't been created yet by OnSpawned or OnMatchChanged
|
||||||
|
if (!matchObjects.TryGetValue(networkMatch.matchId, out HashSet<NetworkMatch> objects))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Add everything in the hashset for this object's current match
|
||||||
|
foreach (NetworkMatch netMatch in objects)
|
||||||
|
if (netMatch.netIdentity != null && netMatch.netIdentity.connectionToClient != null)
|
||||||
|
newObservers.Add(netMatch.netIdentity.connectionToClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d09f5c8bf2f4747b7a9284ef5d9ce2a7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/InterestManagement/Match/MatchInterestManagement.cs
|
||||||
|
uploadId: 736421
|
@ -0,0 +1,42 @@
|
|||||||
|
// simple component that holds match information
|
||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
[DisallowMultipleComponent]
|
||||||
|
[AddComponentMenu("Network/ Interest Management/ Match/Network Match")]
|
||||||
|
[HelpURL("https://mirror-networking.gitbook.io/docs/guides/interest-management")]
|
||||||
|
public class NetworkMatch : NetworkBehaviour
|
||||||
|
{
|
||||||
|
Guid _matchId;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0052 // Suppress warning for unused field...this is for debugging purposes
|
||||||
|
[SerializeField, ReadOnly]
|
||||||
|
[Tooltip("Match ID is shown here on server for debugging purposes.")]
|
||||||
|
string MatchID = string.Empty;
|
||||||
|
#pragma warning restore IDE0052
|
||||||
|
|
||||||
|
///<summary>Set this to the same value on all networked objects that belong to a given match</summary>
|
||||||
|
public Guid matchId
|
||||||
|
{
|
||||||
|
get => _matchId;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!NetworkServer.active)
|
||||||
|
throw new InvalidOperationException("matchId can only be set at runtime on active server");
|
||||||
|
|
||||||
|
if (_matchId == value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Guid oldMatch = _matchId;
|
||||||
|
_matchId = value;
|
||||||
|
MatchID = value.ToString();
|
||||||
|
|
||||||
|
// Only inform the AOI if this netIdentity has been spawned (isServer) and only if using a MatchInterestManagement
|
||||||
|
if (isServer && NetworkServer.aoi is MatchInterestManagement matchInterestManagement)
|
||||||
|
matchInterestManagement.OnMatchChanged(this, oldMatch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5d17e718851449a6879986e45c458fb7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/InterestManagement/Match/NetworkMatch.cs
|
||||||
|
uploadId: 736421
|
3
Assets/Mirror/Components/InterestManagement/Scene.meta
Normal file
3
Assets/Mirror/Components/InterestManagement/Scene.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7655d309a46a4bd4860edf964228b3f6
|
||||||
|
timeCreated: 1622649517
|
@ -0,0 +1,117 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
[AddComponentMenu("Network/ Interest Management/ Scene/Scene Interest Management")]
|
||||||
|
public class SceneInterestManagement : InterestManagement
|
||||||
|
{
|
||||||
|
// Use Scene instead of string scene.name because when additively
|
||||||
|
// loading multiples of a subscene the name won't be unique
|
||||||
|
readonly Dictionary<Scene, HashSet<NetworkIdentity>> sceneObjects =
|
||||||
|
new Dictionary<Scene, HashSet<NetworkIdentity>>();
|
||||||
|
|
||||||
|
readonly Dictionary<NetworkIdentity, Scene> lastObjectScene =
|
||||||
|
new Dictionary<NetworkIdentity, Scene>();
|
||||||
|
|
||||||
|
HashSet<Scene> dirtyScenes = new HashSet<Scene>();
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnSpawned(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
Scene currentScene = identity.gameObject.scene;
|
||||||
|
lastObjectScene[identity] = currentScene;
|
||||||
|
// Debug.Log($"SceneInterestManagement.OnSpawned({identity.name}) currentScene: {currentScene}");
|
||||||
|
if (!sceneObjects.TryGetValue(currentScene, out HashSet<NetworkIdentity> objects))
|
||||||
|
{
|
||||||
|
objects = new HashSet<NetworkIdentity>();
|
||||||
|
sceneObjects.Add(currentScene, objects);
|
||||||
|
}
|
||||||
|
|
||||||
|
objects.Add(identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnDestroyed(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
// Don't RebuildSceneObservers here - that will happen in LateUpdate.
|
||||||
|
// Multiple objects could be destroyed in same frame and we don't
|
||||||
|
// want to rebuild for each one...let LateUpdate do it once.
|
||||||
|
// We must add the current scene to dirtyScenes for LateUpdate to rebuild it.
|
||||||
|
if (lastObjectScene.TryGetValue(identity, out Scene currentScene))
|
||||||
|
{
|
||||||
|
lastObjectScene.Remove(identity);
|
||||||
|
if (sceneObjects.TryGetValue(currentScene, out HashSet<NetworkIdentity> objects) && objects.Remove(identity))
|
||||||
|
dirtyScenes.Add(currentScene);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
// for each spawned:
|
||||||
|
// if scene changed:
|
||||||
|
// add previous to dirty
|
||||||
|
// add new to dirty
|
||||||
|
foreach (NetworkIdentity identity in NetworkServer.spawned.Values)
|
||||||
|
{
|
||||||
|
if (!lastObjectScene.TryGetValue(identity, out Scene currentScene))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Scene newScene = identity.gameObject.scene;
|
||||||
|
if (newScene == currentScene)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Mark new/old scenes as dirty so they get rebuilt
|
||||||
|
dirtyScenes.Add(currentScene);
|
||||||
|
dirtyScenes.Add(newScene);
|
||||||
|
|
||||||
|
// This object is in a new scene so observers in the prior scene
|
||||||
|
// and the new scene need to rebuild their respective observers lists.
|
||||||
|
|
||||||
|
// Remove this object from the hashset of the scene it just left
|
||||||
|
sceneObjects[currentScene].Remove(identity);
|
||||||
|
|
||||||
|
// Set this to the new scene this object just entered
|
||||||
|
lastObjectScene[identity] = newScene;
|
||||||
|
|
||||||
|
// Make sure this new scene is in the dictionary
|
||||||
|
if (!sceneObjects.ContainsKey(newScene))
|
||||||
|
sceneObjects.Add(newScene, new HashSet<NetworkIdentity>());
|
||||||
|
|
||||||
|
// Add this object to the hashset of the new scene
|
||||||
|
sceneObjects[newScene].Add(identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rebuild all dirty scenes
|
||||||
|
foreach (Scene dirtyScene in dirtyScenes)
|
||||||
|
RebuildSceneObservers(dirtyScene);
|
||||||
|
|
||||||
|
dirtyScenes.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RebuildSceneObservers(Scene scene)
|
||||||
|
{
|
||||||
|
foreach (NetworkIdentity netIdentity in sceneObjects[scene])
|
||||||
|
if (netIdentity != null)
|
||||||
|
NetworkServer.RebuildObservers(netIdentity, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool OnCheckObserver(NetworkIdentity identity, NetworkConnectionToClient newObserver)
|
||||||
|
{
|
||||||
|
return identity.gameObject.scene == newObserver.identity.gameObject.scene;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnRebuildObservers(NetworkIdentity identity, HashSet<NetworkConnectionToClient> newObservers)
|
||||||
|
{
|
||||||
|
if (!sceneObjects.TryGetValue(identity.gameObject.scene, out HashSet<NetworkIdentity> objects))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Add everything in the hashset for this object's current scene
|
||||||
|
foreach (NetworkIdentity networkIdentity in objects)
|
||||||
|
if (networkIdentity != null && networkIdentity.connectionToClient != null)
|
||||||
|
newObservers.Add(networkIdentity.connectionToClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b979f26c95d34324ba005bfacfa9c4fc
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/InterestManagement/Scene/SceneInterestManagement.cs
|
||||||
|
uploadId: 736421
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f4d8c634a8103664db5f90fe8bab9544
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,178 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
[AddComponentMenu("Network/ Interest Management/ Scene/Scene Distance Interest Management")]
|
||||||
|
public class SceneDistanceInterestManagement : InterestManagement
|
||||||
|
{
|
||||||
|
[Tooltip("The maximum range that objects will be visible at. Add DistanceInterestManagementCustomRange onto NetworkIdentities for custom ranges.")]
|
||||||
|
public int visRange = 500;
|
||||||
|
|
||||||
|
[Tooltip("Rebuild all every 'rebuildInterval' seconds.")]
|
||||||
|
public float rebuildInterval = 1;
|
||||||
|
double lastRebuildTime;
|
||||||
|
|
||||||
|
// cache custom ranges to avoid runtime TryGetComponent lookups
|
||||||
|
readonly Dictionary<NetworkIdentity, DistanceInterestManagementCustomRange> CustomRanges = new Dictionary<NetworkIdentity, DistanceInterestManagementCustomRange>();
|
||||||
|
|
||||||
|
// helper function to get vis range for a given object, or default.
|
||||||
|
[ServerCallback]
|
||||||
|
int GetVisRange(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
return CustomRanges.TryGetValue(identity, out DistanceInterestManagementCustomRange custom) ? custom.visRange : visRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void ResetState()
|
||||||
|
{
|
||||||
|
lastRebuildTime = 0D;
|
||||||
|
CustomRanges.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use Scene instead of string scene.name because when additively
|
||||||
|
// loading multiples of a subscene the name won't be unique
|
||||||
|
readonly Dictionary<Scene, HashSet<NetworkIdentity>> sceneObjects =
|
||||||
|
new Dictionary<Scene, HashSet<NetworkIdentity>>();
|
||||||
|
|
||||||
|
readonly Dictionary<NetworkIdentity, Scene> lastObjectScene =
|
||||||
|
new Dictionary<NetworkIdentity, Scene>();
|
||||||
|
|
||||||
|
HashSet<Scene> dirtyScenes = new HashSet<Scene>();
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnSpawned(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
if (identity.TryGetComponent(out DistanceInterestManagementCustomRange custom))
|
||||||
|
CustomRanges[identity] = custom;
|
||||||
|
|
||||||
|
Scene currentScene = identity.gameObject.scene;
|
||||||
|
lastObjectScene[identity] = currentScene;
|
||||||
|
// Debug.Log($"SceneInterestManagement.OnSpawned({identity.name}) currentScene: {currentScene}");
|
||||||
|
if (!sceneObjects.TryGetValue(currentScene, out HashSet<NetworkIdentity> objects))
|
||||||
|
{
|
||||||
|
objects = new HashSet<NetworkIdentity>();
|
||||||
|
sceneObjects.Add(currentScene, objects);
|
||||||
|
}
|
||||||
|
|
||||||
|
objects.Add(identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
public override void OnDestroyed(NetworkIdentity identity)
|
||||||
|
{
|
||||||
|
CustomRanges.Remove(identity);
|
||||||
|
|
||||||
|
// Don't RebuildSceneObservers here - that will happen in LateUpdate.
|
||||||
|
// Multiple objects could be destroyed in same frame and we don't
|
||||||
|
// want to rebuild for each one...let LateUpdate do it once.
|
||||||
|
// We must add the current scene to dirtyScenes for LateUpdate to rebuild it.
|
||||||
|
if (lastObjectScene.TryGetValue(identity, out Scene currentScene))
|
||||||
|
{
|
||||||
|
lastObjectScene.Remove(identity);
|
||||||
|
if (sceneObjects.TryGetValue(currentScene, out HashSet<NetworkIdentity> objects) && objects.Remove(identity))
|
||||||
|
dirtyScenes.Add(currentScene);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ServerCallback]
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
// for each spawned:
|
||||||
|
// if scene changed:
|
||||||
|
// add previous to dirty
|
||||||
|
// add new to dirty
|
||||||
|
// else
|
||||||
|
// if rebuild interval reached:
|
||||||
|
// rebuild all
|
||||||
|
foreach (NetworkIdentity identity in NetworkServer.spawned.Values)
|
||||||
|
{
|
||||||
|
if (!lastObjectScene.TryGetValue(identity, out Scene currentScene))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Scene newScene = identity.gameObject.scene;
|
||||||
|
if (newScene == currentScene)
|
||||||
|
{
|
||||||
|
if (NetworkTime.localTime >= lastRebuildTime + rebuildInterval)
|
||||||
|
{
|
||||||
|
RebuildAll();
|
||||||
|
lastRebuildTime = NetworkTime.localTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
// no scene change, so we're done here
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mark new/old scenes as dirty so they get rebuilt
|
||||||
|
dirtyScenes.Add(currentScene);
|
||||||
|
dirtyScenes.Add(newScene);
|
||||||
|
|
||||||
|
// This object is in a new scene so observers in the prior scene
|
||||||
|
// and the new scene need to rebuild their respective observers lists.
|
||||||
|
|
||||||
|
// Remove this object from the hashset of the scene it just left
|
||||||
|
sceneObjects[currentScene].Remove(identity);
|
||||||
|
|
||||||
|
// Set this to the new scene this object just entered
|
||||||
|
lastObjectScene[identity] = newScene;
|
||||||
|
|
||||||
|
// Make sure this new scene is in the dictionary
|
||||||
|
if (!sceneObjects.ContainsKey(newScene))
|
||||||
|
sceneObjects.Add(newScene, new HashSet<NetworkIdentity>());
|
||||||
|
|
||||||
|
// Add this object to the hashset of the new scene
|
||||||
|
sceneObjects[newScene].Add(identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rebuild all dirty scenes
|
||||||
|
foreach (Scene dirtyScene in dirtyScenes)
|
||||||
|
RebuildSceneObservers(dirtyScene);
|
||||||
|
|
||||||
|
dirtyScenes.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RebuildSceneObservers(Scene scene)
|
||||||
|
{
|
||||||
|
foreach (NetworkIdentity netIdentity in sceneObjects[scene])
|
||||||
|
if (netIdentity != null)
|
||||||
|
NetworkServer.RebuildObservers(netIdentity, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool OnCheckObserver(NetworkIdentity identity, NetworkConnectionToClient newObserver)
|
||||||
|
{
|
||||||
|
// Check for scene match first, then distance
|
||||||
|
if (identity.gameObject.scene != newObserver.identity.gameObject.scene) return false;
|
||||||
|
|
||||||
|
int range = GetVisRange(identity);
|
||||||
|
return Vector3.Distance(identity.transform.position, newObserver.identity.transform.position) < range;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnRebuildObservers(NetworkIdentity identity, HashSet<NetworkConnectionToClient> newObservers)
|
||||||
|
{
|
||||||
|
// abort if no entry in sceneObjects yet (created in OnSpawned)
|
||||||
|
if (!sceneObjects.TryGetValue(identity.gameObject.scene, out HashSet<NetworkIdentity> objects))
|
||||||
|
return;
|
||||||
|
|
||||||
|
int range = GetVisRange(identity);
|
||||||
|
Vector3 position = identity.transform.position;
|
||||||
|
|
||||||
|
// Add everything in the hashset for this object's current scene if within range
|
||||||
|
foreach (NetworkIdentity networkIdentity in objects)
|
||||||
|
if (networkIdentity != null && networkIdentity.connectionToClient != null)
|
||||||
|
{
|
||||||
|
// brute force distance check
|
||||||
|
// -> only player connections can be observers, so it's enough if we
|
||||||
|
// go through all connections instead of all spawned identities.
|
||||||
|
// -> compared to UNET's sphere cast checking, this one is orders of
|
||||||
|
// magnitude faster. if we have 10k monsters and run a sphere
|
||||||
|
// cast 10k times, we will see a noticeable lag even with physics
|
||||||
|
// layers. but checking to every connection is fast.
|
||||||
|
NetworkConnectionToClient conn = networkIdentity.connectionToClient;
|
||||||
|
if (conn != null && conn.isAuthenticated && conn.identity != null)
|
||||||
|
if (Vector3.Distance(conn.identity.transform.position, position) < range)
|
||||||
|
newObservers.Add(conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6471bc9a8f893944783fd54e9bfb6ed2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 129321
|
||||||
|
packageName: Mirror
|
||||||
|
packageVersion: 96.0.1
|
||||||
|
assetPath: Assets/Mirror/Components/InterestManagement/SceneDistance/SceneDistanceInterestManagement.cs
|
||||||
|
uploadId: 736421
|
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cfa12b73503344d49b398b01bcb07967
|
||||||
|
timeCreated: 1613110634
|
@ -0,0 +1,104 @@
|
|||||||
|
// Grid2D from uMMORPG: get/set values of type T at any point
|
||||||
|
// -> not named 'Grid' because Unity already has a Grid type. causes warnings.
|
||||||
|
// -> struct to avoid memory indirection. it's accessed a lot.
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
|
{
|
||||||
|
// struct to avoid memory indirection. it's accessed a lot.
|
||||||
|
public struct Grid2D<T>
|
||||||
|
{
|
||||||
|
// the grid
|
||||||
|
// note that we never remove old keys.
|
||||||
|
// => over time, HashSet<T>s will be allocated for every possible
|
||||||
|
// grid position in the world
|
||||||
|
// => Clear() doesn't clear them so we don't constantly reallocate the
|
||||||
|
// entries when populating the grid in every Update() call
|
||||||
|
// => makes the code a lot easier too
|
||||||
|
// => this is FINE because in the worst case, every grid position in the
|
||||||
|
// game world is filled with a player anyway!
|
||||||
|
readonly Dictionary<Vector2Int, HashSet<T>> grid;
|
||||||
|
|
||||||
|
// cache a 9 neighbor grid of vector2 offsets so we can use them more easily
|
||||||
|
readonly Vector2Int[] neighbourOffsets;
|
||||||
|
|
||||||
|
public Grid2D(int initialCapacity)
|
||||||
|
{
|
||||||
|
grid = new Dictionary<Vector2Int, HashSet<T>>(initialCapacity);
|
||||||
|
|
||||||
|
neighbourOffsets = new[] {
|
||||||
|
Vector2Int.up,
|
||||||
|
Vector2Int.up + Vector2Int.left,
|
||||||
|
Vector2Int.up + Vector2Int.right,
|
||||||
|
Vector2Int.left,
|
||||||
|
Vector2Int.zero,
|
||||||
|
Vector2Int.right,
|
||||||
|
Vector2Int.down,
|
||||||
|
Vector2Int.down + Vector2Int.left,
|
||||||
|
Vector2Int.down + Vector2Int.right
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper function so we can add an entry without worrying
|
||||||
|
public void Add(Vector2Int position, T value)
|
||||||
|
{
|
||||||
|
// initialize set in grid if it's not in there yet
|
||||||
|
if (!grid.TryGetValue(position, out HashSet<T> hashSet))
|
||||||
|
{
|
||||||
|
// each grid entry may hold hundreds of entities.
|
||||||
|
// let's create the HashSet with a large initial capacity
|
||||||
|
// in order to avoid resizing & allocations.
|
||||||
|
#if !UNITY_2021_3_OR_NEWER
|
||||||
|
// Unity 2019 doesn't have "new HashSet(capacity)" yet
|
||||||
|
hashSet = new HashSet<T>();
|
||||||
|
#else
|
||||||
|
hashSet = new HashSet<T>(128);
|
||||||
|
#endif
|
||||||
|
grid[position] = hashSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add to it
|
||||||
|
hashSet.Add(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper function to get set at position without worrying
|
||||||
|
// -> result is passed as parameter to avoid allocations
|
||||||
|
// -> result is not cleared before. this allows us to pass the HashSet from
|
||||||
|
// GetWithNeighbours and avoid .UnionWith which is very expensive.
|
||||||
|
void GetAt(Vector2Int position, HashSet<T> result)
|
||||||
|
{
|
||||||
|
// return the set at position
|
||||||
|
if (grid.TryGetValue(position, out HashSet<T> hashSet))
|
||||||
|
{
|
||||||
|
foreach (T entry in hashSet)
|
||||||
|
result.Add(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper function to get at position and it's 8 neighbors without worrying
|
||||||
|
// -> result is passed as parameter to avoid allocations
|
||||||
|
public void GetWithNeighbours(Vector2Int position, HashSet<T> result)
|
||||||
|
{
|
||||||
|
// clear result first
|
||||||
|
result.Clear();
|
||||||
|
|
||||||
|
// add neighbours
|
||||||
|
foreach (Vector2Int offset in neighbourOffsets)
|
||||||
|
GetAt(position + offset, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// clear: clears the whole grid
|
||||||
|
// IMPORTANT: we already allocated HashSet<T>s and don't want to do
|
||||||
|
// reallocate every single update when we rebuild the grid.
|
||||||
|
// => so simply remove each position's entries, but keep
|
||||||
|
// every position in there
|
||||||
|
// => see 'grid' comments above!
|
||||||
|
// => named ClearNonAlloc to make it more obvious!
|
||||||
|
public void ClearNonAlloc()
|
||||||
|
{
|
||||||
|
foreach (HashSet<T> hashSet in grid.Values)
|
||||||
|
hashSet.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user