tidy up + add test tiles + small doc

La feature était désorganisé et il n'y avait rien pour tester ou démontrer la fonctionalité

J'ai rangé tous les scripts dans des dossiers enfants de LevelEditor.

Tous les fichiers du level editor sont dans le namespace GatherAndDefend.LevelEditor.

J'ai ajouté un type de tile qui peut instantier un prefab au startup.

J'ai créé un level de test.
This commit is contained in:
Felix Boucher 2023-05-10 19:01:31 -04:00
parent 9e07d7f882
commit ebe035840c
30 changed files with 2766 additions and 396 deletions

View File

@ -1,53 +0,0 @@
using UnityEditor;
using UnityEngine.Tilemaps;
using UnityEngine;
using System.IO;
namespace GatherAndDefend.LevelEditor
{
[CustomEditor(typeof(LevelEditor))]
public class LevelEditorEditor : Editor
{
const string defaultName = "Level";
const string extension = ".asset";
string Path => "Assets/";
public override void OnInspectorGUI()
{
DrawDefaultInspector();
var targ = (LevelEditor)target;
if (GUILayout.Button("Save"))
{
string name;
if (targ.Level) name = targ.Level.name;
else name = defaultName;
if (File.Exists(Path + name + extension))
{
File.Delete(Path + name + extension);
}
var map = CreateInstance<Map>();
map.name = name;
foreach (Tilemap tilemap in targ.GetComponentsInChildren<Tilemap>())
{
map.Write(tilemap);
}
AssetDatabase.CreateAsset(map, Path + name + extension);
targ.Level = map;
AssetDatabase.ImportAsset(Path + name + extension);
}
if (GUILayout.Button("Load"))
{
if (!targ.Level) return;
foreach (Tilemap tilemap in targ.GetComponentsInChildren<Tilemap>())
{
tilemap.ClearAllTiles();
targ.Level.Read(tilemap);
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,334 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &189138874
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 189138875}
- component: {fileID: 189138877}
- component: {fileID: 189138876}
m_Layer: 0
m_Name: Tilemap
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &189138875
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 189138874}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1827197199}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!483693784 &189138876
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 189138874}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16
m_MaxFrameAge: 16
m_SortOrder: 0
m_Mode: 0
m_DetectChunkCullingBounds: 0
m_MaskInteraction: 0
--- !u!1839735485 &189138877
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 189138874}
m_Enabled: 1
m_Tiles: {}
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 0
m_Data: {fileID: 0}
m_TileSpriteArray:
- m_RefCount: 0
m_Data: {fileID: 0}
- m_RefCount: 0
m_Data: {fileID: 0}
m_TileMatrixArray:
- m_RefCount: 0
m_Data:
e00: 0
e01: 0
e02: -1.1020282e-38
e03: -1.1020282e-38
e10: 0
e11: 0
e12: 7.79e-43
e13: 7.79e-43
e20: -7.180341e-21
e21: 1e-45
e22: 7.1748835e-29
e23: -1.5782e-40
e30: 4.5905e-41
e31: 0
e32: 7.8e-43
e33: 7.83e-43
m_TileColorArray:
- m_RefCount: 0
m_Data: {r: 4.0116e-41, g: 4.0116e-41, b: 4.0116e-41, a: 4.0116e-41}
- m_RefCount: 0
m_Data: {r: NaN, g: NaN, b: NaN, a: NaN}
m_TileObjectToInstantiateArray:
- m_RefCount: 0
m_Data: {fileID: 0}
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: -5, y: -2, z: 0}
m_Size: {x: 5, y: 4, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
--- !u!1 &1827197197
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1827197199}
- component: {fileID: 1827197198}
- component: {fileID: 1827197200}
m_Layer: 0
m_Name: Grid
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!156049354 &1827197198
Grid:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1827197197}
m_Enabled: 1
m_CellSize: {x: 1, y: 1, z: 0}
m_CellGap: {x: 0, y: 0, z: 0}
m_CellLayout: 0
m_CellSwizzle: 0
--- !u!4 &1827197199
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1827197197}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 189138875}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1827197200
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1827197197}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f2aa8eca66833af4ba45af1319c90803, type: 3}
m_Name:
m_EditorClassIdentifier:
_level: {fileID: 11400000, guid: bac1b4f94448a7e4f92d7d855f05d882, type: 2}

View File

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

View File

