├── .gitignore ├── Assets ├── Room Dungeon Generator.meta └── Room Dungeon Generator │ ├── 01.Scenes.meta │ ├── 01.Scenes │ ├── Room.unity │ └── Room.unity.meta │ ├── 02.Scripts.meta │ ├── 02.Scripts │ ├── Corridor.cs │ ├── Corridor.cs.meta │ ├── DungeonGenerator.cs │ ├── DungeonGenerator.cs.meta │ ├── Dungeons.meta │ ├── Dungeons │ │ ├── BSPCorridor.cs │ │ ├── BSPCorridor.cs.meta │ │ ├── BSPDungeon.cs │ │ ├── BSPDungeon.cs.meta │ │ ├── BSPRoom.cs │ │ ├── BSPRoom.cs.meta │ │ ├── BSPTreeNode.cs │ │ ├── BSPTreeNode.cs.meta │ │ ├── TileDungeon2D.cs │ │ └── TileDungeon2D.cs.meta │ ├── IntVector2.cs │ ├── IntVector2.cs.meta │ ├── Map.cs │ ├── Map.cs.meta │ ├── MapDirections.cs │ ├── MapDirections.cs.meta │ ├── Room.cs │ ├── Room.cs.meta │ ├── RoomMapManager.cs │ ├── RoomMapManager.cs.meta │ ├── RoomSetting.cs │ ├── RoomSetting.cs.meta │ ├── Tile.cs │ ├── Tile.cs.meta │ ├── Triangle.cs │ └── Triangle.cs.meta │ ├── 03.Prefabs.meta │ ├── 03.Prefabs │ ├── BSPCorridor.prefab │ ├── BSPCorridor.prefab.meta │ ├── BSPDungeon.prefab │ ├── BSPDungeon.prefab.meta │ ├── BSPRoom.prefab │ ├── BSPRoom.prefab.meta │ ├── Corridor.prefab │ ├── Corridor.prefab.meta │ ├── Map.prefab │ ├── Map.prefab.meta │ ├── Monster.prefab │ ├── Monster.prefab.meta │ ├── Player.prefab │ ├── Player.prefab.meta │ ├── Room.prefab │ ├── Room.prefab.meta │ ├── Tile.prefab │ ├── Tile.prefab.meta │ ├── Wall.prefab │ └── Wall.prefab.meta │ ├── 04.Images.meta │ ├── 04.Images │ ├── Blue.mat │ ├── Blue.mat.meta │ ├── Brown.mat │ ├── Brown.mat.meta │ ├── Green.mat │ ├── Green.mat.meta │ ├── Red.mat │ ├── Red.mat.meta │ ├── Rooms.meta │ └── Rooms │ │ ├── Floor1.mat │ │ ├── Floor1.mat.meta │ │ ├── Floor2.mat │ │ ├── Floor2.mat.meta │ │ ├── Floor3.mat │ │ ├── Floor3.mat.meta │ │ ├── Floor4.mat │ │ ├── Floor4.mat.meta │ │ ├── Wall1.mat │ │ ├── Wall1.mat.meta │ │ ├── Wall2.mat │ │ ├── Wall2.mat.meta │ │ ├── Wall3.mat │ │ ├── Wall3.mat.meta │ │ ├── Wall4.mat │ │ └── Wall4.mat.meta │ ├── ReadMe.txt │ └── ReadMe.txt.meta ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD solution and project files 9 | ExportedObj/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | 22 | # Unity3D generated meta files 23 | *.pidb.meta 24 | 25 | # Unity3D Generated File On Crash Reports 26 | sysinfo.txt 27 | 28 | # Builds 29 | *.apk 30 | *.unitypackage 31 | ProjectSettings/ProjectSettings.asset 32 | ProjectSettings/ProjectVersion.txt 33 | sh.exe.stackdump 34 | Assets/AutoSave* 35 | .vs/ 36 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16c408c5093c52446b8db3eb8e917fbd 3 | folderAsset: yes 4 | timeCreated: 1470759249 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/01.Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a51d17c24322c84c8f633d0cd145e3a 3 | folderAsset: yes 4 | timeCreated: 1467618161 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/01.Scenes/Room.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 1 56 | m_EnableRealtimeLightmaps: 1 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 40 61 | m_AtlasSize: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 0 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 0 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 0 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &68344646 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_CorrespondingSourceObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 68344651} 124 | - component: {fileID: 68344650} 125 | - component: {fileID: 68344649} 126 | - component: {fileID: 68344648} 127 | - component: {fileID: 68344647} 128 | m_Layer: 0 129 | m_Name: Main Camera 130 | m_TagString: MainCamera 131 | m_Icon: {fileID: 0} 132 | m_NavMeshLayer: 0 133 | m_StaticEditorFlags: 0 134 | m_IsActive: 1 135 | --- !u!81 &68344647 136 | AudioListener: 137 | m_ObjectHideFlags: 0 138 | m_CorrespondingSourceObject: {fileID: 0} 139 | m_PrefabInternal: {fileID: 0} 140 | m_GameObject: {fileID: 68344646} 141 | m_Enabled: 1 142 | --- !u!124 &68344648 143 | Behaviour: 144 | m_ObjectHideFlags: 0 145 | m_CorrespondingSourceObject: {fileID: 0} 146 | m_PrefabInternal: {fileID: 0} 147 | m_GameObject: {fileID: 68344646} 148 | m_Enabled: 1 149 | --- !u!92 &68344649 150 | Behaviour: 151 | m_ObjectHideFlags: 0 152 | m_CorrespondingSourceObject: {fileID: 0} 153 | m_PrefabInternal: {fileID: 0} 154 | m_GameObject: {fileID: 68344646} 155 | m_Enabled: 1 156 | --- !u!20 &68344650 157 | Camera: 158 | m_ObjectHideFlags: 0 159 | m_CorrespondingSourceObject: {fileID: 0} 160 | m_PrefabInternal: {fileID: 0} 161 | m_GameObject: {fileID: 68344646} 162 | m_Enabled: 1 163 | serializedVersion: 2 164 | m_ClearFlags: 1 165 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 166 | m_projectionMatrixMode: 1 167 | m_SensorSize: {x: 36, y: 24} 168 | m_LensShift: {x: 0, y: 0} 169 | m_FocalLength: 50 170 | m_NormalizedViewPortRect: 171 | serializedVersion: 2 172 | x: 0 173 | y: 0 174 | width: 1 175 | height: 1 176 | near clip plane: 0.3 177 | far clip plane: 1000 178 | field of view: 60 179 | orthographic: 0 180 | orthographic size: 5 181 | m_Depth: -1 182 | m_CullingMask: 183 | serializedVersion: 2 184 | m_Bits: 4294967295 185 | m_RenderingPath: -1 186 | m_TargetTexture: {fileID: 0} 187 | m_TargetDisplay: 0 188 | m_TargetEye: 3 189 | m_HDR: 0 190 | m_AllowMSAA: 1 191 | m_AllowDynamicResolution: 0 192 | m_ForceIntoRT: 0 193 | m_OcclusionCulling: 1 194 | m_StereoConvergence: 10 195 | m_StereoSeparation: 0.022 196 | --- !u!4 &68344651 197 | Transform: 198 | m_ObjectHideFlags: 0 199 | m_CorrespondingSourceObject: {fileID: 0} 200 | m_PrefabInternal: {fileID: 0} 201 | m_GameObject: {fileID: 68344646} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_Children: [] 206 | m_Father: {fileID: 0} 207 | m_RootOrder: 0 208 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 209 | --- !u!1 &690469608 210 | GameObject: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInternal: {fileID: 0} 214 | serializedVersion: 6 215 | m_Component: 216 | - component: {fileID: 690469610} 217 | - component: {fileID: 690469609} 218 | m_Layer: 0 219 | m_Name: Directional Light 220 | m_TagString: Untagged 221 | m_Icon: {fileID: 0} 222 | m_NavMeshLayer: 0 223 | m_StaticEditorFlags: 0 224 | m_IsActive: 1 225 | --- !u!108 &690469609 226 | Light: 227 | m_ObjectHideFlags: 0 228 | m_CorrespondingSourceObject: {fileID: 0} 229 | m_PrefabInternal: {fileID: 0} 230 | m_GameObject: {fileID: 690469608} 231 | m_Enabled: 1 232 | serializedVersion: 8 233 | m_Type: 1 234 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 235 | m_Intensity: 1 236 | m_Range: 10 237 | m_SpotAngle: 30 238 | m_CookieSize: 10 239 | m_Shadows: 240 | m_Type: 2 241 | m_Resolution: -1 242 | m_CustomResolution: -1 243 | m_Strength: 1 244 | m_Bias: 0.05 245 | m_NormalBias: 0.4 246 | m_NearPlane: 0.2 247 | m_Cookie: {fileID: 0} 248 | m_DrawHalo: 0 249 | m_Flare: {fileID: 0} 250 | m_RenderMode: 0 251 | m_CullingMask: 252 | serializedVersion: 2 253 | m_Bits: 4294967295 254 | m_Lightmapping: 4 255 | m_LightShadowCasterMode: 0 256 | m_AreaSize: {x: 1, y: 1} 257 | m_BounceIntensity: 1 258 | m_ColorTemperature: 6570 259 | m_UseColorTemperature: 0 260 | m_ShadowRadius: 0 261 | m_ShadowAngle: 0 262 | --- !u!4 &690469610 263 | Transform: 264 | m_ObjectHideFlags: 0 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInternal: {fileID: 0} 267 | m_GameObject: {fileID: 690469608} 268 | m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} 269 | m_LocalPosition: {x: 0, y: 3, z: 0} 270 | m_LocalScale: {x: 1, y: 1, z: 1} 271 | m_Children: [] 272 | m_Father: {fileID: 0} 273 | m_RootOrder: 1 274 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 275 | --- !u!1 &1267578452 276 | GameObject: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInternal: {fileID: 0} 280 | serializedVersion: 6 281 | m_Component: 282 | - component: {fileID: 1267578454} 283 | - component: {fileID: 1267578453} 284 | - component: {fileID: 1267578455} 285 | m_Layer: 0 286 | m_Name: DungeonGenerator 287 | m_TagString: Untagged 288 | m_Icon: {fileID: 0} 289 | m_NavMeshLayer: 0 290 | m_StaticEditorFlags: 0 291 | m_IsActive: 1 292 | --- !u!114 &1267578453 293 | MonoBehaviour: 294 | m_ObjectHideFlags: 0 295 | m_CorrespondingSourceObject: {fileID: 0} 296 | m_PrefabInternal: {fileID: 0} 297 | m_GameObject: {fileID: 1267578452} 298 | m_Enabled: 0 299 | m_EditorHideFlags: 0 300 | m_Script: {fileID: 11500000, guid: d39c4929dea0a5c4f880af254d4baa2d, type: 3} 301 | m_Name: 302 | m_EditorClassIdentifier: 303 | mapPrefap: {fileID: 11452788, guid: 957b75f046aa8664ea4831c0608b29dd, type: 2} 304 | MapSizeX: 100 305 | MapSizeZ: 100 306 | MaxRooms: 20 307 | MaxRoomSize: 17 308 | MinRoomSize: 9 309 | TileSizeFactor: 15 310 | --- !u!4 &1267578454 311 | Transform: 312 | m_ObjectHideFlags: 0 313 | m_CorrespondingSourceObject: {fileID: 0} 314 | m_PrefabInternal: {fileID: 0} 315 | m_GameObject: {fileID: 1267578452} 316 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 317 | m_LocalPosition: {x: 0, y: 0, z: 0} 318 | m_LocalScale: {x: 1, y: 1, z: 1} 319 | m_Children: [] 320 | m_Father: {fileID: 0} 321 | m_RootOrder: 2 322 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 323 | --- !u!114 &1267578455 324 | MonoBehaviour: 325 | m_ObjectHideFlags: 0 326 | m_CorrespondingSourceObject: {fileID: 0} 327 | m_PrefabInternal: {fileID: 0} 328 | m_GameObject: {fileID: 1267578452} 329 | m_Enabled: 1 330 | m_EditorHideFlags: 0 331 | m_Script: {fileID: 11500000, guid: 3a319e976ea2ee2428c1c8f6d6f09a9d, type: 3} 332 | m_Name: 333 | m_EditorClassIdentifier: 334 | Dungeons: 335 | - {fileID: 114654860230801546, guid: 43aab333a0ea298489524585cf125cbd, type: 2} 336 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/01.Scenes/Room.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21d63cb70b4af9d43924d5f130f0c3be 3 | timeCreated: 1467794513 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faf9b097cf969d043a8581a32c6d7964 3 | folderAsset: yes 4 | timeCreated: 1467617639 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Corridor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using ooparts.dungen.Dungeons; 4 | using UnityEngine; 5 | 6 | namespace ooparts.dungen 7 | { 8 | public class Corridor : MonoBehaviour 9 | { 10 | public IntVector2 Coordinates; // Rooms[1].x , Rooms[0].z 11 | public float Length; 12 | public Room[] Rooms = new Room[2]; 13 | public Tile TilePrefab; 14 | public List Triangles = new List(); 15 | public GameObject WallPrefab; 16 | 17 | private Map _map; 18 | private List _tiles; 19 | private GameObject _tilesObject; 20 | private GameObject _wallsObject; 21 | 22 | public void Init(Map map) 23 | { 24 | _map = map; 25 | } 26 | 27 | public IEnumerator Generate() 28 | { 29 | transform.localPosition *= RoomMapManager.TileSize; 30 | _tilesObject = new GameObject("Tiles"); 31 | _tilesObject.transform.parent = transform; 32 | _tilesObject.transform.localPosition = Vector3.zero; 33 | 34 | // Separate Corridor to room 35 | MoveStickedCorridor(); 36 | 37 | _tiles = new List(); 38 | var start = Rooms[0].Coordinates.x + Rooms[0].Size.x / 2; 39 | var end = Coordinates.x; 40 | if (start > end) 41 | { 42 | var temp = start; 43 | start = end; 44 | end = temp; 45 | } 46 | 47 | for (var i = start; i <= end; i++) 48 | { 49 | var newTile = CreateTile(new IntVector2(i, Coordinates.z)); 50 | if (newTile) _tiles.Add(newTile); 51 | } 52 | 53 | start = Rooms[1].Coordinates.z + Rooms[1].Size.z / 2; 54 | end = Coordinates.z; 55 | if (start > end) 56 | { 57 | var temp = start; 58 | start = end; 59 | end = temp; 60 | } 61 | 62 | for (var i = start; i <= end; i++) 63 | { 64 | var newTile = CreateTile(new IntVector2(Coordinates.x, i)); 65 | if (newTile) _tiles.Add(newTile); 66 | } 67 | 68 | yield return null; 69 | } 70 | 71 | public void Show() 72 | { 73 | Debug.DrawLine(Rooms[0].transform.localPosition, transform.localPosition, Color.white, 3.5f); 74 | Debug.DrawLine(transform.localPosition, Rooms[1].transform.localPosition, Color.white, 3.5f); 75 | } 76 | 77 | private Tile CreateTile(IntVector2 coordinates) 78 | { 79 | if (_map.GetTileType(coordinates) == TileType.Empty) 80 | _map.SetTileType(coordinates, TileType.Corridor); 81 | else 82 | return null; 83 | 84 | var newTile = Instantiate(TilePrefab); 85 | newTile.Coordinates = coordinates; 86 | newTile.name = "Tile " + coordinates.x + ", " + coordinates.z; 87 | newTile.transform.parent = _tilesObject.transform; 88 | newTile.transform.localPosition = RoomMapManager.TileSize * new Vector3(coordinates.x - Coordinates.x + 0.5f, 0, coordinates.z - Coordinates.z + 0.5f); 89 | return newTile; 90 | } 91 | 92 | private void MoveStickedCorridor() 93 | { 94 | var correction = new IntVector2(0, 0); 95 | 96 | if (Rooms[0].Coordinates.x == Coordinates.x + 1) 97 | correction.x = 2; 98 | else if (Rooms[0].Coordinates.x + Rooms[0].Size.x == Coordinates.x) 99 | correction.x = -2; 100 | else if (Rooms[0].Coordinates.x == Coordinates.x) 101 | correction.x = 1; 102 | else if (Rooms[0].Coordinates.x + Rooms[0].Size.x == Coordinates.x + 1) correction.x = -1; 103 | 104 | 105 | if (Rooms[1].Coordinates.z == Coordinates.z + 1) 106 | correction.z = 2; 107 | else if (Rooms[1].Coordinates.z + Rooms[1].Size.z == Coordinates.z) 108 | correction.z = -2; 109 | else if (Rooms[1].Coordinates.z == Coordinates.z) 110 | correction.z = 1; 111 | else if (Rooms[1].Coordinates.z + Rooms[1].Size.z == Coordinates.z + 1) correction.z = -1; 112 | 113 | Coordinates += correction; 114 | transform.localPosition += RoomMapManager.TileSize * new Vector3(correction.x, 0f, correction.z); 115 | } 116 | 117 | public IEnumerator CreateWalls() 118 | { 119 | _wallsObject = new GameObject("Walls"); 120 | _wallsObject.transform.parent = transform; 121 | _wallsObject.transform.localPosition = Vector3.zero; 122 | 123 | foreach (var tile in _tiles) 124 | foreach (var direction in MapDirections.Directions) 125 | { 126 | var coordinates = tile.Coordinates + direction.ToIntVector2(); 127 | if (_map.GetTileType(coordinates) == TileType.Wall) 128 | { 129 | var newWall = Instantiate(WallPrefab); 130 | newWall.name = "Wall (" + coordinates.x + ", " + coordinates.z + ")"; 131 | newWall.transform.parent = _wallsObject.transform; 132 | newWall.transform.localPosition = RoomMapManager.TileSize * _map.CoordinatesToPosition(coordinates) - transform.localPosition; 133 | newWall.transform.localRotation = direction.ToRotation(); 134 | newWall.transform.localScale *= RoomMapManager.TileSize; 135 | } 136 | } 137 | 138 | yield return null; 139 | } 140 | } 141 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Corridor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e16e1daae906db843983f754a88fc715 3 | timeCreated: 1468093228 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/DungeonGenerator.cs: -------------------------------------------------------------------------------- 1 | using ooparts.dungen.Dungeons; 2 | using UnityEngine; 3 | 4 | public class DungeonGenerator : MonoBehaviour 5 | { 6 | public TileDungeon2D[] TileDungeon2Ds; 7 | 8 | // Use this for initialization 9 | private void Start() 10 | { 11 | Instantiate(TileDungeon2Ds[0]); 12 | } 13 | 14 | // Update is called once per frame 15 | private void Update() 16 | { 17 | } 18 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/DungeonGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a319e976ea2ee2428c1c8f6d6f09a9d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18e479edd01bfad4ca01645ff447e81d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPCorridor.cs: -------------------------------------------------------------------------------- 1 | using ooparts.dungen; 2 | using ooparts.dungen.Dungeons; 3 | using UnityEngine; 4 | 5 | public class BSPCorridor : MonoBehaviour 6 | { 7 | public enum Orientation 8 | { 9 | Vertical, 10 | Horizontal 11 | } 12 | 13 | public int BroadFactor = 1; // TODO: How many tiles in width of the corridor 14 | public Tile TilePrefab; 15 | public RoomSetting Setting; 16 | 17 | private IntVector2 _coordinates; 18 | private IntVector2 _aCoordinate, _bCoordinate; 19 | private Orientation _orientation; 20 | private TileDungeon2D _dungeon; 21 | private Tile[] _tiles; 22 | private GameObject _tilesObject; 23 | 24 | public void Init(IntVector2 a, IntVector2 b, IntVector2 coordinates, TileDungeon2D dungeon) 25 | { 26 | if (Mathf.Abs(a.z - b.z) > Mathf.Abs(a.x - b.x)) 27 | { 28 | // Vertical Corridor 29 | _orientation = Orientation.Vertical; 30 | 31 | // a is on bottom 32 | if (a.z > b.z) 33 | { 34 | _aCoordinate = b; 35 | _bCoordinate = a; 36 | } 37 | else 38 | { 39 | _aCoordinate = a; 40 | _bCoordinate = b; 41 | } 42 | } 43 | else 44 | { 45 | // Horizontal Corridor 46 | _orientation = Orientation.Horizontal; 47 | 48 | // b is on left 49 | if (a.x > b.x) 50 | { 51 | _aCoordinate = b; 52 | _bCoordinate = a; 53 | } 54 | else 55 | { 56 | _aCoordinate = a; 57 | _bCoordinate = b; 58 | } 59 | } 60 | 61 | _coordinates = coordinates; 62 | _dungeon = dungeon; 63 | } 64 | 65 | 66 | // Generate Straight Corridor 67 | public void GenerateStraight() 68 | { 69 | transform.SetPositionAndRotation(new Vector3(_aCoordinate.x, 0, _aCoordinate.z), new Quaternion()); 70 | 71 | // Create parent object 72 | _tilesObject = new GameObject("Tiles"); 73 | _tilesObject.transform.parent = transform; 74 | _tilesObject.transform.localPosition = Vector3.zero; 75 | 76 | 77 | if (_orientation == Orientation.Horizontal) 78 | { 79 | // Generate horizontal corridors 80 | var start = _aCoordinate.x; 81 | var end = _bCoordinate.x; 82 | 83 | while (true) 84 | // Move start and end to empty tile 85 | if (_dungeon.GetTileType(start, _aCoordinate.z) != TileType.Empty) 86 | start++; 87 | else if (_dungeon.GetTileType(end, _bCoordinate.z) != TileType.Empty) 88 | end--; 89 | else 90 | break; 91 | 92 | var numberOfTiles = end - start + 1; 93 | Debug.Log(numberOfTiles); 94 | _tiles = new Tile[numberOfTiles]; 95 | 96 | for (var i = 0; i < numberOfTiles; i++) _tiles[i] = CreateTile(new IntVector2(start - _aCoordinate.x + i, 0)); 97 | } 98 | else 99 | { 100 | // Generate vertical corridors 101 | var start = _aCoordinate.z; 102 | var end = _bCoordinate.z; 103 | 104 | while (true) 105 | // Move start and end to empty tile 106 | if (_dungeon.GetTileType(_aCoordinate.x, start) != TileType.Empty) 107 | start++; 108 | else if (_dungeon.GetTileType(_bCoordinate.x, end) != TileType.Empty) 109 | end--; 110 | else 111 | break; 112 | 113 | var numberOfTiles = end - start + 1; 114 | Debug.Log(numberOfTiles); 115 | _tiles = new Tile[numberOfTiles]; 116 | 117 | for (var i = 0; i < numberOfTiles; i++) _tiles[i] = CreateTile(new IntVector2(0, start - _aCoordinate.z + i)); 118 | } 119 | } 120 | 121 | private Tile CreateTile(IntVector2 coordinates) 122 | { 123 | if (_dungeon.GetTileType(coordinates) == TileType.Empty) 124 | _dungeon.SetTileType(coordinates, TileType.Corridor); 125 | else 126 | Debug.LogError("Tile Conflict!"); 127 | 128 | var newTile = Instantiate(TilePrefab); 129 | newTile.Coordinates = coordinates; 130 | newTile.name = "Tile " + coordinates.x + ", " + coordinates.z; 131 | newTile.transform.parent = _tilesObject.transform; 132 | newTile.transform.localPosition = RoomMapManager.TileSize * new Vector3(coordinates.x, 0f, coordinates.z); 133 | newTile.transform.GetChild(0).GetComponent().material = Setting.floor; 134 | return newTile; 135 | } 136 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPCorridor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3822a2e43f8bbd428746980c997f77f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPDungeon.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | using UnityEngine.Assertions; 4 | 5 | namespace ooparts.dungen.Dungeons 6 | { 7 | public class BSPDungeon : TileDungeon2D 8 | { 9 | public IntVector2 MinRoomSize; 10 | public int Padding = 1; 11 | public BSPRoom RoomPrefab; 12 | public BSPCorridor CorridorPrefab; 13 | private IntVector2 _minPartitionSize; 14 | private BSPTreeNode _rootNode; 15 | 16 | protected override void Start() 17 | { 18 | base.Start(); 19 | // Partition Size is 1 tile larger than room size for padding 20 | _rootNode = GenerateNode(MapSize + 2 * Padding, IntVector2.Zero - Padding); 21 | _minPartitionSize = MinRoomSize + 2 * Padding; 22 | StartCoroutine(SplitPartition(_rootNode)); 23 | } 24 | 25 | // Generate Room for the Partition 26 | public BSPRoom GenerateRoom(IntVector2 size, IntVector2 coordinates) 27 | { 28 | var room = Instantiate(RoomPrefab); 29 | room.Init(size, coordinates, this); 30 | room.Generate(); 31 | return room; 32 | } 33 | 34 | // Generate Corridor between two coordinates 35 | public BSPCorridor GenerateCorridor(IntVector2 a, IntVector2 b, IntVector2 coordinates) 36 | { 37 | var corridor = Instantiate(CorridorPrefab); 38 | corridor.Init(a, b, coordinates, this); 39 | corridor.GenerateStraight(); 40 | return corridor; 41 | } 42 | 43 | // March until connected to room or corridor 44 | public IEnumerator ConnectRooms(BSPTreeNode node) 45 | { 46 | // Connect only if there are children 47 | if (node.LNode != null && node.RNode != null) 48 | { 49 | // Connect children first 50 | yield return ConnectRooms(node.LNode); 51 | yield return ConnectRooms(node.RNode); 52 | 53 | // 54 | var LCenter = node.LNode.Coordinates + node.LNode.PartitionSize / 2; 55 | var RCenter = node.RNode.Coordinates + node.RNode.PartitionSize / 2; 56 | 57 | GenerateCorridor(LCenter, RCenter, node.Coordinates); 58 | } 59 | 60 | yield return null; 61 | } 62 | 63 | // Put root node to split 64 | // Split them recursively or Generate Room 65 | public IEnumerator SplitPartition(BSPTreeNode node) 66 | { 67 | // The partition cannot be split. 68 | if (node.PartitionSize < _minPartitionSize * 2) 69 | { 70 | // Generate Random Room here. 71 | var roomSize = node.PartitionSize - 2 * Padding; 72 | roomSize.x = Random.Range(MinRoomSize.x, roomSize.x); 73 | roomSize.z = Random.Range(MinRoomSize.z, roomSize.z); 74 | 75 | var minRoomCoordinates = node.Coordinates + Padding; 76 | var maxRoomCoordinates = node.Coordinates + node.PartitionSize - roomSize - Padding; 77 | var roomCoordinates = new IntVector2( 78 | Random.Range(minRoomCoordinates.x, maxRoomCoordinates.x), 79 | Random.Range(minRoomCoordinates.z, maxRoomCoordinates.z) 80 | ); 81 | 82 | node.Room = GenerateRoom(roomSize, roomCoordinates); 83 | 84 | // For Debug 85 | var leftBot = node.Coordinates.GetVector3(); 86 | var rightTop = (node.Coordinates + node.PartitionSize).GetVector3(); 87 | var leftTop = new Vector3(leftBot.x, 0, rightTop.z); 88 | var rightBot = new Vector3(rightTop.x, 0, leftBot.z); 89 | Debug.DrawLine(leftBot, leftTop, Color.red, 3); 90 | Debug.DrawLine(leftTop, rightTop, Color.red, 3); 91 | Debug.DrawLine(rightTop, rightBot, Color.red, 3); 92 | Debug.DrawLine(rightBot, leftBot, Color.red, 3); 93 | 94 | yield return null; 95 | } 96 | else if (node.PartitionSize.x > node.PartitionSize.z || node.PartitionSize.z < _minPartitionSize.z * 2) 97 | { 98 | // Can be split 99 | // Split X 100 | var gap = node.PartitionSize.x - _minPartitionSize.x * 2; 101 | Assert.IsFalse(gap < 0, "Gap must be positive"); 102 | var rInt = Random.Range(0, gap); 103 | 104 | // LNode 105 | var LNodeSize = new IntVector2(_minPartitionSize.x + rInt, node.PartitionSize.z); 106 | var LNodeCoordinates = node.Coordinates; 107 | node.LNode = GenerateNode(LNodeSize, LNodeCoordinates); 108 | Assert.IsNotNull(node.LNode, "LNode is not generated"); 109 | 110 | // RNode 111 | var RNodeSize = new IntVector2(_minPartitionSize.x + gap - rInt, node.PartitionSize.z); 112 | var RNodeCoordinates = new IntVector2(node.Coordinates.x + LNodeSize.x, node.Coordinates.z); 113 | node.RNode = GenerateNode(RNodeSize, RNodeCoordinates); 114 | 115 | Assert.IsNotNull(node.RNode, "RNode is not generated"); 116 | 117 | // Split child nodes 118 | yield return SplitPartition(node.LNode); 119 | yield return SplitPartition(node.RNode); 120 | yield return ConnectRooms(node); 121 | } 122 | else 123 | { 124 | // Split Z 125 | var gap = node.PartitionSize.z - _minPartitionSize.z * 2; 126 | 127 | Assert.IsFalse(gap < 0, "Gap must be positive"); 128 | var rInt = Random.Range(0, gap); 129 | 130 | // LNode 131 | var LNodeSize = new IntVector2(node.PartitionSize.x, _minPartitionSize.z + rInt); 132 | var LNodeCoordinates = node.Coordinates; 133 | node.LNode = GenerateNode(LNodeSize, LNodeCoordinates); 134 | Assert.IsNotNull(node.LNode, "LNode is not generated"); 135 | 136 | // RNode 137 | var RNodeSize = new IntVector2(node.PartitionSize.x, _minPartitionSize.z + gap - rInt); 138 | var RNodeCoordinates = new IntVector2(node.Coordinates.x, node.Coordinates.z + LNodeSize.z); 139 | node.RNode = GenerateNode(RNodeSize, RNodeCoordinates); 140 | Assert.IsNotNull(node.RNode, "RNode is not generated"); 141 | 142 | // Split child nodes 143 | yield return SplitPartition(node.LNode); 144 | yield return SplitPartition(node.RNode); 145 | yield return ConnectRooms(node); 146 | } 147 | } 148 | 149 | // Generate Tree node if it is available. 150 | private BSPTreeNode GenerateNode(IntVector2 size, IntVector2 coordinate) 151 | { 152 | return size > MinRoomSize ? new BSPTreeNode(size, coordinate) : null; 153 | } 154 | } 155 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPDungeon.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41038910eab37d94eb0553c2f5e0e945 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPRoom.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace ooparts.dungen.Dungeons 4 | { 5 | public class BSPRoom : MonoBehaviour 6 | { 7 | public RoomSetting Setting; 8 | public Tile TilePrefab; 9 | 10 | private IntVector2 _coordinates; 11 | private IntVector2 _size; 12 | private Tile[,] _tiles; 13 | private GameObject _tilesObject; 14 | private TileDungeon2D _dungeon; 15 | 16 | public void Init(IntVector2 size, IntVector2 coordinates, TileDungeon2D dungeon) 17 | { 18 | _size = size; 19 | _coordinates = coordinates; 20 | _dungeon = dungeon; 21 | } 22 | 23 | public void Generate() 24 | { 25 | transform.SetPositionAndRotation(new Vector3(_coordinates.x, 0, _coordinates.z), new Quaternion()); 26 | // Create parent object 27 | _tilesObject = new GameObject("Tiles"); 28 | _tilesObject.transform.parent = transform; 29 | _tilesObject.transform.localPosition = Vector3.zero; 30 | 31 | _tiles = new Tile[_size.x, _size.z]; 32 | for (var x = 0; x < _size.x; x++) 33 | for (var z = 0; z < _size.z; z++) 34 | _tiles[x, z] = CreateTile(new IntVector2(_coordinates.x + x, _coordinates.z + z)); 35 | } 36 | 37 | private Tile CreateTile(IntVector2 coordinates) 38 | { 39 | if (_dungeon.GetTileType(coordinates) == TileType.Empty) 40 | _dungeon.SetTileType(coordinates, TileType.Room); 41 | else 42 | Debug.LogError("Tile Conflict!"); 43 | 44 | var newTile = Instantiate(TilePrefab); 45 | newTile.Coordinates = coordinates; 46 | newTile.name = "Tile " + coordinates.x + ", " + coordinates.z; 47 | newTile.transform.parent = _tilesObject.transform; 48 | newTile.transform.localPosition = RoomMapManager.TileSize * new Vector3(coordinates.x - _coordinates.x, 0f, coordinates.z - _coordinates.z); 49 | newTile.transform.GetChild(0).GetComponent().material = Setting.floor; 50 | return newTile; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPRoom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49d62c5223634e24ea6046954ab8b67c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPTreeNode.cs: -------------------------------------------------------------------------------- 1 | namespace ooparts.dungen.Dungeons 2 | { 3 | public class BSPTreeNode 4 | { 5 | public IntVector2 Coordinates; 6 | public IntVector2 PartitionSize; 7 | 8 | public BSPTreeNode LNode; 9 | public BSPTreeNode RNode; 10 | public BSPRoom Room; // TODO: need to check 11 | 12 | public BSPTreeNode(IntVector2 size, IntVector2 coordinates) 13 | { 14 | PartitionSize = size; 15 | Coordinates = coordinates; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/BSPTreeNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: deaa88403241e43409e7b4473fe779c6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/TileDungeon2D.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace ooparts.dungen.Dungeons 4 | { 5 | public enum TileType 6 | { 7 | Empty, 8 | Room, 9 | Corridor, 10 | Wall 11 | } 12 | 13 | public abstract class TileDungeon2D : MonoBehaviour 14 | { 15 | public int TileSize = 1; 16 | public IntVector2 MapSize; 17 | 18 | private TileType[,] _tileTypes; 19 | 20 | // Use this for initialization 21 | protected virtual void Start() 22 | { 23 | _tileTypes = new TileType[MapSize.x, MapSize.z]; 24 | } 25 | 26 | // Update is called once per frame 27 | private void Update() 28 | { 29 | } 30 | 31 | public void SetTileType(IntVector2 coordinates, TileType tileType) 32 | { 33 | SetTileType(coordinates.x, coordinates.z, tileType); 34 | } 35 | 36 | public void SetTileType(int x, int z, TileType tileType) 37 | { 38 | _tileTypes[x, z] = tileType; 39 | } 40 | 41 | public TileType GetTileType(IntVector2 coordinates) 42 | { 43 | return GetTileType(coordinates.x, coordinates.z); 44 | } 45 | 46 | public TileType GetTileType(int x, int z) 47 | { 48 | return _tileTypes[x, z]; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Dungeons/TileDungeon2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22e2c74b4f3712144bc388f7192a0209 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/IntVector2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace ooparts.dungen 5 | { 6 | [Serializable] 7 | public struct IntVector2 8 | { 9 | public int x, z; 10 | 11 | public static IntVector2 Zero = new IntVector2(0, 0); 12 | 13 | public IntVector2(int x, int z) 14 | { 15 | this.x = x; 16 | this.z = z; 17 | } 18 | 19 | public static IntVector2 operator +(IntVector2 a, IntVector2 b) 20 | { 21 | a.x += b.x; 22 | a.z += b.z; 23 | return a; 24 | } 25 | 26 | public static IntVector2 operator -(IntVector2 a, IntVector2 b) 27 | { 28 | a.x -= b.x; 29 | a.z -= b.z; 30 | return a; 31 | } 32 | 33 | public static Vector3 operator +(Vector3 a, IntVector2 b) 34 | { 35 | a.x += b.x; 36 | a.z += b.z; 37 | return a; 38 | } 39 | 40 | public static bool operator >(IntVector2 a, IntVector2 b) 41 | { 42 | return a.x > b.x && a.z > b.z; 43 | } 44 | 45 | public static bool operator <(IntVector2 a, IntVector2 b) 46 | { 47 | return a.x < b.x && a.z < b.z; 48 | } 49 | 50 | public static IntVector2 operator +(IntVector2 a, int b) 51 | { 52 | IntVector2 result; 53 | result.x = a.x + b; 54 | result.z = a.z + b; 55 | return result; 56 | } 57 | 58 | public static IntVector2 operator -(IntVector2 a, int b) 59 | { 60 | IntVector2 result; 61 | result.x = a.x - b; 62 | result.z = a.z - b; 63 | return result; 64 | } 65 | 66 | public static IntVector2 operator *(IntVector2 a, int b) 67 | { 68 | IntVector2 result; 69 | result.x = a.x * b; 70 | result.z = a.z * b; 71 | return result; 72 | } 73 | 74 | public static IntVector2 operator /(IntVector2 a, int b) 75 | { 76 | IntVector2 result; 77 | result.x = a.x / b; 78 | result.z = a.z / b; 79 | return result; 80 | } 81 | 82 | public Vector3 GetVector3() 83 | { 84 | return new Vector3(x, 0, z); 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/IntVector2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87f204376d8cbb5438e6b251229b7e69 3 | timeCreated: 1467619915 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Map.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using ooparts.dungen.Dungeons; 6 | using UnityEngine; 7 | using Debug = UnityEngine.Debug; 8 | using Random = UnityEngine.Random; 9 | 10 | namespace ooparts.dungen 11 | { 12 | [Serializable] 13 | public struct MinMax 14 | { 15 | public int Min; 16 | public int Max; 17 | } 18 | 19 | public class Map : TileDungeon2D 20 | { 21 | [HideInInspector] public int RoomCount; 22 | public Room RoomPrefab; 23 | public RoomSetting[] RoomSettings; 24 | [HideInInspector] public MinMax RoomSize; 25 | 26 | private List _corridors; 27 | private bool _hasPlayer; 28 | private List _rooms; 29 | 30 | public IntVector2 RandomCoordinates 31 | { 32 | get { return new IntVector2(Random.Range(0, MapSize.x), Random.Range(0, MapSize.z)); } 33 | } 34 | 35 | // Big enough to cover the map 36 | private Triangle LootTriangle 37 | { 38 | get 39 | { 40 | Vector3[] vertexs = 41 | { 42 | RoomMapManager.TileSize * new Vector3(MapSize.x * 2, 0, MapSize.z), 43 | RoomMapManager.TileSize * new Vector3(-MapSize.x * 2, 0, MapSize.z), 44 | RoomMapManager.TileSize * new Vector3(0, 0, -2 * MapSize.z) 45 | }; 46 | 47 | var tempRooms = new Room[3]; 48 | for (var i = 0; i < 3; i++) 49 | { 50 | tempRooms[i] = Instantiate(RoomPrefab); 51 | tempRooms[i].transform.localPosition = vertexs[i]; 52 | tempRooms[i].name = "Loot Room " + i; 53 | tempRooms[i].Init(this); 54 | } 55 | 56 | return new Triangle(tempRooms[0], tempRooms[1], tempRooms[2]); 57 | } 58 | } 59 | 60 | // Generate Rooms and Corridors 61 | public IEnumerator Generate() 62 | { 63 | var stopwatch = new Stopwatch(); 64 | stopwatch.Start(); 65 | 66 | { 67 | _rooms = new List(); 68 | 69 | // Generate Rooms 70 | for (var i = 0; i < RoomCount; i++) 71 | { 72 | var roomInstance = CreateRoom(); 73 | if (roomInstance == null) 74 | { 75 | RoomCount = _rooms.Count; 76 | Debug.Log("Cannot make more rooms!"); 77 | Debug.Log("Created Rooms : " + RoomCount); 78 | break; 79 | } 80 | 81 | roomInstance.Setting = RoomSettings[Random.Range(0, RoomSettings.Length)]; 82 | StartCoroutine(roomInstance.Generate()); 83 | 84 | // Generate Player or Monster 85 | if (_hasPlayer) 86 | { 87 | yield return roomInstance.CreateMonsters(); 88 | } 89 | else 90 | { 91 | yield return roomInstance.CreatePlayer(); 92 | _hasPlayer = true; 93 | } 94 | 95 | yield return null; 96 | } 97 | 98 | Debug.Log("Every rooms are generated"); 99 | 100 | // Delaunay Triangulation 101 | yield return BowyerWatson(); 102 | 103 | // Minimal Spanning Tree 104 | yield return PrimMST(); 105 | Debug.Log("Every rooms are minimally connected"); 106 | 107 | // Generate Corridors 108 | foreach (var corridor in _corridors) 109 | { 110 | StartCoroutine(corridor.Generate()); 111 | yield return null; 112 | } 113 | 114 | Debug.Log("Every corridors are generated"); 115 | 116 | // Generate Walls 117 | yield return WallCheck(); 118 | foreach (var room in _rooms) yield return room.CreateWalls(); 119 | 120 | foreach (var corridor in _corridors) yield return corridor.CreateWalls(); 121 | 122 | Debug.Log("Every walls are generated"); 123 | } 124 | 125 | stopwatch.Stop(); 126 | print("Done in :" + stopwatch.ElapsedMilliseconds / 1000f + "s"); 127 | } 128 | 129 | private IEnumerator WallCheck() 130 | { 131 | for (var x = 0; x < MapSize.x; x++) 132 | for (var z = 0; z < MapSize.z; z++) 133 | if (GetTileType(x, z) == TileType.Empty && IsWall(x, z)) 134 | SetTileType(x, z, TileType.Wall); 135 | 136 | yield return null; 137 | } 138 | 139 | private bool IsWall(int x, int z) 140 | { 141 | for (var i = x - 1; i <= x + 1; i++) 142 | { 143 | if (i < 0 || i >= MapSize.x) continue; 144 | 145 | for (var j = z - 1; j <= z + 1; j++) 146 | { 147 | if (j < 0 || j >= MapSize.z || i == x && j == z) continue; 148 | 149 | if (GetTileType(i, j) == TileType.Room || GetTileType(i, j) == TileType.Corridor) return true; 150 | } 151 | } 152 | 153 | return false; 154 | } 155 | 156 | private Room CreateRoom() 157 | { 158 | Room newRoom = null; 159 | 160 | // Try as many as we can. 161 | for (var i = 0; i < RoomCount * RoomCount; i++) 162 | { 163 | var size = new IntVector2(Random.Range(RoomSize.Min, RoomSize.Max + 1), Random.Range(RoomSize.Min, RoomSize.Max + 1)); 164 | var coordinates = new IntVector2(Random.Range(1, MapSize.x - size.x), Random.Range(1, MapSize.z - size.z)); 165 | if (!IsOverlapped(size, coordinates)) 166 | { 167 | newRoom = Instantiate(RoomPrefab); 168 | _rooms.Add(newRoom); 169 | newRoom.Num = _rooms.Count; 170 | newRoom.name = "Room " + newRoom.Num + " (" + coordinates.x + ", " + coordinates.z + ")"; 171 | newRoom.Size = size; 172 | newRoom.Coordinates = coordinates; 173 | newRoom.transform.parent = transform; 174 | var position = CoordinatesToPosition(coordinates); 175 | position.x += size.x * 0.5f - 0.5f; 176 | position.z += size.z * 0.5f - 0.5f; 177 | position *= RoomMapManager.TileSize; 178 | newRoom.transform.localPosition = position; 179 | newRoom.Init(this); 180 | break; 181 | } 182 | } 183 | 184 | if (newRoom == null) Debug.LogError("Too many rooms in map!! : " + _rooms.Count); 185 | 186 | return newRoom; 187 | } 188 | 189 | private bool IsOverlapped(IntVector2 size, IntVector2 coordinates) 190 | { 191 | foreach (var room in _rooms) 192 | // Give a little space between two rooms 193 | if (Mathf.Abs(room.Coordinates.x - coordinates.x + (room.Size.x - size.x) * 0.5f) < (room.Size.x + size.x) * 0.7f && 194 | Mathf.Abs(room.Coordinates.z - coordinates.z + (room.Size.z - size.z) * 0.5f) < (room.Size.z + size.z) * 0.7f) 195 | return true; 196 | 197 | return false; 198 | } 199 | 200 | private IEnumerator BowyerWatson() 201 | { 202 | var triangulation = new List(); 203 | 204 | var loot = LootTriangle; 205 | triangulation.Add(loot); 206 | 207 | foreach (var room in _rooms) 208 | { 209 | var badTriangles = new List(); 210 | 211 | foreach (var triangle in triangulation) 212 | if (triangle.IsContaining(room)) 213 | badTriangles.Add(triangle); 214 | 215 | var polygon = new List(); 216 | foreach (var badTriangle in badTriangles) 217 | foreach (var corridor in badTriangle.Corridors) 218 | { 219 | if (corridor.Triangles.Count == 1) 220 | { 221 | polygon.Add(corridor); 222 | corridor.Triangles.Remove(badTriangle); 223 | continue; 224 | } 225 | 226 | foreach (var triangle in corridor.Triangles) 227 | { 228 | if (triangle == badTriangle) continue; 229 | 230 | // Delete Corridor which is between two bad triangles. 231 | if (badTriangles.Contains(triangle)) 232 | { 233 | corridor.Rooms[0].RoomCorridor.Remove(corridor.Rooms[1]); 234 | corridor.Rooms[1].RoomCorridor.Remove(corridor.Rooms[0]); 235 | Destroy(corridor.gameObject); 236 | } 237 | else 238 | { 239 | polygon.Add(corridor); 240 | } 241 | 242 | break; 243 | } 244 | } 245 | 246 | // Delete Bad Triangles 247 | for (var index = badTriangles.Count - 1; index >= 0; --index) 248 | { 249 | var triangle = badTriangles[index]; 250 | badTriangles.RemoveAt(index); 251 | triangulation.Remove(triangle); 252 | foreach (var corridor in triangle.Corridors) corridor.Triangles.Remove(triangle); 253 | } 254 | 255 | foreach (var corridor in polygon) 256 | { 257 | // TODO: Edge sync 258 | var newTriangle = new Triangle(corridor.Rooms[0], corridor.Rooms[1], room); 259 | triangulation.Add(newTriangle); 260 | } 261 | } 262 | 263 | yield return null; 264 | 265 | for (var index = triangulation.Count - 1; index >= 0; index--) 266 | if (triangulation[index].Rooms.Contains(loot.Rooms[0]) || triangulation[index].Rooms.Contains(loot.Rooms[1]) || 267 | triangulation[index].Rooms.Contains(loot.Rooms[2])) 268 | triangulation.RemoveAt(index); 269 | 270 | foreach (var room in loot.Rooms) 271 | { 272 | var deleteList = new List(); 273 | foreach (var pair in room.RoomCorridor) deleteList.Add(pair.Value); 274 | 275 | for (var index = deleteList.Count - 1; index >= 0; index--) 276 | { 277 | var corridor = deleteList[index]; 278 | corridor.Rooms[0].RoomCorridor.Remove(corridor.Rooms[1]); 279 | corridor.Rooms[1].RoomCorridor.Remove(corridor.Rooms[0]); 280 | Destroy(corridor.gameObject); 281 | } 282 | 283 | Destroy(room.gameObject); 284 | } 285 | } 286 | 287 | private IEnumerator PrimMST() 288 | { 289 | var connectedRooms = new List(); 290 | _corridors = new List(); 291 | 292 | connectedRooms.Add(_rooms[0]); 293 | 294 | while (connectedRooms.Count < _rooms.Count) 295 | { 296 | var minLength = new KeyValuePair(); 297 | var deleteList = new List(); 298 | 299 | foreach (var room in connectedRooms) 300 | foreach (var pair in room.RoomCorridor) 301 | { 302 | if (connectedRooms.Contains(pair.Key)) continue; 303 | 304 | if (minLength.Value == null || minLength.Value.Length > pair.Value.Length) minLength = pair; 305 | } 306 | 307 | // Check Unnecessary Corridors. 308 | foreach (var pair in minLength.Key.RoomCorridor) 309 | if (connectedRooms.Contains(pair.Key) && minLength.Value != pair.Value) 310 | deleteList.Add(pair.Value); 311 | 312 | // Delete corridors 313 | for (var index = deleteList.Count - 1; index >= 0; index--) 314 | { 315 | var corridor = deleteList[index]; 316 | corridor.Rooms[0].RoomCorridor.Remove(corridor.Rooms[1]); 317 | corridor.Rooms[1].RoomCorridor.Remove(corridor.Rooms[0]); 318 | deleteList.RemoveAt(index); 319 | Destroy(corridor.gameObject); 320 | } 321 | 322 | connectedRooms.Add(minLength.Key); 323 | _corridors.Add(minLength.Value); 324 | } 325 | 326 | yield return null; 327 | } 328 | 329 | public Vector3 CoordinatesToPosition(IntVector2 coordinates) 330 | { 331 | return new Vector3(coordinates.x - MapSize.x * 0.5f + 0.5f, 0f, coordinates.z - MapSize.z * 0.5f + 0.5f); 332 | } 333 | } 334 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Map.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 298edf53b39bbe141b1de7b46c6e4ae8 3 | timeCreated: 1467795383 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/MapDirections.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace ooparts.dungen 4 | { 5 | public enum MapDirection 6 | { 7 | North, 8 | East, 9 | South, 10 | West 11 | } 12 | 13 | public static class MapDirections 14 | { 15 | public const int Count = 4; 16 | 17 | public static readonly MapDirection[] Directions = 18 | { 19 | MapDirection.North, 20 | MapDirection.East, 21 | MapDirection.South, 22 | MapDirection.West 23 | }; 24 | 25 | private static readonly IntVector2[] Vectors = 26 | { 27 | new IntVector2(0, 1), 28 | new IntVector2(1, 0), 29 | new IntVector2(0, -1), 30 | new IntVector2(-1, 0) 31 | }; 32 | 33 | private static readonly MapDirection[] Opposites = 34 | { 35 | MapDirection.South, 36 | MapDirection.West, 37 | MapDirection.North, 38 | MapDirection.East 39 | }; 40 | 41 | private static readonly Quaternion[] Rotations = 42 | { 43 | Quaternion.identity, 44 | Quaternion.Euler(0f, 90f, 0f), 45 | Quaternion.Euler(0f, 180f, 0f), 46 | Quaternion.Euler(0f, 270f, 0f) 47 | }; 48 | 49 | public static IntVector2 ToIntVector2(this MapDirection direction) 50 | { 51 | return Vectors[(int) direction]; 52 | } 53 | 54 | public static MapDirection GetOpposite(this MapDirection direction) 55 | { 56 | return Opposites[(int) direction]; 57 | } 58 | 59 | public static Quaternion ToRotation(this MapDirection direction) 60 | { 61 | return Rotations[(int) direction]; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/MapDirections.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8554a93b0e914fb4fbcac456ce07ed12 3 | timeCreated: 1468435702 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Room.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using ooparts.dungen.Dungeons; 4 | using UnityEngine; 5 | 6 | namespace ooparts.dungen 7 | { 8 | public class Room : MonoBehaviour 9 | { 10 | public int Num; 11 | 12 | public IntVector2 Coordinates; 13 | public Corridor CorridorPrefab; 14 | 15 | public int MonsterCount; 16 | public GameObject MonsterPrefab; 17 | public GameObject PlayerPrefab; 18 | 19 | public Dictionary RoomCorridor = new Dictionary(); 20 | public RoomSetting Setting; 21 | public IntVector2 Size; 22 | public Tile TilePrefab; 23 | public GameObject WallPrefab; 24 | 25 | private Map _map; 26 | private GameObject _monstersObject; 27 | private Tile[,] _tiles; 28 | 29 | private GameObject _tilesObject; 30 | private GameObject _wallsObject; 31 | private GameObject[] Monsters; 32 | 33 | public void Init(Map map) 34 | { 35 | _map = map; 36 | } 37 | 38 | public IEnumerator Generate() 39 | { 40 | // Create parent object 41 | _tilesObject = new GameObject("Tiles"); 42 | _tilesObject.transform.parent = transform; 43 | _tilesObject.transform.localPosition = Vector3.zero; 44 | 45 | _tiles = new Tile[Size.x, Size.z]; 46 | for (var x = 0; x < Size.x; x++) 47 | for (var z = 0; z < Size.z; z++) 48 | _tiles[x, z] = CreateTile(new IntVector2(Coordinates.x + x, Coordinates.z + z)); 49 | 50 | yield return null; 51 | } 52 | 53 | private Tile CreateTile(IntVector2 coordinates) 54 | { 55 | if (_map.GetTileType(coordinates) == TileType.Empty) 56 | _map.SetTileType(coordinates, TileType.Room); 57 | else 58 | Debug.LogError("Tile Conflict!"); 59 | 60 | var newTile = Instantiate(TilePrefab); 61 | newTile.Coordinates = coordinates; 62 | newTile.name = "Tile " + coordinates.x + ", " + coordinates.z; 63 | newTile.transform.parent = _tilesObject.transform; 64 | newTile.transform.localPosition = RoomMapManager.TileSize * new Vector3(coordinates.x - Coordinates.x - Size.x * 0.5f + 0.5f, 0f, coordinates.z - Coordinates.z - Size.z * 0.5f + 0.5f); 65 | newTile.transform.GetChild(0).GetComponent().material = Setting.floor; 66 | return newTile; 67 | } 68 | 69 | public Corridor CreateCorridor(Room otherRoom) 70 | { 71 | // Don't create if already connected 72 | if (RoomCorridor.ContainsKey(otherRoom)) return RoomCorridor[otherRoom]; 73 | 74 | var newCorridor = Instantiate(CorridorPrefab); 75 | newCorridor.name = "Corridor (" + otherRoom.Num + ", " + Num + ")"; 76 | newCorridor.transform.parent = transform.parent; 77 | newCorridor.Coordinates = new IntVector2(Coordinates.x + Size.x / 2, otherRoom.Coordinates.z + otherRoom.Size.z / 2); 78 | newCorridor.transform.localPosition = new Vector3(newCorridor.Coordinates.x - _map.MapSize.x / 2, 0, newCorridor.Coordinates.z - _map.MapSize.z / 2); 79 | newCorridor.Rooms[0] = otherRoom; 80 | newCorridor.Rooms[1] = this; 81 | newCorridor.Length = Mathf.Abs(otherRoom.transform.localPosition.x - transform.localPosition.x) + Mathf.Abs(otherRoom.transform.localPosition.z - transform.localPosition.z); 82 | newCorridor.Init(_map); 83 | otherRoom.RoomCorridor.Add(this, newCorridor); 84 | RoomCorridor.Add(otherRoom, newCorridor); 85 | 86 | return newCorridor; 87 | } 88 | 89 | public IEnumerator CreateWalls() 90 | { 91 | _wallsObject = new GameObject("Walls"); 92 | _wallsObject.transform.parent = transform; 93 | _wallsObject.transform.localPosition = Vector3.zero; 94 | 95 | var leftBottom = new IntVector2(Coordinates.x - 1, Coordinates.z - 1); 96 | var rightTop = new IntVector2(Coordinates.x + Size.x, Coordinates.z + Size.z); 97 | for (var x = leftBottom.x; x <= rightTop.x; x++) 98 | for (var z = leftBottom.z; z <= rightTop.z; z++) 99 | { 100 | // If it's center or corner or not wall 101 | if (x != leftBottom.x && x != rightTop.x && z != leftBottom.z && z != rightTop.z || 102 | (x == leftBottom.x || x == rightTop.x) && (z == leftBottom.z || z == rightTop.z) || 103 | _map.GetTileType(new IntVector2(x, z)) != TileType.Wall) 104 | continue; 105 | 106 | var rotation = Quaternion.identity; 107 | if (x == leftBottom.x) 108 | rotation = MapDirection.West.ToRotation(); 109 | else if (x == rightTop.x) 110 | rotation = MapDirection.East.ToRotation(); 111 | else if (z == leftBottom.z) 112 | rotation = MapDirection.South.ToRotation(); 113 | else if (z == rightTop.z) 114 | rotation = MapDirection.North.ToRotation(); 115 | else 116 | Debug.LogError("Wall is not on appropriate location!!"); 117 | 118 | var newWall = Instantiate(WallPrefab); 119 | newWall.name = "Wall (" + x + ", " + z + ")"; 120 | newWall.transform.parent = _wallsObject.transform; 121 | newWall.transform.localPosition = RoomMapManager.TileSize * new Vector3(x - Coordinates.x - Size.x * 0.5f + 0.5f, 0f, z - Coordinates.z - Size.z * 0.5f + 0.5f); 122 | newWall.transform.localRotation = rotation; 123 | newWall.transform.localScale *= RoomMapManager.TileSize; 124 | newWall.transform.GetChild(0).GetComponent().material = Setting.wall; 125 | } 126 | 127 | yield return null; 128 | } 129 | 130 | public IEnumerator CreateMonsters() 131 | { 132 | _monstersObject = new GameObject("Monsters"); 133 | _monstersObject.transform.parent = transform; 134 | _monstersObject.transform.localPosition = Vector3.zero; 135 | 136 | Monsters = new GameObject[MonsterCount]; 137 | 138 | for (var i = 0; i < MonsterCount; i++) 139 | { 140 | var newMonster = Instantiate(MonsterPrefab); 141 | newMonster.name = "Monster " + (i + 1); 142 | newMonster.transform.parent = _monstersObject.transform; 143 | newMonster.transform.localPosition = new Vector3(i / 2f, 0f, i % 2f); 144 | Monsters[i] = newMonster; 145 | } 146 | 147 | yield return null; 148 | } 149 | 150 | public IEnumerator CreatePlayer() 151 | { 152 | var player = Instantiate(PlayerPrefab); 153 | player.name = "Player"; 154 | player.transform.parent = transform.parent; 155 | player.transform.localPosition = transform.localPosition; 156 | yield return null; 157 | } 158 | } 159 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Room.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b01a893185df2e84c8110883393e1474 3 | timeCreated: 1467810876 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/RoomMapManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace ooparts.dungen 4 | { 5 | public class RoomMapManager : MonoBehaviour 6 | { 7 | public static int TileSize = 1; 8 | public int TileSizeFactor = 1; 9 | 10 | public Map mapPrefap; 11 | 12 | public int MapSizeX; 13 | public int MapSizeZ; 14 | public int MaxRooms; 15 | public int MaxRoomSize; 16 | public int MinRoomSize; 17 | 18 | private Map mapInstance; 19 | 20 | private void Start() 21 | { 22 | TileSize = TileSizeFactor; 23 | BeginGame(); 24 | } 25 | 26 | private void Update() 27 | { 28 | if (Input.GetKeyDown(KeyCode.Space)) RestartGame(); 29 | } 30 | 31 | private void BeginGame() 32 | { 33 | mapInstance = Instantiate(mapPrefap); 34 | mapInstance.RoomCount = MaxRooms; 35 | mapInstance.MapSize = new IntVector2(MapSizeX, MapSizeZ); 36 | mapInstance.RoomSize.Min = MinRoomSize; 37 | mapInstance.RoomSize.Max = MaxRoomSize; 38 | TileSize = TileSizeFactor; 39 | 40 | StartCoroutine(mapInstance.Generate()); 41 | } 42 | 43 | private void RestartGame() 44 | { 45 | StopAllCoroutines(); 46 | Destroy(mapInstance.gameObject); 47 | BeginGame(); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/RoomMapManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d39c4929dea0a5c4f880af254d4baa2d 3 | timeCreated: 1467794422 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/RoomSetting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace ooparts.dungen 5 | { 6 | [Serializable] 7 | public class RoomSetting 8 | { 9 | public Material floor, wall; 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/RoomSetting.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2fbaf46d2c067d47883c4bc186ef323 3 | timeCreated: 1468445532 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Tile.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace ooparts.dungen 4 | { 5 | public class Tile : MonoBehaviour 6 | { 7 | public IntVector2 Coordinates; 8 | 9 | public void Start() 10 | { 11 | transform.localScale *= RoomMapManager.TileSize; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Tile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83a7976f33e9ead43a9f56560ac8668a 3 | timeCreated: 1467810268 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Triangle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace ooparts.dungen 6 | { 7 | public class Triangle 8 | { 9 | public List Rooms = new List(); 10 | public List Corridors = new List(); 11 | 12 | private Vector3 _circumcenter = Vector3.zero; 13 | private float _radius; 14 | 15 | public Triangle(Room r1, Room r2, Room r3) 16 | { 17 | Rooms.Add(r1); 18 | Rooms.Add(r2); 19 | Rooms.Add(r3); 20 | 21 | Corridors.Add(r1.CreateCorridor(r2)); 22 | Corridors[0].Triangles.Add(this); 23 | Corridors.Add(r2.CreateCorridor(r3)); 24 | Corridors[1].Triangles.Add(this); 25 | Corridors.Add(r3.CreateCorridor(r1)); 26 | Corridors[2].Triangles.Add(this); 27 | } 28 | 29 | /// 30 | /// Is in circumcircle 31 | /// 32 | /// The point that be checked 33 | /// True if the point is in this triangle's circumcircle 34 | public bool IsContaining(Room room) 35 | { 36 | // Save calculated circumcenter. 37 | if (_circumcenter == Vector3.zero) 38 | { 39 | var vertexs = new Vector3[3]; 40 | for (var index = 0; index < Rooms.Count; index++) vertexs[index] = Rooms[index].transform.localPosition; 41 | 42 | var a = vertexs[1].x - vertexs[0].x; 43 | var b = vertexs[1].z - vertexs[0].z; 44 | var c = vertexs[2].x - vertexs[0].x; 45 | var d = vertexs[2].z - vertexs[0].z; 46 | 47 | var aux1 = a * (vertexs[0].x + vertexs[1].x) + b * (vertexs[0].z + vertexs[1].z); 48 | var aux2 = c * (vertexs[0].x + vertexs[2].x) + d * (vertexs[0].z + vertexs[2].z); 49 | var div = 2.0f * (a * (vertexs[2].z - vertexs[1].z) - b * (vertexs[2].x - vertexs[1].x)); 50 | 51 | if (Math.Abs(div) < float.Epsilon) 52 | { 53 | Debug.LogError("Divided by Zero : " + div); 54 | return false; 55 | } 56 | 57 | _circumcenter = new Vector3((d * aux1 - b * aux2) / div, 0, (a * aux2 - c * aux1) / div); 58 | _radius = Mathf.Sqrt((_circumcenter.x - vertexs[0].x) * (_circumcenter.x - vertexs[0].x) + (_circumcenter.z - vertexs[0].z) * (_circumcenter.z - vertexs[0].z)); 59 | } 60 | 61 | if (Vector3.Distance(room.transform.localPosition, _circumcenter) > _radius) return false; 62 | 63 | return true; 64 | } 65 | 66 | public void Show() 67 | { 68 | foreach (var corridor in Corridors) corridor.Show(); 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/02.Scripts/Triangle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dffb292f7aede1e4cb60e20f98ed1522 3 | timeCreated: 1468152926 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d3dc48cd2ccdc84eb52a1f434949be3 3 | folderAsset: yes 4 | timeCreated: 1467618179 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/BSPCorridor.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1772547353020814} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1772547353020814 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4592849293885614} 22 | - component: {fileID: 114186877680560706} 23 | m_Layer: 0 24 | m_Name: GameObject 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4592849293885614 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_CorrespondingSourceObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1772547353020814} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114186877680560706 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1772547353020814} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: c3822a2e43f8bbd428746980c997f77f, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/BSPCorridor.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7dfbb801b21cb499ff06c51a555526 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/BSPDungeon.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1390785353450842} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1390785353450842 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4099934010412204} 22 | - component: {fileID: 114654860230801546} 23 | m_Layer: 0 24 | m_Name: BSPDungeon 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4099934010412204 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_CorrespondingSourceObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1390785353450842} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114654860230801546 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1390785353450842} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 41038910eab37d94eb0553c2f5e0e945, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | MapSize: 55 | x: 100 56 | z: 100 57 | MinRoomSize: 58 | x: 20 59 | z: 20 60 | RoomPrefab: {fileID: 114844831883460980, guid: 8c422834a1adf834180d83ade90e84a8, 61 | type: 2} 62 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/BSPDungeon.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43aab333a0ea298489524585cf125cbd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/BSPRoom.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1621533660980462} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1621533660980462 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4495399812936998} 22 | - component: {fileID: 114844831883460980} 23 | m_Layer: 0 24 | m_Name: BSPRoom 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4495399812936998 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_CorrespondingSourceObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1621533660980462} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114844831883460980 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1621533660980462} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 49d62c5223634e24ea6046954ab8b67c, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | TilePrefab: {fileID: 11474140, guid: 882a68cab87adc249928e3e67ee355ab, type: 2} 55 | Setting: 56 | floor: {fileID: 2100000, guid: 293177df221039d4f91f7b41b2bd2691, type: 2} 57 | wall: {fileID: 2100000, guid: 16e983eb6a0df1b44bd328d73d17b047, type: 2} 58 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/BSPRoom.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c422834a1adf834180d83ade90e84a8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Corridor.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &164034 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 441878} 11 | - 114: {fileID: 11402150} 12 | m_Layer: 0 13 | m_Name: Corridor 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &441878 20 | Transform: 21 | m_ObjectHideFlags: 1 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | m_GameObject: {fileID: 164034} 25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 26 | m_LocalPosition: {x: -1.0065001, y: -7.0014076, z: -27.390003} 27 | m_LocalScale: {x: 1, y: 1, z: 1} 28 | m_Children: [] 29 | m_Father: {fileID: 0} 30 | m_RootOrder: 0 31 | --- !u!114 &11402150 32 | MonoBehaviour: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 164034} 37 | m_Enabled: 1 38 | m_EditorHideFlags: 0 39 | m_Script: {fileID: 11500000, guid: e16e1daae906db843983f754a88fc715, type: 3} 40 | m_Name: 41 | m_EditorClassIdentifier: 42 | TilePrefab: {fileID: 11474140, guid: 882a68cab87adc249928e3e67ee355ab, type: 2} 43 | WallPrefab: {fileID: 123962, guid: dca2ec261cb2cf949be2ca0148a958b7, type: 2} 44 | Rooms: 45 | - {fileID: 0} 46 | - {fileID: 0} 47 | Length: 0 48 | Coordinates: 49 | x: 0 50 | z: 0 51 | --- !u!1001 &100100000 52 | Prefab: 53 | m_ObjectHideFlags: 1 54 | serializedVersion: 2 55 | m_Modification: 56 | m_TransformParent: {fileID: 0} 57 | m_Modifications: 58 | - target: {fileID: 0} 59 | propertyPath: TilePrefab 60 | value: 61 | objectReference: {fileID: 11474140, guid: 882a68cab87adc249928e3e67ee355ab, 62 | type: 2} 63 | - target: {fileID: 0} 64 | propertyPath: WallPrefab 65 | value: 66 | objectReference: {fileID: 123962, guid: dca2ec261cb2cf949be2ca0148a958b7, type: 2} 67 | m_RemovedComponents: [] 68 | m_ParentPrefab: {fileID: 0} 69 | m_RootGameObject: {fileID: 164034} 70 | m_IsPrefabParent: 1 71 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Corridor.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95db01f4cefe31642b5d1b8efb959a2d 3 | timeCreated: 1468093245 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Map.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &170384 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 443492} 11 | - 114: {fileID: 11452788} 12 | m_Layer: 0 13 | m_Name: Map 14 | m_TagString: Map 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &443492 20 | Transform: 21 | m_ObjectHideFlags: 1 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | m_GameObject: {fileID: 170384} 25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 26 | m_LocalPosition: {x: 0, y: 0, z: 0} 27 | m_LocalScale: {x: 1, y: 1, z: 1} 28 | m_Children: [] 29 | m_Father: {fileID: 0} 30 | m_RootOrder: 0 31 | --- !u!114 &11452788 32 | MonoBehaviour: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 170384} 37 | m_Enabled: 1 38 | m_EditorHideFlags: 0 39 | m_Script: {fileID: 11500000, guid: 298edf53b39bbe141b1de7b46c6e4ae8, type: 3} 40 | m_Name: 41 | m_EditorClassIdentifier: 42 | RoomPrefab: {fileID: 11430952, guid: b3b927ea3b312d04f8f06a707159fa41, type: 2} 43 | RoomCount: 15 44 | RoomSettings: 45 | - floor: {fileID: 2100000, guid: 293177df221039d4f91f7b41b2bd2691, type: 2} 46 | wall: {fileID: 2100000, guid: 16e983eb6a0df1b44bd328d73d17b047, type: 2} 47 | - floor: {fileID: 2100000, guid: 8ba58f6546738394f90ac8bbc13497d7, type: 2} 48 | wall: {fileID: 2100000, guid: 1fdfd93b9104acf439d358356d774319, type: 2} 49 | - floor: {fileID: 2100000, guid: d50d3f5fd611bd44bbf945eec6ab9cd3, type: 2} 50 | wall: {fileID: 2100000, guid: f9def51f619aa6e4bac5e36283d349af, type: 2} 51 | - floor: {fileID: 2100000, guid: 41f301a339d8a7445b7bf7252cd0d3db, type: 2} 52 | wall: {fileID: 2100000, guid: 27a72d111843d134091b31e1eb766267, type: 2} 53 | MapSize: 54 | x: 100 55 | z: 100 56 | RoomSize: 57 | Min: 9 58 | Max: 17 59 | GenerationStepDelay: 0 60 | --- !u!1001 &100100000 61 | Prefab: 62 | m_ObjectHideFlags: 1 63 | serializedVersion: 2 64 | m_Modification: 65 | m_TransformParent: {fileID: 0} 66 | m_Modifications: 67 | - target: {fileID: 0} 68 | propertyPath: RoomSettings.Array.size 69 | value: 4 70 | objectReference: {fileID: 0} 71 | - target: {fileID: 0} 72 | propertyPath: MapSize.Min 73 | value: 10 74 | objectReference: {fileID: 0} 75 | - target: {fileID: 0} 76 | propertyPath: MapSize.Max 77 | value: 10 78 | objectReference: {fileID: 0} 79 | - target: {fileID: 0} 80 | propertyPath: RoomSize.Min 81 | value: 9 82 | objectReference: {fileID: 0} 83 | - target: {fileID: 0} 84 | propertyPath: RoomSize.Max 85 | value: 17 86 | objectReference: {fileID: 0} 87 | - target: {fileID: 0} 88 | propertyPath: MapSize.x 89 | value: 100 90 | objectReference: {fileID: 0} 91 | - target: {fileID: 0} 92 | propertyPath: MapSize.z 93 | value: 100 94 | objectReference: {fileID: 0} 95 | - target: {fileID: 0} 96 | propertyPath: RoomCount 97 | value: 15 98 | objectReference: {fileID: 0} 99 | - target: {fileID: 0} 100 | propertyPath: RoomPrefab 101 | value: 102 | objectReference: {fileID: 11430952, guid: b3b927ea3b312d04f8f06a707159fa41, 103 | type: 2} 104 | - target: {fileID: 0} 105 | propertyPath: m_TagString 106 | value: Map 107 | objectReference: {fileID: 0} 108 | - target: {fileID: 0} 109 | propertyPath: RoomSettings.Array.data[0].floor 110 | value: 111 | objectReference: {fileID: 2100000, guid: 293177df221039d4f91f7b41b2bd2691, type: 2} 112 | - target: {fileID: 0} 113 | propertyPath: RoomSettings.Array.data[0].wall 114 | value: 115 | objectReference: {fileID: 2100000, guid: 16e983eb6a0df1b44bd328d73d17b047, type: 2} 116 | - target: {fileID: 0} 117 | propertyPath: RoomSettings.Array.data[1].floor 118 | value: 119 | objectReference: {fileID: 2100000, guid: 8ba58f6546738394f90ac8bbc13497d7, type: 2} 120 | - target: {fileID: 0} 121 | propertyPath: RoomSettings.Array.data[1].wall 122 | value: 123 | objectReference: {fileID: 2100000, guid: 1fdfd93b9104acf439d358356d774319, type: 2} 124 | - target: {fileID: 0} 125 | propertyPath: RoomSettings.Array.data[2].floor 126 | value: 127 | objectReference: {fileID: 2100000, guid: d50d3f5fd611bd44bbf945eec6ab9cd3, type: 2} 128 | - target: {fileID: 0} 129 | propertyPath: RoomSettings.Array.data[2].wall 130 | value: 131 | objectReference: {fileID: 2100000, guid: f9def51f619aa6e4bac5e36283d349af, type: 2} 132 | - target: {fileID: 0} 133 | propertyPath: RoomSettings.Array.data[3].floor 134 | value: 135 | objectReference: {fileID: 2100000, guid: 41f301a339d8a7445b7bf7252cd0d3db, type: 2} 136 | - target: {fileID: 0} 137 | propertyPath: RoomSettings.Array.data[3].wall 138 | value: 139 | objectReference: {fileID: 2100000, guid: 27a72d111843d134091b31e1eb766267, type: 2} 140 | m_RemovedComponents: [] 141 | m_ParentPrefab: {fileID: 0} 142 | m_RootGameObject: {fileID: 170384} 143 | m_IsPrefabParent: 1 144 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Map.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 957b75f046aa8664ea4831c0608b29dd 3 | timeCreated: 1467795759 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Monster.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &154156 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 488370} 11 | m_Layer: 0 12 | m_Name: Monster 13 | m_TagString: Untagged 14 | m_Icon: {fileID: 0} 15 | m_NavMeshLayer: 0 16 | m_StaticEditorFlags: 0 17 | m_IsActive: 1 18 | --- !u!1 &168732 19 | GameObject: 20 | m_ObjectHideFlags: 0 21 | m_PrefabParentObject: {fileID: 0} 22 | m_PrefabInternal: {fileID: 100100000} 23 | serializedVersion: 4 24 | m_Component: 25 | - 4: {fileID: 443570} 26 | - 33: {fileID: 3322282} 27 | - 136: {fileID: 13633920} 28 | - 23: {fileID: 2337410} 29 | m_Layer: 0 30 | m_Name: Capsule 31 | m_TagString: Untagged 32 | m_Icon: {fileID: 0} 33 | m_NavMeshLayer: 0 34 | m_StaticEditorFlags: 0 35 | m_IsActive: 1 36 | --- !u!4 &443570 37 | Transform: 38 | m_ObjectHideFlags: 1 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 100100000} 41 | m_GameObject: {fileID: 168732} 42 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 43 | m_LocalPosition: {x: 0, y: 1, z: 0} 44 | m_LocalScale: {x: 1, y: 1, z: 1} 45 | m_Children: [] 46 | m_Father: {fileID: 488370} 47 | m_RootOrder: 0 48 | --- !u!4 &488370 49 | Transform: 50 | m_ObjectHideFlags: 1 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | m_GameObject: {fileID: 154156} 54 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 55 | m_LocalPosition: {x: 0, y: 0, z: 0} 56 | m_LocalScale: {x: 1, y: 1, z: 1} 57 | m_Children: 58 | - {fileID: 443570} 59 | m_Father: {fileID: 0} 60 | m_RootOrder: 0 61 | --- !u!23 &2337410 62 | MeshRenderer: 63 | m_ObjectHideFlags: 1 64 | m_PrefabParentObject: {fileID: 0} 65 | m_PrefabInternal: {fileID: 100100000} 66 | m_GameObject: {fileID: 168732} 67 | m_Enabled: 1 68 | m_CastShadows: 1 69 | m_ReceiveShadows: 1 70 | m_Materials: 71 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 72 | m_SubsetIndices: 73 | m_StaticBatchRoot: {fileID: 0} 74 | m_UseLightProbes: 1 75 | m_ReflectionProbeUsage: 1 76 | m_ProbeAnchor: {fileID: 0} 77 | m_ScaleInLightmap: 1 78 | m_PreserveUVs: 1 79 | m_IgnoreNormalsForChartDetection: 0 80 | m_ImportantGI: 0 81 | m_MinimumChartSize: 4 82 | m_AutoUVMaxDistance: 0.5 83 | m_AutoUVMaxAngle: 89 84 | m_LightmapParameters: {fileID: 0} 85 | m_SortingLayerID: 0 86 | m_SortingOrder: 0 87 | --- !u!33 &3322282 88 | MeshFilter: 89 | m_ObjectHideFlags: 1 90 | m_PrefabParentObject: {fileID: 0} 91 | m_PrefabInternal: {fileID: 100100000} 92 | m_GameObject: {fileID: 168732} 93 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 94 | --- !u!136 &13633920 95 | CapsuleCollider: 96 | m_ObjectHideFlags: 1 97 | m_PrefabParentObject: {fileID: 0} 98 | m_PrefabInternal: {fileID: 100100000} 99 | m_GameObject: {fileID: 168732} 100 | m_Material: {fileID: 0} 101 | m_IsTrigger: 0 102 | m_Enabled: 1 103 | m_Radius: 0.5 104 | m_Height: 2 105 | m_Direction: 1 106 | m_Center: {x: 0, y: 0, z: 0} 107 | --- !u!1001 &100100000 108 | Prefab: 109 | m_ObjectHideFlags: 1 110 | serializedVersion: 2 111 | m_Modification: 112 | m_TransformParent: {fileID: 0} 113 | m_Modifications: [] 114 | m_RemovedComponents: [] 115 | m_ParentPrefab: {fileID: 0} 116 | m_RootGameObject: {fileID: 154156} 117 | m_IsPrefabParent: 1 118 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Monster.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acde751c4c58d3b499304eeb64a637c5 3 | timeCreated: 1469083707 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Player.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &107172 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 443086} 11 | m_Layer: 0 12 | m_Name: Player 13 | m_TagString: Untagged 14 | m_Icon: {fileID: 0} 15 | m_NavMeshLayer: 0 16 | m_StaticEditorFlags: 0 17 | m_IsActive: 1 18 | --- !u!1 &143310 19 | GameObject: 20 | m_ObjectHideFlags: 0 21 | m_PrefabParentObject: {fileID: 0} 22 | m_PrefabInternal: {fileID: 100100000} 23 | serializedVersion: 4 24 | m_Component: 25 | - 4: {fileID: 412560} 26 | - 33: {fileID: 3328822} 27 | - 136: {fileID: 13676436} 28 | - 23: {fileID: 2398110} 29 | m_Layer: 0 30 | m_Name: Capsule 31 | m_TagString: Untagged 32 | m_Icon: {fileID: 0} 33 | m_NavMeshLayer: 0 34 | m_StaticEditorFlags: 0 35 | m_IsActive: 1 36 | --- !u!4 &412560 37 | Transform: 38 | m_ObjectHideFlags: 1 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 100100000} 41 | m_GameObject: {fileID: 143310} 42 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 43 | m_LocalPosition: {x: 0, y: 1, z: 0} 44 | m_LocalScale: {x: 1, y: 1, z: 1} 45 | m_Children: [] 46 | m_Father: {fileID: 443086} 47 | m_RootOrder: 0 48 | --- !u!4 &443086 49 | Transform: 50 | m_ObjectHideFlags: 1 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | m_GameObject: {fileID: 107172} 54 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 55 | m_LocalPosition: {x: 0, y: 0, z: 0} 56 | m_LocalScale: {x: 1, y: 1, z: 1} 57 | m_Children: 58 | - {fileID: 412560} 59 | m_Father: {fileID: 0} 60 | m_RootOrder: 0 61 | --- !u!23 &2398110 62 | MeshRenderer: 63 | m_ObjectHideFlags: 1 64 | m_PrefabParentObject: {fileID: 0} 65 | m_PrefabInternal: {fileID: 100100000} 66 | m_GameObject: {fileID: 143310} 67 | m_Enabled: 1 68 | m_CastShadows: 1 69 | m_ReceiveShadows: 1 70 | m_Materials: 71 | - {fileID: 2100000, guid: 40deeb291758d2841bdc23df758888f8, type: 2} 72 | m_SubsetIndices: 73 | m_StaticBatchRoot: {fileID: 0} 74 | m_UseLightProbes: 1 75 | m_ReflectionProbeUsage: 1 76 | m_ProbeAnchor: {fileID: 0} 77 | m_ScaleInLightmap: 1 78 | m_PreserveUVs: 1 79 | m_IgnoreNormalsForChartDetection: 0 80 | m_ImportantGI: 0 81 | m_MinimumChartSize: 4 82 | m_AutoUVMaxDistance: 0.5 83 | m_AutoUVMaxAngle: 89 84 | m_LightmapParameters: {fileID: 0} 85 | m_SortingLayerID: 0 86 | m_SortingOrder: 0 87 | --- !u!33 &3328822 88 | MeshFilter: 89 | m_ObjectHideFlags: 1 90 | m_PrefabParentObject: {fileID: 0} 91 | m_PrefabInternal: {fileID: 100100000} 92 | m_GameObject: {fileID: 143310} 93 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 94 | --- !u!136 &13676436 95 | CapsuleCollider: 96 | m_ObjectHideFlags: 1 97 | m_PrefabParentObject: {fileID: 0} 98 | m_PrefabInternal: {fileID: 100100000} 99 | m_GameObject: {fileID: 143310} 100 | m_Material: {fileID: 0} 101 | m_IsTrigger: 0 102 | m_Enabled: 1 103 | m_Radius: 0.5 104 | m_Height: 2 105 | m_Direction: 1 106 | m_Center: {x: 0, y: 0, z: 0} 107 | --- !u!1001 &100100000 108 | Prefab: 109 | m_ObjectHideFlags: 1 110 | serializedVersion: 2 111 | m_Modification: 112 | m_TransformParent: {fileID: 0} 113 | m_Modifications: [] 114 | m_RemovedComponents: [] 115 | m_ParentPrefab: {fileID: 0} 116 | m_RootGameObject: {fileID: 107172} 117 | m_IsPrefabParent: 1 118 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10c14d2e748dab942a46f8401efd4ae1 3 | timeCreated: 1475294662 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Room.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &118404 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 456254} 11 | - 114: {fileID: 11430952} 12 | m_Layer: 0 13 | m_Name: Room 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &456254 20 | Transform: 21 | m_ObjectHideFlags: 1 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | m_GameObject: {fileID: 118404} 25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 26 | m_LocalPosition: {x: 0, y: 0, z: 0} 27 | m_LocalScale: {x: 1, y: 1, z: 1} 28 | m_Children: [] 29 | m_Father: {fileID: 0} 30 | m_RootOrder: 0 31 | --- !u!114 &11430952 32 | MonoBehaviour: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 118404} 37 | m_Enabled: 1 38 | m_EditorHideFlags: 0 39 | m_Script: {fileID: 11500000, guid: b01a893185df2e84c8110883393e1474, type: 3} 40 | m_Name: 41 | m_EditorClassIdentifier: 42 | CorridorPrefab: {fileID: 11402150, guid: 95db01f4cefe31642b5d1b8efb959a2d, type: 2} 43 | Size: 44 | x: 0 45 | z: 0 46 | Coordinates: 47 | x: 0 48 | z: 0 49 | Num: 0 50 | TilePrefab: {fileID: 11474140, guid: 882a68cab87adc249928e3e67ee355ab, type: 2} 51 | WallPrefab: {fileID: 123962, guid: dca2ec261cb2cf949be2ca0148a958b7, type: 2} 52 | Setting: 53 | floor: {fileID: 0} 54 | wall: {fileID: 0} 55 | PlayerPrefab: {fileID: 107172, guid: 10c14d2e748dab942a46f8401efd4ae1, type: 2} 56 | MonsterPrefab: {fileID: 154156, guid: acde751c4c58d3b499304eeb64a637c5, type: 2} 57 | MonsterCount: 5 58 | --- !u!1001 &100100000 59 | Prefab: 60 | m_ObjectHideFlags: 1 61 | serializedVersion: 2 62 | m_Modification: 63 | m_TransformParent: {fileID: 0} 64 | m_Modifications: 65 | - target: {fileID: 0} 66 | propertyPath: TilePrefab 67 | value: 68 | objectReference: {fileID: 11474140, guid: 882a68cab87adc249928e3e67ee355ab, 69 | type: 2} 70 | - target: {fileID: 0} 71 | propertyPath: MinLength 72 | value: 4 73 | objectReference: {fileID: 0} 74 | - target: {fileID: 0} 75 | propertyPath: CorridorPrefab 76 | value: 77 | objectReference: {fileID: 11402150, guid: 95db01f4cefe31642b5d1b8efb959a2d, 78 | type: 2} 79 | - target: {fileID: 0} 80 | propertyPath: WallPrefab 81 | value: 82 | objectReference: {fileID: 123962, guid: dca2ec261cb2cf949be2ca0148a958b7, type: 2} 83 | - target: {fileID: 0} 84 | propertyPath: MonsterPrefab 85 | value: 86 | objectReference: {fileID: 154156, guid: acde751c4c58d3b499304eeb64a637c5, type: 2} 87 | - target: {fileID: 0} 88 | propertyPath: MonsterCount 89 | value: 5 90 | objectReference: {fileID: 0} 91 | - target: {fileID: 0} 92 | propertyPath: PlayerPrefab 93 | value: 94 | objectReference: {fileID: 107172, guid: 10c14d2e748dab942a46f8401efd4ae1, type: 2} 95 | m_RemovedComponents: [] 96 | m_ParentPrefab: {fileID: 0} 97 | m_RootGameObject: {fileID: 118404} 98 | m_IsPrefabParent: 1 99 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Room.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3b927ea3b312d04f8f06a707159fa41 3 | timeCreated: 1467818223 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Tile.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &116234 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 435556} 11 | - 33: {fileID: 3331708} 12 | - 64: {fileID: 6438220} 13 | - 23: {fileID: 2317204} 14 | m_Layer: 0 15 | m_Name: Quad 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!1 &135020 22 | GameObject: 23 | m_ObjectHideFlags: 0 24 | m_PrefabParentObject: {fileID: 0} 25 | m_PrefabInternal: {fileID: 100100000} 26 | serializedVersion: 4 27 | m_Component: 28 | - 4: {fileID: 480634} 29 | - 114: {fileID: 11474140} 30 | m_Layer: 0 31 | m_Name: Tile 32 | m_TagString: Untagged 33 | m_Icon: {fileID: 0} 34 | m_NavMeshLayer: 0 35 | m_StaticEditorFlags: 0 36 | m_IsActive: 1 37 | --- !u!4 &435556 38 | Transform: 39 | m_ObjectHideFlags: 1 40 | m_PrefabParentObject: {fileID: 0} 41 | m_PrefabInternal: {fileID: 100100000} 42 | m_GameObject: {fileID: 116234} 43 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} 44 | m_LocalPosition: {x: 0, y: 0, z: 0} 45 | m_LocalScale: {x: 1, y: 1, z: 1} 46 | m_Children: [] 47 | m_Father: {fileID: 480634} 48 | m_RootOrder: 0 49 | --- !u!4 &480634 50 | Transform: 51 | m_ObjectHideFlags: 1 52 | m_PrefabParentObject: {fileID: 0} 53 | m_PrefabInternal: {fileID: 100100000} 54 | m_GameObject: {fileID: 135020} 55 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 56 | m_LocalPosition: {x: 0, y: 0, z: 0} 57 | m_LocalScale: {x: 1, y: 1, z: 1} 58 | m_Children: 59 | - {fileID: 435556} 60 | m_Father: {fileID: 0} 61 | m_RootOrder: 0 62 | --- !u!23 &2317204 63 | MeshRenderer: 64 | m_ObjectHideFlags: 1 65 | m_PrefabParentObject: {fileID: 0} 66 | m_PrefabInternal: {fileID: 100100000} 67 | m_GameObject: {fileID: 116234} 68 | m_Enabled: 1 69 | m_CastShadows: 1 70 | m_ReceiveShadows: 1 71 | m_Materials: 72 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 73 | m_SubsetIndices: 74 | m_StaticBatchRoot: {fileID: 0} 75 | m_UseLightProbes: 1 76 | m_ReflectionProbeUsage: 1 77 | m_ProbeAnchor: {fileID: 0} 78 | m_ScaleInLightmap: 1 79 | m_PreserveUVs: 1 80 | m_IgnoreNormalsForChartDetection: 0 81 | m_ImportantGI: 0 82 | m_MinimumChartSize: 4 83 | m_AutoUVMaxDistance: 0.5 84 | m_AutoUVMaxAngle: 89 85 | m_LightmapParameters: {fileID: 0} 86 | m_SortingLayerID: 0 87 | m_SortingOrder: 0 88 | --- !u!33 &3331708 89 | MeshFilter: 90 | m_ObjectHideFlags: 1 91 | m_PrefabParentObject: {fileID: 0} 92 | m_PrefabInternal: {fileID: 100100000} 93 | m_GameObject: {fileID: 116234} 94 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 95 | --- !u!64 &6438220 96 | MeshCollider: 97 | m_ObjectHideFlags: 1 98 | m_PrefabParentObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 100100000} 100 | m_GameObject: {fileID: 116234} 101 | m_Material: {fileID: 0} 102 | m_IsTrigger: 0 103 | m_Enabled: 1 104 | serializedVersion: 2 105 | m_Convex: 0 106 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 107 | --- !u!114 &11474140 108 | MonoBehaviour: 109 | m_ObjectHideFlags: 1 110 | m_PrefabParentObject: {fileID: 0} 111 | m_PrefabInternal: {fileID: 100100000} 112 | m_GameObject: {fileID: 135020} 113 | m_Enabled: 1 114 | m_EditorHideFlags: 0 115 | m_Script: {fileID: 11500000, guid: 83a7976f33e9ead43a9f56560ac8668a, type: 3} 116 | m_Name: 117 | m_EditorClassIdentifier: 118 | Coordinates: 119 | x: 0 120 | z: 0 121 | --- !u!1001 &100100000 122 | Prefab: 123 | m_ObjectHideFlags: 1 124 | serializedVersion: 2 125 | m_Modification: 126 | m_TransformParent: {fileID: 0} 127 | m_Modifications: [] 128 | m_RemovedComponents: [] 129 | m_ParentPrefab: {fileID: 0} 130 | m_RootGameObject: {fileID: 135020} 131 | m_IsPrefabParent: 1 132 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Tile.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 882a68cab87adc249928e3e67ee355ab 3 | timeCreated: 1467810251 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Wall.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &123962 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 417662} 11 | m_Layer: 0 12 | m_Name: Wall 13 | m_TagString: Untagged 14 | m_Icon: {fileID: 0} 15 | m_NavMeshLayer: 0 16 | m_StaticEditorFlags: 0 17 | m_IsActive: 1 18 | --- !u!1 &173642 19 | GameObject: 20 | m_ObjectHideFlags: 0 21 | m_PrefabParentObject: {fileID: 0} 22 | m_PrefabInternal: {fileID: 100100000} 23 | serializedVersion: 4 24 | m_Component: 25 | - 4: {fileID: 428518} 26 | - 33: {fileID: 3346166} 27 | - 65: {fileID: 6510672} 28 | - 23: {fileID: 2304238} 29 | m_Layer: 0 30 | m_Name: Cube 31 | m_TagString: Untagged 32 | m_Icon: {fileID: 0} 33 | m_NavMeshLayer: 0 34 | m_StaticEditorFlags: 0 35 | m_IsActive: 1 36 | --- !u!4 &417662 37 | Transform: 38 | m_ObjectHideFlags: 1 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 100100000} 41 | m_GameObject: {fileID: 123962} 42 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 43 | m_LocalPosition: {x: 0, y: 0, z: 0} 44 | m_LocalScale: {x: 1, y: 1, z: 1} 45 | m_Children: 46 | - {fileID: 428518} 47 | m_Father: {fileID: 0} 48 | m_RootOrder: 0 49 | --- !u!4 &428518 50 | Transform: 51 | m_ObjectHideFlags: 1 52 | m_PrefabParentObject: {fileID: 0} 53 | m_PrefabInternal: {fileID: 100100000} 54 | m_GameObject: {fileID: 173642} 55 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 56 | m_LocalPosition: {x: 0, y: 0.5, z: -0.45} 57 | m_LocalScale: {x: 1, y: 1, z: 0.1} 58 | m_Children: [] 59 | m_Father: {fileID: 417662} 60 | m_RootOrder: 0 61 | --- !u!23 &2304238 62 | MeshRenderer: 63 | m_ObjectHideFlags: 1 64 | m_PrefabParentObject: {fileID: 0} 65 | m_PrefabInternal: {fileID: 100100000} 66 | m_GameObject: {fileID: 173642} 67 | m_Enabled: 1 68 | m_CastShadows: 1 69 | m_ReceiveShadows: 1 70 | m_Materials: 71 | - {fileID: 2100000, guid: 27a72d111843d134091b31e1eb766267, type: 2} 72 | m_SubsetIndices: 73 | m_StaticBatchRoot: {fileID: 0} 74 | m_UseLightProbes: 1 75 | m_ReflectionProbeUsage: 1 76 | m_ProbeAnchor: {fileID: 0} 77 | m_ScaleInLightmap: 1 78 | m_PreserveUVs: 1 79 | m_IgnoreNormalsForChartDetection: 0 80 | m_ImportantGI: 0 81 | m_MinimumChartSize: 4 82 | m_AutoUVMaxDistance: 0.5 83 | m_AutoUVMaxAngle: 89 84 | m_LightmapParameters: {fileID: 0} 85 | m_SortingLayerID: 0 86 | m_SortingOrder: 0 87 | --- !u!33 &3346166 88 | MeshFilter: 89 | m_ObjectHideFlags: 1 90 | m_PrefabParentObject: {fileID: 0} 91 | m_PrefabInternal: {fileID: 100100000} 92 | m_GameObject: {fileID: 173642} 93 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 94 | --- !u!65 &6510672 95 | BoxCollider: 96 | m_ObjectHideFlags: 1 97 | m_PrefabParentObject: {fileID: 0} 98 | m_PrefabInternal: {fileID: 100100000} 99 | m_GameObject: {fileID: 173642} 100 | m_Material: {fileID: 0} 101 | m_IsTrigger: 0 102 | m_Enabled: 1 103 | serializedVersion: 2 104 | m_Size: {x: 1, y: 1, z: 1} 105 | m_Center: {x: 0, y: 0, z: 0} 106 | --- !u!1001 &100100000 107 | Prefab: 108 | m_ObjectHideFlags: 1 109 | serializedVersion: 2 110 | m_Modification: 111 | m_TransformParent: {fileID: 0} 112 | m_Modifications: 113 | - target: {fileID: 0} 114 | propertyPath: m_LocalPosition.x 115 | value: 0 116 | objectReference: {fileID: 0} 117 | - target: {fileID: 0} 118 | propertyPath: m_LocalPosition.z 119 | value: 0 120 | objectReference: {fileID: 0} 121 | m_RemovedComponents: [] 122 | m_ParentPrefab: {fileID: 0} 123 | m_RootGameObject: {fileID: 123962} 124 | m_IsPrefabParent: 1 125 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/03.Prefabs/Wall.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dca2ec261cb2cf949be2ca0148a958b7 3 | timeCreated: 1468382406 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 483b590a4c316864ea6ec68fa10e09d7 3 | folderAsset: yes 4 | timeCreated: 1467780173 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Blue 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0, g: 0, b: 1, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd005e128814d8e4192554161dd8e266 3 | timeCreated: 1467780180 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Brown.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Brown 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0.6838235, g: 0.38199794, b: 0, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Brown.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bddce67126de67643a251bae514f0970 3 | timeCreated: 1467781050 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Green.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Green 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0, g: 1, b: 0, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60f379a56af9f5b4888baed1c2b357f0 3 | timeCreated: 1467780215 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Red.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Red 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 0, b: 0, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40deeb291758d2841bdc23df758888f8 3 | timeCreated: 1475294638 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b26abfb6b6fa1d49886efb788afadb4 3 | folderAsset: yes 4 | timeCreated: 1467783625 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Floor1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0.28676468, g: 0.73438144, b: 1, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 293177df221039d4f91f7b41b2bd2691 3 | timeCreated: 1467783630 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor2.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Floor2 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0.44117647, g: 1, b: 0.56064904, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ba58f6546738394f90ac8bbc13497d7 3 | timeCreated: 1467783642 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor3.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Floor3 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 0.8040568, b: 0.38235295, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor3.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d50d3f5fd611bd44bbf945eec6ab9cd3 3 | timeCreated: 1467783644 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor4.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Floor4 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 0.31617647, b: 0.6132859, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Floor4.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41f301a339d8a7445b7bf7252cd0d3db 3 | timeCreated: 1467783645 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Wall1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0.6764706, g: 0.8795132, b: 1, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16e983eb6a0df1b44bd328d73d17b047 3 | timeCreated: 1467783646 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall2.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Wall2 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0.7647059, g: 1, b: 0.81501013, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fdfd93b9104acf439d358356d774319 3 | timeCreated: 1467783647 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall3.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Wall3 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 0.9113591, b: 0.7205882, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall3.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9def51f619aa6e4bac5e36283d349af 3 | timeCreated: 1467783651 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall4.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Wall4 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 0.6838235, b: 0.8211967, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/04.Images/Rooms/Wall4.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27a72d111843d134091b31e1eb766267 3 | timeCreated: 1467783648 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/ReadMe.txt: -------------------------------------------------------------------------------- 1 | OOPArts.Mid - Procedural Room Dungeon Generator 2 | Thank you for downloading! 3 | 4 | Send questions, comments, and thanks to: 5 | jiny199109@gmail.com 6 | 7 | - Version 1.2 8 | Now I use my namespace. 9 | You can change tile size. 10 | 11 | - Version 1.1 12 | You set the values like MapSize, Max Rooms, and RoomSize in the Room Map Manager component from now. 13 | Special Thanks to DC Volo. 14 | 15 | - Version 1.0 16 | First release. 17 | 18 | 19 | Instructions 20 | ------------ 21 | It procedurally generates room dungeons. 22 | You can use this by simply adding an empty game object and add "RoomMapManager" component and put Map Prefab on that component. 23 | Add values like MapSize, Max Rooms, RoomSize, and TileSize. 24 | It generates one when you play, and regenerate one when you press space. 25 | 26 | I'm going to keep upgrade this asset, so any kinds of contribution will always be welcomed. : https://github.com/Mids/Procedural-Room-Dungeon-Generator 27 | 28 | 29 | The asset is available at: 30 | https://www.assetstore.unity3d.com/#!/content/67195 31 | 32 | 33 | -------------------------------------------------------------------------------- /Assets/Room Dungeon Generator/ReadMe.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d745cb6b1a2fe245bfb861b33e8a1de 3 | timeCreated: 1470759411 4 | licenseType: Free 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 JinPark 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "2.0.16", 5 | "com.unity.package-manager-ui": "1.9.11", 6 | "com.unity.purchasing": "2.0.3", 7 | "com.unity.textmeshpro": "1.2.4", 8 | "com.unity.modules.ai": "1.0.0", 9 | "com.unity.modules.animation": "1.0.0", 10 | "com.unity.modules.assetbundle": "1.0.0", 11 | "com.unity.modules.audio": "1.0.0", 12 | "com.unity.modules.cloth": "1.0.0", 13 | "com.unity.modules.director": "1.0.0", 14 | "com.unity.modules.imageconversion": "1.0.0", 15 | "com.unity.modules.imgui": "1.0.0", 16 | "com.unity.modules.jsonserialize": "1.0.0", 17 | "com.unity.modules.particlesystem": "1.0.0", 18 | "com.unity.modules.physics": "1.0.0", 19 | "com.unity.modules.physics2d": "1.0.0", 20 | "com.unity.modules.screencapture": "1.0.0", 21 | "com.unity.modules.terrain": "1.0.0", 22 | "com.unity.modules.terrainphysics": "1.0.0", 23 | "com.unity.modules.tilemap": "1.0.0", 24 | "com.unity.modules.ui": "1.0.0", 25 | "com.unity.modules.uielements": "1.0.0", 26 | "com.unity.modules.umbra": "1.0.0", 27 | "com.unity.modules.unityanalytics": "1.0.0", 28 | "com.unity.modules.unitywebrequest": "1.0.0", 29 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 30 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 31 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 32 | "com.unity.modules.unitywebrequestwww": "1.0.0", 33 | "com.unity.modules.vehicles": "1.0.0", 34 | "com.unity.modules.video": "1.0.0", 35 | "com.unity.modules.vr": "1.0.0", 36 | "com.unity.modules.wind": "1.0.0", 37 | "com.unity.modules.xr": "1.0.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_SolverIterationCount: 6 13 | m_QueriesHitTriggers: 1 14 | m_EnableAdaptiveForce: 0 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 15 | m_ProjectGenerationRootNamespace: 16 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_ShaderSettings_Tier1: 42 | useCascadedShadowMaps: 1 43 | standardShaderQuality: 2 44 | useReflectionProbeBoxProjection: 1 45 | useReflectionProbeBlending: 1 46 | m_ShaderSettings_Tier2: 47 | useCascadedShadowMaps: 1 48 | standardShaderQuality: 2 49 | useReflectionProbeBoxProjection: 1 50 | useReflectionProbeBlending: 1 51 | m_ShaderSettings_Tier3: 52 | useCascadedShadowMaps: 1 53 | standardShaderQuality: 2 54 | useReflectionProbeBoxProjection: 1 55 | useReflectionProbeBlending: 1 56 | m_BuildTargetShaderSettings: [] 57 | m_LightmapStripping: 0 58 | m_FogStripping: 0 59 | m_LightmapKeepPlain: 1 60 | m_LightmapKeepDirCombined: 1 61 | m_LightmapKeepDirSeparate: 1 62 | m_LightmapKeepDynamicPlain: 1 63 | m_LightmapKeepDynamicDirCombined: 1 64 | m_LightmapKeepDynamicDirSeparate: 1 65 | m_FogKeepLinear: 1 66 | m_FogKeepExp: 1 67 | m_FogKeepExp2: 1 68 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshAreas: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_MinPenetrationForPenalty: 0.01 17 | m_BaumgarteScale: 0.2 18 | m_BaumgarteTimeOfImpactScale: 0.75 19 | m_TimeToSleep: 0.5 20 | m_LinearSleepTolerance: 0.01 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 26 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mids/Procedural-Room-Dungeon-Generator/44eb32a03d3075038582e6b5539101a1ab41585f/ProjectSettings/PresetManager.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | blendWeights: 1 21 | textureQuality: 1 22 | anisotropicTextures: 0 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 0 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 0.3 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | - serializedVersion: 2 36 | name: Fast 37 | pixelLightCount: 0 38 | shadows: 0 39 | shadowResolution: 0 40 | shadowProjection: 1 41 | shadowCascades: 1 42 | shadowDistance: 20 43 | shadowNearPlaneOffset: 2 44 | shadowCascade2Split: 0.33333334 45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 46 | blendWeights: 2 47 | textureQuality: 0 48 | anisotropicTextures: 0 49 | antiAliasing: 0 50 | softParticles: 0 51 | softVegetation: 0 52 | realtimeReflectionProbes: 0 53 | billboardsFaceCameraPosition: 0 54 | vSyncCount: 0 55 | lodBias: 0.4 56 | maximumLODLevel: 0 57 | particleRaycastBudget: 16 58 | asyncUploadTimeSlice: 2 59 | asyncUploadBufferSize: 4 60 | excludedTargetPlatforms: [] 61 | - serializedVersion: 2 62 | name: Simple 63 | pixelLightCount: 1 64 | shadows: 1 65 | shadowResolution: 0 66 | shadowProjection: 1 67 | shadowCascades: 1 68 | shadowDistance: 20 69 | shadowNearPlaneOffset: 2 70 | shadowCascade2Split: 0.33333334 71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 72 | blendWeights: 2 73 | textureQuality: 0 74 | anisotropicTextures: 1 75 | antiAliasing: 0 76 | softParticles: 0 77 | softVegetation: 0 78 | realtimeReflectionProbes: 0 79 | billboardsFaceCameraPosition: 0 80 | vSyncCount: 0 81 | lodBias: 0.7 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 64 84 | asyncUploadTimeSlice: 2 85 | asyncUploadBufferSize: 4 86 | excludedTargetPlatforms: [] 87 | - serializedVersion: 2 88 | name: Good 89 | pixelLightCount: 2 90 | shadows: 2 91 | shadowResolution: 1 92 | shadowProjection: 1 93 | shadowCascades: 2 94 | shadowDistance: 40 95 | shadowNearPlaneOffset: 2 96 | shadowCascade2Split: 0.33333334 97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 98 | blendWeights: 2 99 | textureQuality: 0 100 | anisotropicTextures: 1 101 | antiAliasing: 0 102 | softParticles: 0 103 | softVegetation: 1 104 | realtimeReflectionProbes: 1 105 | billboardsFaceCameraPosition: 1 106 | vSyncCount: 1 107 | lodBias: 1 108 | maximumLODLevel: 0 109 | particleRaycastBudget: 256 110 | asyncUploadTimeSlice: 2 111 | asyncUploadBufferSize: 4 112 | excludedTargetPlatforms: [] 113 | - serializedVersion: 2 114 | name: Beautiful 115 | pixelLightCount: 3 116 | shadows: 2 117 | shadowResolution: 2 118 | shadowProjection: 1 119 | shadowCascades: 2 120 | shadowDistance: 70 121 | shadowNearPlaneOffset: 2 122 | shadowCascade2Split: 0.33333334 123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 124 | blendWeights: 4 125 | textureQuality: 0 126 | anisotropicTextures: 2 127 | antiAliasing: 2 128 | softParticles: 1 129 | softVegetation: 1 130 | realtimeReflectionProbes: 1 131 | billboardsFaceCameraPosition: 1 132 | vSyncCount: 1 133 | lodBias: 1.5 134 | maximumLODLevel: 0 135 | particleRaycastBudget: 1024 136 | asyncUploadTimeSlice: 2 137 | asyncUploadBufferSize: 4 138 | excludedTargetPlatforms: [] 139 | - serializedVersion: 2 140 | name: Fantastic 141 | pixelLightCount: 4 142 | shadows: 2 143 | shadowResolution: 2 144 | shadowProjection: 1 145 | shadowCascades: 4 146 | shadowDistance: 150 147 | shadowNearPlaneOffset: 2 148 | shadowCascade2Split: 0.33333334 149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 150 | blendWeights: 4 151 | textureQuality: 0 152 | anisotropicTextures: 2 153 | antiAliasing: 2 154 | softParticles: 1 155 | softVegetation: 1 156 | realtimeReflectionProbes: 1 157 | billboardsFaceCameraPosition: 1 158 | vSyncCount: 1 159 | lodBias: 2 160 | maximumLODLevel: 0 161 | particleRaycastBudget: 4096 162 | asyncUploadTimeSlice: 2 163 | asyncUploadBufferSize: 4 164 | excludedTargetPlatforms: [] 165 | m_PerPlatformDefaultQuality: 166 | Android: 2 167 | BlackBerry: 2 168 | GLES Emulation: 5 169 | Nintendo 3DS: 5 170 | PS3: 5 171 | PS4: 5 172 | PSM: 5 173 | PSP2: 2 174 | Samsung TV: 2 175 | Standalone: 5 176 | Tizen: 2 177 | WP8: 5 178 | Web: 5 179 | WebGL: 3 180 | WiiU: 5 181 | Windows Store Apps: 5 182 | XBOX360: 5 183 | XboxOne: 5 184 | iPhone: 2 185 | tvOS: 5 186 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: 7 | - Map 8 | layers: 9 | - Default 10 | - TransparentFX 11 | - Ignore Raycast 12 | - 13 | - Water 14 | - UI 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | m_SortingLayers: 42 | - name: Default 43 | uniqueID: 0 44 | locked: 0 45 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mids/Procedural-Room-Dungeon-Generator/44eb32a03d3075038582e6b5539101a1ab41585f/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Procedural Room Dungeon Generator 2 | It procedurally generates room dungeons. You can use this by simply adding an empty game object and add "RoomMapManager" component and put Map Prefab on that component. And add values like MapSize, Max Rooms, RoomSize, and TileSize. It generates when you play, and regenerate when you press space. 3 | 4 | Any kinds of contributing will always be welcomed 5 | 6 | It's available at : https://assetstore.unity.com/packages/tools/procedural-room-dungeon-generator-67195 7 | 8 | --- 9 | #### TO-DO List 10 | 1. Binary Space Partitioning 11 | 2. Cellular Automaton 12 | 3. Herringbone Wang Tiles 13 | --------------------------------------------------------------------------------