Skip to main content
added 180 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or directly by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or directly by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or directly by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.

added 9 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or directly by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or directly by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.

Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

You can design each event room on a separate tilemap and then save that tilemap as a prefab. Those prefabs can then be referenced by ScriptableObject's or by the script which does your dungeon generation.

If your architecture allows for more than one tilemap, then you could simply instantiate the event rooms. This would have the advantage that the room prefab can actually contain more than just a tilemap. You can put literally anything you want in there.

But if your architecture assumes that there will only ever be one tilemap in the scene, then you need to copy the tiles from the prefab into the actual game tilemap. You should be able to do that with prefabTilemap.GetTilesBlock and mainTilemap.SetTilesBlock.