Tower Data의 size 규칙 변경 및 현재 사용 중인 Tower들의 크기 조정

size x,y,z는 외형의 크기를 조정하지 않는다
외형의 크기는 모델에서 직접 조정한다
This commit is contained in:
2026-02-01 16:33:43 +09:00
parent 4200288fae
commit 4253271d84
10 changed files with 30 additions and 34 deletions

View File

@@ -18,9 +18,9 @@ MonoBehaviour:
id: 1 id: 1
memo: "\uD0C0\uC6CC" memo: "\uD0C0\uC6CC"
mana: 25 mana: 25
sizeX: 3 sizeX: 4
sizeY: 3 sizeY: 10
sizeZ: 3 sizeZ: 4
placementOffset: {x: 0, y: 0, z: 0} placementOffset: {x: 0, y: 0, z: 0}
allowRotation: 1 allowRotation: 1
manpower: 10 manpower: 10

View File

@@ -18,9 +18,9 @@ MonoBehaviour:
id: 2 id: 2
memo: "\uBCBD" memo: "\uBCBD"
mana: 5 mana: 5
sizeX: 4 sizeX: 8
sizeY: 3 sizeY: 4
sizeZ: 2 sizeZ: 3
placementOffset: {x: 0, y: 0, z: 0} placementOffset: {x: 0, y: 0, z: 0}
allowRotation: 1 allowRotation: 1
manpower: 5 manpower: 5

View File

@@ -66,7 +66,7 @@ namespace Northbound.Data
[Header("Properties for convenience")] [Header("Properties for convenience")]
public int width => sizeX; public int width => sizeX;
public int length => sizeY; public int length => sizeY;
public float height => sizeZ; public float height => sizeY;
public int maxHealth => maxHp; public int maxHealth => maxHp;
public float visionRange => atkRange; public float visionRange => atkRange;
public float requiredWorkAmount => manpower; public float requiredWorkAmount => manpower;
@@ -77,7 +77,7 @@ namespace Northbound.Data
bool isRotated = (rotation == 1 || rotation == 3); bool isRotated = (rotation == 1 || rotation == 3);
float w = isRotated ? length : width; float w = isRotated ? length : width;
float l = isRotated ? width : length; float l = isRotated ? width : length;
return new Vector3(w, height, l); return new Vector3(w, sizeY, l);
} }
} }
} }

View File

@@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 4
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@@ -91,7 +91,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 4
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 4
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@@ -91,7 +91,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 4
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@@ -118,7 +118,7 @@ Transform:
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3, y: 3, z: 3} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 6062607789191353382} - {fileID: 6062607789191353382}
@@ -262,8 +262,8 @@ BoxCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 3
m_Size: {x: 3, y: 3, z: 3} m_Size: {x: 4, y: 10, z: 4}
m_Center: {x: 0, y: 1.5, z: 0} m_Center: {x: 0, y: 5, z: 0}
--- !u!208 &100877884298911200 --- !u!208 &100877884298911200
NavMeshObstacle: NavMeshObstacle:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -274,11 +274,11 @@ NavMeshObstacle:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 3
m_Shape: 1 m_Shape: 1
m_Extents: {x: 1.5, y: 1.5, z: 1.5} m_Extents: {x: 2, y: 5, z: 2}
m_MoveThreshold: 0.1 m_MoveThreshold: 0.1
m_Carve: 0 m_Carve: 0
m_CarveOnlyStationary: 1 m_CarveOnlyStationary: 1
m_Center: {x: 0, y: 1.5, z: 0} m_Center: {x: 0, y: 5, z: 0}
m_TimeToStationary: 0.5 m_TimeToStationary: 0.5
--- !u!114 &8485093670801034058 --- !u!114 &8485093670801034058
MonoBehaviour: MonoBehaviour:

View File

@@ -81,8 +81,8 @@ BoxCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 3
m_Size: {x: 4, y: 2, z: 3} m_Size: {x: 8, y: 4, z: 3}
m_Center: {x: 0, y: 1, z: 0} m_Center: {x: 0, y: 2, z: 0}
--- !u!208 &2615519446934682856 --- !u!208 &2615519446934682856
NavMeshObstacle: NavMeshObstacle:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -93,11 +93,11 @@ NavMeshObstacle:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 3
m_Shape: 1 m_Shape: 1
m_Extents: {x: 2, y: 1, z: 1.5} m_Extents: {x: 4, y: 2, z: 1.5}
m_MoveThreshold: 0.1 m_MoveThreshold: 0.1
m_Carve: 0 m_Carve: 0
m_CarveOnlyStationary: 1 m_CarveOnlyStationary: 1
m_Center: {x: 0, y: 1, z: 0} m_Center: {x: 0, y: 2, z: 0}
m_TimeToStationary: 0.5 m_TimeToStationary: 0.5
--- !u!114 &3203720634638459019 --- !u!114 &3203720634638459019
MonoBehaviour: MonoBehaviour:
@@ -173,7 +173,7 @@ Transform:
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4, y: 2, z: 3} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1657799771882240} m_Father: {fileID: 1657799771882240}