@ -0,0 +1,267 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2b25d284985e65e48b50826c522a5ec3, type: 3}
m_Name: Level
m_EditorClassIdentifier:
_data:
- _key: Background
tiles:
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -8, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -7, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -6, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -5, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -4, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -3, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -2, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: -1, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 0, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 1, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 2, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 3, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: -4, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: -2, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: 0, z: 0}
- _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
_position: {x: 4, y: 1, z: 0}
- _key: Entities
tiles:
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -8, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -8, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -8, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -8, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -6, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -6, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -6, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -6, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -4, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -4, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -4, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -4, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -2, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -2, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -2, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: -2, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 0, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 0, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 0, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 0, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 2, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 2, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 2, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 2, y: 1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 4, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 4, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 4, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
_position: {x: 4, y: 1, z: 0}
- _key: Spawners
tiles:
- _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2}
_position: {x: -8, y: -5, z: 0}
- _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2}
_position: {x: -8, y: -3, z: 0}
- _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2}
_position: {x: -8, y: -1, z: 0}
- _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2}
_position: {x: -8, y: 1, z: 0}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,127 @@
using UnityEditor;
using UnityEngine.Tilemaps;
using UnityEngine;
using System.IO;
using static UnityEngine.GraphicsBuffer;
using UnityEditor.SceneManagement;
namespace GatherAndDefend.LevelEditor
{
[CustomEditor(typeof(LevelEditor))]
public class LevelEditorCustomInspector : Editor
{
const string defaultName = "Level";
const string extension = ".asset";
string _infoText = string.Empty;
public override void OnInspectorGUI()
{
EditorGUILayout.HelpBox(@"How to use :
- Path : you can optionally assign a folder in order to change the path to which the Level files will be created and saved
- Level : the level file you're currently working on (for saving and loading purposes).
- Create button : creates an empty level at given path, and assign it to the Level field in inspector.
- Save button : saves all scene tilemaps' contents to the assigned level file.
- Load button : iterates through all scene tilemaps and fills them according to what data can be found in the level file.
Important considerations :
- the save and load buttons won't work if there is no Level assigned.
- the loading won't work if the scene tilemap names aren't the same as the tilemap data keys in the Level file", MessageType.None);
DrawDefaultInspector();
if (GUILayout.Button(nameof(Create)))
{
Create();
}
if (GUILayout.Button(nameof(Save)))
{
Save();
}
if (GUILayout.Button(nameof(Load)))
{
Load();
}
if (_infoText != string.Empty)
{
EditorGUILayout.HelpBox(_infoText, MessageType.Error);
}
}
private string GetPath()
{
var targ = (LevelEditor)target;
var asset = EditorGUILayout.ObjectField(targ.Path, typeof(DefaultAsset), false);
if (!asset) return "Assets";
return AssetDatabase.GetAssetPath(asset);
}
private void Create()
{
string path = GetPath();
if (!Directory.Exists(path))
{
_infoText = "the object assigned to Path is not a directory!";
}
LevelEditor targ = (LevelEditor)target;
_infoText = string.Empty;
string name = defaultName;
if (File.Exists(path + "/" + name + extension))
{
var i = 0;
while (File.Exists(path + "/" + name + i + extension)) i++;
name += i;
}
var map = CreateInstance<Level>();
map.name = name;
AssetDatabase.CreateAsset(map, path + "/" + name + extension);
targ.Level = map;
}
private void Save()
{
string path = GetPath();
if (!Directory.Exists(path))
{
_infoText = "the object assigned to Path is not a directory!";
return;
}
LevelEditor targ = (LevelEditor)target;
if (!targ.Level)
{
_infoText = "no level to save to. please assign the Level field in the inspector.";
return;
}
string name = targ.Level.name;
var map = CreateInstance<Level>();
map.name = name;
foreach (Tilemap tilemap in targ.GetComponentsInChildren<Tilemap>())
{
map.Write(tilemap);
}
AssetDatabase.CreateAsset(map, path + "/" + name + extension);
targ.Level = map;
_infoText = string.Empty;
}
private void Load()
{
var targ = (LevelEditor)target;
if (!targ.Level)
{
_infoText = "no level to save to. please assign the Level field in the inspector.";
return;
}
foreach (Tilemap tilemap in targ.GetComponentsInChildren<Tilemap>())
{
tilemap.ClearAllTiles();
targ.Level.Read(tilemap);
}
_infoText = string.Empty;
EditorSceneManager.MarkAllScenesDirty();
}
}
}

View File

@ -7,11 +7,18 @@ namespace GatherAndDefend.LevelEditor
public class LevelEditor : MonoBehaviour
{
[SerializeField]
private Map _level;
public Map Level
private DefaultAsset _path;
[SerializeField]
private Level _level;
public Level Level
{
get => _level;
set => _level = value;
}
public DefaultAsset Path
{
get => _path;
set => _path = value;
}
}
}

View File

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

View File

