Delete field tester debug panel

This commit is contained in:
Meta Vens 2026-06-15 22:26:14 +01:00
commit 5d34d3706b
6 changed files with 49 additions and 149 deletions

Binary file not shown.

View file

@ -11,6 +11,7 @@ RequireGameplaySourcePurity(root);
RequirePackageSerializerBoundary(root);
RequireEveRuntimeBootstrap(root);
RequireNoRendererLocalConsole(root);
RequireNoRendererLocalDebugPanels(root);
await using var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-state-verify");
@ -451,6 +452,7 @@ Console.WriteLine("Live gameplay source purity: no serializer or legacy database
Console.WriteLine("Package serializer boundary: MessagePack symbols remain in named CultCache transport files only");
Console.WriteLine("Eve runtime bootstrap: operations surface mounts through UI Toolkit presenter");
Console.WriteLine("Renderer-local console authority: deleted; UI commands flow through Eve command documents");
Console.WriteLine("Renderer-local debug panels: obsolete uGUI field tester authority is deleted");
static void RequireCount(AetheriaMigrationLedger ledger, string documentType, int actual)
{
@ -643,6 +645,45 @@ static void RequireNoRendererLocalConsole(string root)
}
}
static void RequireNoRendererLocalDebugPanels(string root)
{
var forbiddenFiles = new[]
{
Path.Combine(root, "Assets", "Scripts", "UI", "FieldTester.cs")
};
var existingFiles = forbiddenFiles
.Where(File.Exists)
.Select(path => Path.GetRelativePath(root, path))
.ToArray();
if (existingFiles.Length > 0)
{
throw new InvalidOperationException(
"Renderer-local debug panel source files still exist: " +
string.Join(", ", existingFiles));
}
var hits = Directory.EnumerateFiles(Path.Combine(root, "Assets"), "*.*", SearchOption.AllDirectories)
.Where(path =>
path.EndsWith(".cs", StringComparison.OrdinalIgnoreCase) ||
path.EndsWith(".unity", StringComparison.OrdinalIgnoreCase) ||
path.EndsWith(".prefab", StringComparison.OrdinalIgnoreCase))
.SelectMany(path => File.ReadLines(path)
.Select((line, index) => new { Path = path, LineNumber = index + 1, Line = line }))
.Where(line => line.Line.Contains("FieldTester", StringComparison.Ordinal))
.Select(line => $"{Path.GetRelativePath(root, line.Path)}:{line.LineNumber}: {line.Line.Trim()}")
.Take(10)
.ToArray();
if (hits.Length > 0)
{
throw new InvalidOperationException(
"Renderer-local FieldTester authority is still wired in Assets: " +
string.Join("; ", hits));
}
}
static bool ContainsBehaviorValueKind(AetheriaBehaviorValue value, string kind)
{
return string.Equals(value.Kind, kind, StringComparison.OrdinalIgnoreCase) ||

View file

@ -767,7 +767,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 699508827}
- component: {fileID: 699508826}
m_Layer: 0
m_Name: Tester
m_TagString: Untagged
@ -775,36 +774,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &699508826
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 699508825}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 686a80c9880b431b94a9b0029d39cf1f, type: 3}
m_Name:
m_EditorClassIdentifier:
PickupCount: 64
PickupPrefabs:
- {fileID: 7436534270673427838, guid: 521bfeece7dd5fd4e8f166d38493f18c, type: 3}
- {fileID: 4507103896627202189, guid: 366909b6a01d7254d8eef01c333f8e00, type: 3}
- {fileID: 7390748043139687254, guid: d2b7e9a9cd7733041b0553682e4b61af, type: 3}
- {fileID: 5705448000916375656, guid: d2cec1d8c3d94074e9d2e6088e1c02d7, type: 3}
- {fileID: 1545255963217739444, guid: f399719f41451754eba07ca072698b68, type: 3}
PickupTravelDistance: 128
PickupTravelTimeMin: 16
PickupTravelTimeMax: 32
PickupSizeMin: 0.5
PickupSizeMax: 1
ScaleExponent: 2
PickupSpawnDistanceMin: 5
PickupSpawnDistanceMax: 20
Camera: {fileID: 1153356615}
TestField: {fileID: 909026488}
Properties: {fileID: 401779935}
--- !u!4 &699508827
Transform:
m_ObjectHideFlags: 0

View file

