Ship render: the hull collider carries the invisible material, so clones draw nothing
forceRenderingOff is not serialized, so Instantiate and SaveAsPrefabAsset dropped it and every cloned mod ship (and every FBX-built prefab) drew its collision hull. The collider renderer now takes the template's invisible material, as the thruster emitter does. The preview smoke checks the collider on the clone and the prefab smoke checks it on the configured prefab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
80de88f267
commit
fc73d7abcd
4 changed files with 15 additions and 3 deletions
|
|
@ -63,6 +63,9 @@ public static class ShipModPreview
|
|||
bool Inside(Component part) => part != null && part.transform.IsChildOf(ship.transform);
|
||||
Require(ship.HullColliders.Length == 1 && Inside(ship.HullColliders[0]) &&
|
||||
ship.HullColliders[0].GetComponent<MeshCollider>() != null, "one hull collider with a MeshCollider");
|
||||
Require(ship.HullColliders[0].GetComponentsInChildren<Renderer>(true).All(renderer =>
|
||||
renderer.sharedMaterials.All(material => material == ship.InvisibleMaterial)),
|
||||
"a hull collider that draws nothing");
|
||||
Require(Inside(ship.MapIcon) && Inside(ship.Shield) && Inside(ship.TractorBeam), "map icon, shield and tractor inside the ship");
|
||||
Require(ship.ThrusterHardpoints.Select(node => node.name).SequenceEqual(plan.Thrusters) &&
|
||||
ship.ThrusterHardpoints.All(node => Inside(node) && Inside(node.Emitter) &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue