Crisp launcher (sizes and fonts scaled in screen pixels instead of a GUI matrix), fps command and display, fewer hitches (staggered scans, shared rigidbody scan, crash-damage mesh reads only after impacts, rarer vehicle fx lookups, cached display prefs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,27 @@ namespace MSCO
|
||||
static float builtAt = -1000f;
|
||||
static int builtForLevel = -1;
|
||||
|
||||
static Rigidbody[] bodies = new Rigidbody[0];
|
||||
static float bodiesAt = -1000f;
|
||||
static int bodiesForLevel = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Alle Rigidbodies; höchstens maxAge Sekunden alt (Objekt-Sync und Verkehr teilen sich die teure Suche).
|
||||
/// Einträge können inzwischen zerstört sein (== null prüfen).
|
||||
/// </summary>
|
||||
public static Rigidbody[] Rigidbodies(float maxAge)
|
||||
{
|
||||
if (Time.realtimeSinceStartup - bodiesAt > maxAge || bodiesForLevel != Application.loadedLevel)
|
||||
{
|
||||
Object[] found = Object.FindObjectsOfType(typeof(Rigidbody));
|
||||
bodies = new Rigidbody[found.Length];
|
||||
for (int i = 0; i < found.Length; i++) bodies[i] = (Rigidbody)found[i];
|
||||
bodiesAt = Time.realtimeSinceStartup;
|
||||
bodiesForLevel = Application.loadedLevel;
|
||||
}
|
||||
return bodies;
|
||||
}
|
||||
|
||||
/// <summary>Alle FSMs; höchstens maxAge Sekunden alt. Einträge können inzwischen zerstört sein (== null prüfen).</summary>
|
||||
public static PlayMakerFSM[] Fsms(float maxAge)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user