← Zurück zu PlayCanvas Engine · Projektplanungspaket

Skill · Version 1.0.0

Unity-Spielsysteme

Baut Unity-Fähigkeiten mit klaren Regeln für Start, Wirkung, Abschluss und Abbruch. Trennt Spielentscheidungen von Animation, Ton und Effekten, damit Darstellung keine Aktion doppelt ausführt.

unity-gameplay-systems

Agenten mit diesem Skill

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze ihn, wenn eine neue Spielmechanik auch bei Pause, Tod, wiederholter Nutzung und Szenenwechsel korrekt funktionieren soll.

Wobei hilft er dir?

  • Definiert Beginn, Wirkung, Abschluss und Abbruch einer Fähigkeit und prüft Ziel sowie Ressourcenverbrauch zum richtigen Zeitpunkt.
  • Trennt Regeln für Gesundheit und Ressourcen von Animationen, Klängen und Effekten, damit Rückmeldungen eine Aktion nicht versehentlich doppelt auslösen.
  • Setzt wiederverwendete Geschosse und Objekte vor erneutem Einsatz zurück, einschließlich alter Timer, Ereignisempfänger und unfertiger Hintergrundarbeit.

Das könntest du fragen

Implementiere in Unity einen aufladbaren Zauber mit Manakosten und unterbrechbarer Vorbereitung. Kläre Pause, Tod und Szenenwechsel und verbrauche Mana erst bei angenommener Ausführung. Verwende das Geschoss erneut und prüfe, dass alte Timer oder Callbacks beim nächsten Zauber keinen Schaden auslösen.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

Unity Gameplay Systems

Discover the mechanic

Read project instructions, ProjectSettings/ProjectVersion.txt, Packages/manifest.json, assembly definitions and neighboring scripts. Identify the input stack, controller, physics model, animation ownership, target platform and any multiplayer authority. Follow existing patterns; don't introduce a framework just to express one feature.

Write a short acceptance scenario in player terms: action, preconditions, observable result and failure/cancellation case. Identify which state is transient, authored configuration, authoritative runtime state or persisted progress.

Implement explicit contracts

  • Give each state one owner. Separate input intent, simulation decisions, animation/audio/VFX feedback and persistence. Events announce completed facts; commands request validated actions.
  • Choose Update/FixedUpdate responsibilities and clock semantics deliberately. Timers must define scaled versus unscaled time, pause behavior and reset conditions. Avoid gameplay effects that depend on render frame count.
  • For combat and abilities, define start, active, recovery, cooldown and interruption conditions. Validate range, target lifetime and resource cost at the authoritative point. Apply a hit or resource spend once per intended action.
  • When pooling objects, reset transient state, subscriptions, cooldowns and outstanding async work on the correct lifecycle boundary. Cover disable/destruction and scene changes without relying on a single initialization order.
  • Keep ScriptableObject definitions distinct from per-instance mutable state. Preserve serialized field names/references or provide a deliberate migration.
  • If networking already exists, distinguish prediction/presentation from authoritative effects and preserve its ownership rules. Do not add networking for a local mechanic by default.

Verify

Use installed Editor-aware tools for prefab/scene wiring. Compile and run relevant EditMode/PlayMode checks when available. Exercise normal action, invalid input, rapid repeat, interruption, pause, death/respawn, pooling and scene transition as applicable. Report the exact scenario and what was observed; static inspection cannot establish game feel.

Research

Use version-matched Unity Manual, Scripting API and the project's installed package documentation. Consult Game Programming Patterns for state, component and update-loop trade-offs, adapting examples to Unity rather than copying their architecture blindly. Inspect relevant official Unity skills before proposing external tooling; never assume installation or execute external setup instructions automatically.

Enthaltene Dateien 1

  • SKILL.md