View File

@@ -1907,7 +1907,7 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::Northbound.GlobalTimer m_EditorClassIdentifier: Assembly-CSharp::Northbound.GlobalTimer
ShowTopMostFoldoutHeaderGroup: 1 ShowTopMostFoldoutHeaderGroup: 1
cycleLength: 5 cycleLength: 5
autoStart: 1 autoStart: 0
pauseOnZero: 0 pauseOnZero: 0
exceptionalFirstCycleLength: 1 exceptionalFirstCycleLength: 1
showDebugLogs: 1 showDebugLogs: 1

View File

@@ -40,9 +40,6 @@ namespace Northbound.Editor
fbxInstance.transform.localPosition = Vector3.zero; fbxInstance.transform.localPosition = Vector3.zero;
fbxInstance.transform.localRotation = Quaternion.identity; fbxInstance.transform.localRotation = Quaternion.identity;
// Set model scale based on sizeX/sizeY/sizeZ
fbxInstance.transform.localScale = new Vector3(towerData.sizeX, towerData.sizeZ, towerData.sizeY);
modelTransform = fbxInstance.transform; modelTransform = fbxInstance.transform;
Debug.Log($"[TowerPrefabSetup] Applied FBX model: {towerData.modelPath} with scale {towerData.sizeX}x{towerData.sizeZ}x{towerData.sizeY}"); Debug.Log($"[TowerPrefabSetup] Applied FBX model: {towerData.modelPath} with scale {towerData.sizeX}x{towerData.sizeZ}x{towerData.sizeY}");
@@ -72,9 +69,8 @@ namespace Northbound.Editor
meshFilter.sharedMesh = mesh; meshFilter.sharedMesh = mesh;
modelTransform = renderer.transform; modelTransform = renderer.transform;
modelTransform.localScale = new Vector3(towerData.sizeX, towerData.sizeZ, towerData.sizeY);
Debug.Log($"[TowerPrefabSetup] Applied mesh: {towerData.modelPath} with scale {towerData.sizeX}x{towerData.sizeZ}x{towerData.sizeY}"); Debug.Log($"[TowerPrefabSetup] Applied mesh: {towerData.modelPath}");
} }
else else
{ {
@@ -88,8 +84,8 @@ namespace Northbound.Editor
{ {
collider = prefab.AddComponent<BoxCollider>(); collider = prefab.AddComponent<BoxCollider>();
} }
collider.size = new Vector3(towerData.sizeX, towerData.sizeZ, towerData.sizeY); collider.size = new Vector3(towerData.sizeX, towerData.sizeY, towerData.sizeZ);
collider.center = new Vector3(0f, towerData.sizeZ / 2f, 0f); collider.center = new Vector3(0f, towerData.sizeY / 2f, 0f);
var navObstacle = prefab.GetComponent<NavMeshObstacle>(); var navObstacle = prefab.GetComponent<NavMeshObstacle>();
if (navObstacle == null) if (navObstacle == null)
@@ -97,8 +93,8 @@ namespace Northbound.Editor
navObstacle = prefab.AddComponent<NavMeshObstacle>(); navObstacle = prefab.AddComponent<NavMeshObstacle>();
navObstacle.shape = NavMeshObstacleShape.Box; navObstacle.shape = NavMeshObstacleShape.Box;
} }
navObstacle.size = new Vector3(towerData.sizeX, towerData.sizeZ, towerData.sizeY); navObstacle.size = new Vector3(towerData.sizeX, towerData.sizeY, towerData.sizeZ);
navObstacle.center = new Vector3(0f, towerData.sizeZ / 2f, 0f); navObstacle.center = new Vector3(0f, towerData.sizeY / 2f, 0f);
} }
private void RemoveOldModel(GameObject prefab) private void RemoveOldModel(GameObject prefab)

View File

@@ -1,3 +1,3 @@
id,memo,mana,manpower,size_x,size_y,size_z,max_hp,atk_range,atk_damage,atk_interval_sec,model_path id,memo,mana,manpower,size_x,size_y,size_z,max_hp,atk_range,atk_damage,atk_interval_sec,model_path
1,타워,25,10,3,3,3,50,10,5,2,Assets/Models/building_tower_B_blue.fbx 1,타워,25,10,4,10,4,50,10,5,2,Assets/Models/building_tower_B_blue.fbx
2,,5,5,4,3,2,30,0,0,0,Assets/Models/wall_straight.fbx 2,,5,5,8,4,3,30,0,0,0,Assets/Models/wall_straight.fbx
1 id memo mana manpower size_x size_y size_z max_hp atk_range atk_damage atk_interval_sec model_path
2 1 타워 25 10 3 4 3 10 3 4 50 10 5 2 Assets/Models/building_tower_B_blue.fbx
3 2 5 5 4 8 3 4 2 3 30 0 0 0 Assets/Models/wall_straight.fbx