@ -4,14 +4,14 @@ using UnityEngine;
namespace GatherAndDefend.LevelEditor
{
public class Map : ScriptableObject
public class Level : ScriptableObject
{
[SerializeField]
private List<TilemapData> _data = new List<TilemapData>();
public void Write(Tilemap tilemap)
{
var data = new TilemapData();
data.Write(tilemap);
data.SaveFromTilemap(tilemap);
_data.Add(data);
}
public void Read(Tilemap tilemap)
@ -19,7 +19,7 @@ namespace GatherAndDefend.LevelEditor
var data = _data.Find(x => x.Key == tilemap.name);
if (data == null) return;
data.Read(tilemap);
data.LoadToTilemap(tilemap);
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2b7bfc7dd6af8f648b6abb36eb3be022
guid: 2b25d284985e65e48b50826c522a5ec3
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,24 @@
using UnityEngine;
using UnityEngine.Tilemaps;
[CreateAssetMenu(menuName = "Gather And Defend/Spawner Tile")]
public class SpawnerTile : TileBase
{
[SerializeField]
private Sprite _sprite;
[SerializeField]
private GameObject _prefab;
public override void GetTileData(Vector3Int position, ITilemap tilemap, ref TileData tileData)
{
tileData.sprite = _sprite;
tileData.transform.SetTRS(Vector3.zero, Quaternion.identity, Vector3.one);
tileData.color = Color.white;
}
public override bool StartUp(Vector3Int position, ITilemap tilemap, GameObject go)
{
if (!Application.isPlaying) return base.StartUp(position, tilemap, go);
Instantiate(_prefab, new Vector3(0.5f, 0.5f) + position, Quaternion.identity);
return base.StartUp(position, tilemap, go);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b28b3004abb3723498a355747c7cd899
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -15,14 +15,14 @@ namespace GatherAndDefend.LevelEditor
public string Key => _key;
public void Read(Tilemap reference)
public void LoadToTilemap(Tilemap reference)
{
foreach (TileData data in tiles)
{
reference.SetTile(data.Position, data.Tile);
}
}
public void Write(Tilemap reference)
public void SaveFromTilemap(Tilemap reference)
{
_key = reference.name;
tiles = new List<TileData>();

View File

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

View File

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b28b3004abb3723498a355747c7cd899, type: 3}
m_Name: StickSpawner
m_EditorClassIdentifier:
_sprite: {fileID: 21300000, guid: 77a39e873655d3c4b93d0b7696397b83, type: 3}
_prefab: {fileID: 6962989255644195630, guid: 9b40c232eddfd1b469bea688e3c970c0, type: 3}
_repeat: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4aaf448680c7f8a438a9a5861c622a55
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Tilemaps.meta Normal file
View File

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

View File

@ -0,0 +1,244 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &86010431647272150
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2398097493298623612}
- component: {fileID: 7313241872231566393}
m_Layer: 0
m_Name: LevelEditorPalette
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2398097493298623612
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 86010431647272150}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4542880158922887027}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!156049354 &7313241872231566393
Grid:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 86010431647272150}
m_Enabled: 1
m_CellSize: {x: 1, y: 1, z: 0}
m_CellGap: {x: 0, y: 0, z: 0}
m_CellLayout: 0
m_CellSwizzle: 0
--- !u!1 &5890485537825364348
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4542880158922887027}
- component: {fileID: 6447175569849153967}
- component: {fileID: 5651166066249042033}
m_Layer: 0
m_Name: Layer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4542880158922887027
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5890485537825364348}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2398097493298623612}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1839735485 &6447175569849153967
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5890485537825364348}
m_Enabled: 1
m_Tiles:
- first: {x: -1, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 0, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 1
m_TileSpriteIndex: 1
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -1, y: 1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 2
m_TileSpriteIndex: 2
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 0
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2}
m_TileSpriteArray:
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: ccca3e050cb082b45af0a099790463f6, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 1f8a7d27b012449499d5316045662e1e, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 77a39e873655d3c4b93d0b7696397b83, type: 3}
m_TileMatrixArray:
- m_RefCount: 3
m_Data:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 3
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: -1, y: 0, z: 0}
m_Size: {x: 2, y: 2, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
--- !u!483693784 &5651166066249042033
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5890485537825364348}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 0
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16
m_MaxFrameAge: 16
m_SortOrder: 0
m_Mode: 0
m_DetectChunkCullingBounds: 0
m_MaskInteraction: 0
--- !u!114 &5479319524895914250
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0}
m_Name: Palette Settings
m_EditorClassIdentifier:
cellSizing: 0
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 638fe5717ed2f7d4e840158211fdddbf
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 61
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: de02f9e1d18f588468e474319d09a723, type: 3}
m_Name:
m_EditorClassIdentifier:
customInterpolatorErrorThreshold: 32
customInterpolatorWarningThreshold: 16

View File

@ -11,7 +11,7 @@ TagManager:
-
- Water
- UI
-
- InvisibleToCamera
-
-
-