Art: EmissiveGloam DOTS instancing + revive EnemyRigTools + drop dead materials (audit M7/M8)
M8 — ProjectM/EmissiveGloam had no DOTS instancing but is bound to M_Drowner_EyeGlow on EnemyDrowner.prefab, a baked GHOST prefab that Entities Graphics renders through BatchRendererGroup. Its skinned sibling has carried the pragmas since 07-16; this one was simply missed, and murk hides the symptom (CLAUDE.md: "a dark-lit screenshot MASKS material bugs"). Added #pragma target 4.5 + multi_compile DOTS_INSTANCING_ON + UNITY_SETUP_INSTANCE_ID, and a DepthOnly pass so the glows stop being absent from the URP depth texture (soft particles / SSAO / DoF punch straight through them otherwise). Verified: shader compiles, isSupported, 2 passes, 0 messages. M7 — EnemyRigTools was dead at EVERY entry point. All eight hard-coded prefab paths were deleted by DR-051, and the template check ran BEFORE the idempotent in-place branch, so even re-running a builder on an existing prefab failed. The three shipping skinned creatures were unreproducible. Now the template only matters when there is no output to edit in place, and a new creature templates off the shipping EnemyDrowner ghost (GhostTemplate) instead of the deleted Enemy.prefab. Retired the four menu items that drove the deleted Werewolf/Kaiju/Charger bestiary rather than leave them advertising entry points that cannot work. Deleted 19 materials with zero references from any scene, prefab, ScriptableObject, script or settings asset — verified three ways, not from the audit's list. Kept everything with a live reference, including several the audit's asset-only scan called dead but which code loads by path (M_Skinned_Palette, PixelOutline, M_Env_Fallback). NOT fixed here, deliberately: MakeMat still points each creature at a per-PACK Synty atlas rather than the shared palette. That is a visual decision about the shipping Drowner/Grindylow, not a mechanical fix — the doc-vs-reality gap gets reconciled in Art_Direction_Lantern instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,12 @@ namespace ProjectM.EditorTools
|
||||
const string MatCharger = "Assets/_Project/Materials/M_Enemy_Charger_Animated.mat";
|
||||
const string SyntyMuscle = "Assets/Synty/PolygonSciFiCity/Prefabs/Characters/SM_Chr_Muscle_Male_01.prefab";
|
||||
|
||||
/// <summary>Canonical ghost base a NEW creature is copied from: a shipping, correctly-authored
|
||||
/// ownerless-interpolated enemy ghost. Re-running a builder whose output already exists never touches
|
||||
/// this — BuildOne edits in place so the output's GUID (and the subscene roster refs) stay stable.
|
||||
/// Replaces the DR-051-deleted Enemy.prefab (2026-08-06 audit, finding M7).</summary>
|
||||
const string GhostTemplate = "Assets/_Project/Prefabs/EnemyDrowner.prefab";
|
||||
|
||||
struct Variant
|
||||
{
|
||||
public string Name, Template, Synty, Output, Material;
|
||||
@@ -53,7 +59,7 @@ namespace ProjectM.EditorTools
|
||||
|
||||
static Variant[] Variants() => new[]
|
||||
{
|
||||
new Variant { Name = "Grunt (Werewolf)", Template = "Assets/_Project/Prefabs/Enemy.prefab", Synty = SyntyWerewolf, Output = "Assets/_Project/Prefabs/EnemyWerewolf.prefab", Material = MatWerewolf, RootY = -1.25f, Scale = 0f },
|
||||
new Variant { Name = "Grunt (Werewolf)", Template = GhostTemplate, Synty = SyntyWerewolf, Output = "Assets/_Project/Prefabs/EnemyWerewolf.prefab", Material = MatWerewolf, RootY = -1.25f, Scale = 0f },
|
||||
new Variant { Name = "Swarmer (Werewolf Undead)", Template = "Assets/_Project/Prefabs/EnemySwarmer.prefab", Synty = SyntyWerewolf, Output = "Assets/_Project/Prefabs/EnemyWerewolfUndead.prefab", Material = MatWerewolfUndead, RootY = -1.67f, Scale = 0f },
|
||||
new Variant { Name = "Brute (Kaiju)", Template = "Assets/_Project/Prefabs/EnemyBrute.prefab", Synty = SyntyKaiju, Output = "Assets/_Project/Prefabs/EnemyKaiju.prefab", Material = MatKaiju, RootY = -0.52f, Scale = 0f },
|
||||
ChargerVariant(),
|
||||
@@ -62,7 +68,8 @@ namespace ProjectM.EditorTools
|
||||
/// <summary>MC-1 Charger: SciFi-City Muscle silhouette via the standard DR-023 pipeline (the inventory's prescribed next-faction path). Template scale 1.0 -> RootY -1.0 (humanoid -1/scale rule); fine-tune feet in Play.</summary>
|
||||
static Variant ChargerVariant() => new Variant { Name = "Charger (SciFi Muscle)", Template = "Assets/_Project/Prefabs/EnemyCharger.prefab", Synty = SyntyMuscle, Output = "Assets/_Project/Prefabs/EnemyChargerMuscle.prefab", Material = MatCharger, RootY = -1.00f, Scale = 0f };
|
||||
|
||||
[MenuItem("ProjectM/Animation/Enemy Rigs - Build All")]
|
||||
// [MenuItem] retired 2026-08-06: BuildAll drove the deleted Werewolf/Kaiju/Charger table.
|
||||
// [MenuItem("ProjectM/Animation/Enemy Rigs - Build All")]
|
||||
public static void BuildAll()
|
||||
{
|
||||
BuildMaterials();
|
||||
@@ -72,7 +79,8 @@ namespace ProjectM.EditorTools
|
||||
}
|
||||
|
||||
/// <summary>MC-1: build ONLY the Charger material + prefab (leaves the committed Werewolf/Kaiju outputs untouched).</summary>
|
||||
[MenuItem("ProjectM/Animation/Enemy Rigs - Build Charger (MC-1)")]
|
||||
// [MenuItem] retired 2026-08-06: the Charger prefab and its authoring were deleted by the audit purge.
|
||||
// [MenuItem("ProjectM/Animation/Enemy Rigs - Build Charger (MC-1)")]
|
||||
public static void BuildCharger()
|
||||
{
|
||||
MakeMat(MatCharger, ChargerAtlas, new Color(1f, 0.42f, 0.36f, 1f)); // red-shifted SciFi atlas = danger read
|
||||
@@ -94,7 +102,7 @@ namespace ProjectM.EditorTools
|
||||
const string synty = "Assets/Synty/PolygonSciFiSpace/Prefabs/Characters/SM_Chr_Crew_Male_01.prefab";
|
||||
MakeMat(mat, atlas, new Color(0.42f, 0.68f, 0.6f, 1f)); // drowned gloam pallor (cold sickly teal-green)
|
||||
AssetDatabase.SaveAssets();
|
||||
BuildOne(new Variant { Name = "Drowner (SciFiSpace Crew)", Template = "Assets/_Project/Prefabs/Enemy.prefab", Synty = synty, Output = "Assets/_Project/Prefabs/EnemyDrowner.prefab", Material = mat, RootY = -1.13f, Scale = 0f });
|
||||
BuildOne(new Variant { Name = "Drowner (SciFiSpace Crew)", Template = GhostTemplate, Synty = synty, Output = "Assets/_Project/Prefabs/EnemyDrowner.prefab", Material = mat, RootY = -1.13f, Scale = 0f });
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
Debug.Log("[EnemyRigTools] Drowner built -> EnemyDrowner.prefab; add to WaveDirector.EnemyPrefabs[] to spawn it.");
|
||||
@@ -109,7 +117,7 @@ namespace ProjectM.EditorTools
|
||||
const string synty = "Assets/Synty/PolygonSciFiSpace/Prefabs/Characters/SM_Chr_Alien_01.prefab";
|
||||
MakeMat(mat, atlas, new Color(0.30f, 0.62f, 0.72f, 1f)); // cold gloam-blue deep-thing
|
||||
AssetDatabase.SaveAssets();
|
||||
BuildOne(new Variant { Name = "Grindylow (SciFiSpace Alien)", Template = "Assets/_Project/Prefabs/Enemy.prefab", Synty = synty, Output = "Assets/_Project/Prefabs/EnemyGrindylow.prefab", Material = mat, RootY = -1.13f, Scale = 0f });
|
||||
BuildOne(new Variant { Name = "Grindylow (SciFiSpace Alien)", Template = GhostTemplate, Synty = synty, Output = "Assets/_Project/Prefabs/EnemyGrindylow.prefab", Material = mat, RootY = -1.13f, Scale = 0f });
|
||||
AssetDatabase.SaveAssets(); AssetDatabase.Refresh();
|
||||
Debug.Log("[EnemyRigTools] Grindylow built -> EnemyGrindylow.prefab.");
|
||||
}
|
||||
@@ -125,7 +133,7 @@ namespace ProjectM.EditorTools
|
||||
const string synty = "Assets/Synty/PolygonSciFiSpace/Prefabs/Characters/SM_Chr_SpaceSoldier_HelmetArmor_Male_01.prefab";
|
||||
MakeMat(mat, atlas, new Color(0.95f, 0.90f, 0.82f, 1f)); // warm-neutral: our light, not gloam-tinted
|
||||
AssetDatabase.SaveAssets();
|
||||
BuildOne(new Variant { Name = "Bathynaut Suit-Frame", Template = "Assets/_Project/Prefabs/Enemy.prefab", Synty = synty, Output = "Assets/_Project/Prefabs/SuitFrame_Bathynaut.prefab", Material = mat, RootY = -1.13f, Scale = 0f });
|
||||
BuildOne(new Variant { Name = "Bathynaut Suit-Frame", Template = GhostTemplate, Synty = synty, Output = "Assets/_Project/Prefabs/SuitFrame_Bathynaut.prefab", Material = mat, RootY = -1.13f, Scale = 0f });
|
||||
AssetDatabase.SaveAssets(); AssetDatabase.Refresh();
|
||||
Debug.Log("[EnemyRigTools] Bathynaut suit-frame preview built -> SuitFrame_Bathynaut.prefab (not wired to the player).");
|
||||
}
|
||||
@@ -134,7 +142,8 @@ namespace ProjectM.EditorTools
|
||||
|
||||
// ---- 1. Materials ------------------------------------------------------------------------------------
|
||||
|
||||
[MenuItem("ProjectM/Animation/Enemy Rigs - 1 Build Materials")]
|
||||
// [MenuItem] retired 2026-08-06: built Werewolf/Kaiju materials for the deleted bestiary.
|
||||
// [MenuItem("ProjectM/Animation/Enemy Rigs - 1 Build Materials")]
|
||||
public static void BuildMaterials()
|
||||
{
|
||||
MakeMat(MatWerewolf, WerewolfAtlas, null);
|
||||
@@ -229,7 +238,9 @@ namespace ProjectM.EditorTools
|
||||
|
||||
// ---- 3. Prefabs --------------------------------------------------------------------------------------
|
||||
|
||||
[MenuItem("ProjectM/Animation/Enemy Rigs - 3 Build Prefabs")]
|
||||
// [MenuItem] retired 2026-08-06: iterated the deleted Variants() table. Use the per-creature
|
||||
// LANTERN builders above.
|
||||
// [MenuItem("ProjectM/Animation/Enemy Rigs - 3 Build Prefabs")]
|
||||
public static void BuildPrefabs()
|
||||
{
|
||||
foreach (var v in Variants()) BuildOne(v);
|
||||
@@ -240,8 +251,13 @@ namespace ProjectM.EditorTools
|
||||
|
||||
static void BuildOne(Variant v)
|
||||
{
|
||||
if (AssetDatabase.LoadAssetAtPath<GameObject>(v.Template) == null)
|
||||
{ Debug.LogError($"[EnemyRigTools] Template missing: {v.Template}"); return; }
|
||||
// 2026-08-06 audit (finding M7): this check used to be unconditional, so once DR-051 deleted
|
||||
// Assets/_Project/Prefabs/Enemy.prefab the tool died at EVERY entry point — including the idempotent
|
||||
// re-run path below, which needs no template at all. The three shipped skinned prefabs were therefore
|
||||
// unreproducible. A missing template only matters when there is no output to edit in place.
|
||||
if (AssetDatabase.LoadAssetAtPath<GameObject>(v.Output) == null
|
||||
&& AssetDatabase.LoadAssetAtPath<GameObject>(v.Template) == null)
|
||||
{ Debug.LogError($"[EnemyRigTools] No output at {v.Output} and template missing: {v.Template}"); return; }
|
||||
if (AssetDatabase.LoadAssetAtPath<GameObject>(v.Synty) == null)
|
||||
{ Debug.LogError($"[EnemyRigTools] Synty char prefab missing: {v.Synty}"); return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user