@ -1,112 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using Unity.Mathematics;
using static Unity.Mathematics.math;
using Random = UnityEngine.Random;
public class FieldTester : MonoBehaviour
{
public int PickupCount;
public ItemPickup[] PickupPrefabs;
public float PickupTravelDistance;
public float PickupTravelTimeMin;
public float PickupTravelTimeMax;
public float PickupSizeMin;
public float PickupSizeMax;
public float ScaleExponent;
public float PickupSpawnDistanceMin;
public float PickupSpawnDistanceMax;
public Camera Camera;
public FieldDriver TestField;
public PropertiesPanel Properties;
private AetheriaInput _input;
private bool _forceThrust;
private float _throttleDecay = 2;
private bool _directionalPush;
private float _twistFront;
private float _twistRear;
private List<(float lerp, float time, Transform transform)> _pickups = new List<(float lerp, float time, Transform transform)>();
private void Start()
{
_input = new AetheriaInput();
_input.Player.Enable();
Properties.AddField("Time Scale", () => Time.timeScale, f => Time.timeScale = f, 0, 2);
Properties.AddField("FOV", () => Camera.fieldOfView, f => Camera.fieldOfView = f, 15, 45);
Properties.AddButton("Melee", () => TestField.Melee());
Properties.AddField("Force Thrust", () => _forceThrust, b => _forceThrust = b);
Properties.AddField("Directional Push", () => _directionalPush, b => _directionalPush = b);
Properties.AddField("Throttle Decay", () => _throttleDecay, f => _throttleDecay = f);
Properties.Inspect(TestField, true, true);
Properties.AddProperty("Current Hits", () => TestField.HitCount.ToString());
Properties.AddProperty("Push X", () => $"{(int)(TestField.Push.x * 100)}%");
Properties.AddProperty("Push Y", () => $"{(int)(TestField.Push.y * 100)}%");
Properties.AddProperty("Front Twist", () => $"{(int)(TestField.FrontTwist * 100)}%");
Properties.AddProperty("Rear Twist", () => $"{(int)(TestField.RearTwist * 100)}%");
for (int i = 0; i < PickupCount; i++)
{
var l = (float)i / PickupCount;
var pickup = Instantiate(PickupPrefabs[(int)(l * PickupPrefabs.Length)], transform);
var i1 = i;
var click = pickup.GetComponent<ClickableCollider>();
click.OnClick += (collider, data, ray, hit) =>
{
if (!TestField.CanGrab) return;
click.Clear();
var p = _pickups[i1];
var travelTime = lerp(PickupTravelTimeMin, PickupTravelTimeMax, l);
TestField.GrabObject(p.transform, Vector3.forward * (PickupTravelDistance / travelTime));
p.transform = null;
_pickups[i1] = p;
};
pickup.ScanLabelContainer.gameObject.SetActive(false);
pickup.enabled = false;
var pickupTransform = pickup.transform;
var time = Random.value;
var circle = Random.insideUnitCircle.normalized * Random.Range(PickupSpawnDistanceMin,PickupSpawnDistanceMax);
pickupTransform.position = new Vector3(circle.x,circle.y, (time-.5f)*PickupTravelDistance);
_pickups.Add((l, time, pickupTransform));
}
}
private void Update()
{
var move = _forceThrust ? float2(0,1) : (float2)_input.Player.Move.ReadValue<Vector2>();
var turn = _input.Player.Turn.ReadValue<float>();
if (_directionalPush)
{
TestField.Push = AetheriaMath.Damp(TestField.Push, move, _throttleDecay, Time.deltaTime);
TestField.FrontTwist = AetheriaMath.Damp(TestField.FrontTwist,
turn,
_throttleDecay, Time.deltaTime);
TestField.RearTwist = AetheriaMath.Damp(TestField.RearTwist,
turn,
_throttleDecay, Time.deltaTime);
}
else
{
TestField.Push = AetheriaMath.Damp(TestField.Push, float2(0,move.y), _throttleDecay, Time.deltaTime);
TestField.FrontTwist = AetheriaMath.Damp(TestField.FrontTwist,
clamp(turn + move.x, -1, 1) * (1+min(move.y,0)),
_throttleDecay, Time.deltaTime);
TestField.RearTwist = AetheriaMath.Damp(TestField.RearTwist,
clamp(turn - move.x, -1, 1) * (1+min(-move.y,0)),
_throttleDecay, Time.deltaTime);
}
for (var i = 0; i < _pickups.Count; i++)
{
var (l, time, t) = _pickups[i];
if (t == null) continue;
time = frac(time + Time.deltaTime / lerp(PickupTravelTimeMin, PickupTravelTimeMax, l));
t.localScale = Vector3.one * lerp(PickupSizeMin, PickupSizeMax, l) * Zone.PowerPulse(time - .5f, ScaleExponent);
t.position = new Vector3(t.position.x, t.position.y, (time - .5f) * PickupTravelDistance);
_pickups[i] = (l, time, t);
}
}
}

View file

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 686a80c9880b431b94a9b0029d39cf1f
timeCreated: 1659655755

View file

@ -613,9 +613,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
story/cache document exists.
- Runtime UI still contains old Unity UI/uGUI prefabs plus `MonoBehaviour`
scripts under `Assets/Scripts/UI/` and `Assets/Prefabs/UI/`, but the old
renderer-local debug console authority has been deleted. Runtime UI commands
must be provider-advertised Eve command documents, not text parsed by a Unity
component and invoked directly against gameplay objects.
renderer-local debug console and field-tester panel authorities have been
deleted. Runtime UI commands must be provider-advertised Eve command
documents, not text parsed by a Unity component or a test-scene uGUI panel and
invoked directly against gameplay objects.
- Aetheria already has Unity UIElements support available through
`com.unity.modules.uielements`. It now imports local staged
`org.gamecult.eve.surface` and `org.gamecult.eve.unity-uitoolkit` packages:
@ -1357,6 +1358,10 @@ First Aetheria surfaces to publish:
the Eve command bridge; future gameplay/editor commands must add
provider-owned Eve handlers instead of reintroducing renderer-local text
command execution.
- Done: delete the uGUI `FieldTester` debug panel and its
`FieldShieldTest.unity` script binding. Future field prototype controls
should be provider-owned Eve/prototype commands or local simulation code,
not a `PropertiesPanel` mutating `FieldDriver` directly.
- Replace the next concrete uGUI screen with an Eve-owned surface.
- Move the staged packages into the Eve repo once its worktree is clean, then
import them back into Aetheria from Eve instead of carrying a local copy.