From 578d3890d919ba81bbcafe4b82d9b217f85053b9 Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Wed, 02 Apr 2025 17:52:13 +0000
Subject: [PATCH] clear ruleTile siblings before filling them
---
Assets/TileSets/Palettes/ForestRuleTileCustom.asset | 17 ++++++++++++++++-
Assets/Scripts/GenerateTileMap.cs | 3 +++
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/Assets/Scripts/GenerateTileMap.cs b/Assets/Scripts/GenerateTileMap.cs
index 3ad8390..e704d1a 100644
--- a/Assets/Scripts/GenerateTileMap.cs
+++ b/Assets/Scripts/GenerateTileMap.cs
@@ -65,6 +65,9 @@
}
private void LoadGenerateablesFromResources()
{
+ // Clear existing siblings
+ forestRuleTile.siblings.Clear();
+
// Load all Item prefabs from the "Resources/Items" folder
GameObject[] generateablePrefabs = Resources.LoadAll<GameObject>("Generateable");
generateables = new List<Generateable>();
diff --git a/Assets/TileSets/Palettes/ForestRuleTileCustom.asset b/Assets/TileSets/Palettes/ForestRuleTileCustom.asset
index b336577..f86ce0e 100644
--- a/Assets/TileSets/Palettes/ForestRuleTileCustom.asset
+++ b/Assets/TileSets/Palettes/ForestRuleTileCustom.asset
@@ -332,5 +332,20 @@
- {x: 0, y: -1, z: 0}
- {x: 1, y: -1, z: 0}
m_RuleTransform: 0
+ - m_Id: 18
+ m_Sprites:
+ - {fileID: 1943074245, guid: 42962cf14c23fee4baaaea0cd52d52e0, type: 3}
+ m_GameObject: {fileID: 3549545049718014148, guid: c82bc431abdeded4ab41cfdd19459501, type: 3}
+ m_MinAnimationSpeed: 1
+ m_MaxAnimationSpeed: 1
+ m_PerlinScale: 0.5
+ m_Output: 0
+ m_ColliderType: 1
+ m_RandomTransform: 0
+ m_Neighbors: 01000000
+ m_NeighborPositions:
+ - {x: 0, y: -1, z: 0}
+ m_RuleTransform: 0
siblings:
- - {fileID: 11400000, guid: bbc5a3964d8331546a4dbc880f8ae9fc, type: 2}
+ - {fileID: 0}
+ - {fileID: 0}
--
Gitblit v1.10.0