Skip to content

FrameCostKind

namespace Griff.Runtime;
public enum FrameCostKind

What a cost in a frame is for: one of Griff’s steps, a system a script added, a kind of script, part of building the picture, drawing it, or the editor’s own work.

  • Step = 0: One of Griff’s own steps of the frame (see Frame), named for what it runs: Physics, Animations, Particles.
  • System = 1: The Update of a GameSystem a script added.
  • Script = 2: Every script of one kind (a Behavior class): their Update, FixedUpdate and LateUpdate together.
  • Picture = 3: Drawing the picture the frame built (Draw), as a whole. (Building it is split into its parts: see Build.)
  • Build = 4: Part of building the picture of the frame, in the order they come: Camera (finding the view); Clearing (emptying the last frame’s draws to reuse them); what each kind of component that draws adds (Sprite, Tilemap, Text, ParticleEmitter, a script’s own drawing), with its entities’ upkeep (where each is, what it sorts by); Sorting (putting it all back to front); Systems (getting the frame ready for them) and each system’s Draw, named for the system; Lights (which lights reach the view, and their shadows, when it’s dark); Screen (fades, flashes and debug shapes over it all).
  • Editor = 5: Work the editor does for the game it plays that an exported game doesn’t (keeping rewind snapshots, its panels following the game).