How nicktasticdev/exprite-unity works
Project type and purpose
• This is a Unity package (“Exprite for Unity”) that provides both an Editor extension and Runtime components to parse and play Sparrow/Starling spritesheets in Unity.
• Key purpose: import Sparrow spritesheet assets into Unity (via an Editor importer), generate ScriptableObject animation packs, and provide a runtime ExpriteRenderer component to display those animations at play time.
File structure
• Top-level:
• Misc/ – importer presets
• Scripts/Editor/ – Unity Editor extension code, including windows, inspectors, and .asmdef for Editor assembly
• Scripts/Runtime/ – runtime plugin code, including components, models, scriptable objects, and .asmdef for runtime assembly
• package.json – Unity package manifest
• Notable patterns:
• Separation of Editor code (folder + Exprite.Editor.asmdef) from Runtime code (folder + Exprite.asmdef)
• Models folder holds data classes (AnimationDefinition, SubTexture, TextureAtlas) used by both importer and runtime
• ScriptableObjects folder holds the generated ExpriteAnimationPack asset
README for additional insights
• Confirms the package is in development and targets Unity 6000.0+
• Describes core feature: parsing and playing Sparrow/Starling spritesheets, supporting internal and external asset loading
Main components and their interactions
a. Editor Extension
• ExpriteWindow (UI)
• Custom Inspectors: ExpriteAnimationPackEditor, ExpriteRendererEditor
• Importer preset: ExpriteTextureImporter.preset
• Runs in Unity Editor to parse source spritesheets, build TextureAtlas & AnimationDefinition models, and generate ExpriteAnimationPack ScriptableObject assets
b. Runtime Plugin
• ExpriteRenderer component attaches to GameObjects in scenes
• Reads ExpriteAnimationPack assets (from Resources/StreamingAssets or direct assets)
• Uses Model classes (AnimationDefinition, SubTexture, TextureAtlas) to drive animation logic and feed Unity’s Mesh/Renderer sub‐system
c. Assets & ScriptableObjects
• Image files (PNG, atlas) live under Images/ or loaded externally
• ExpriteAnimationPack ScriptableObjects store metadata about frame sequences
d. External Services / Data Sources
• Optional runtime streaming from StreamingAssets or a custom URL loader
Architectural patterns and design principles
• Clear separation of concerns: Editor vs Runtime assemblies
• Data‐driven design: Models + ScriptableObjects encapsulate all animation data
• Unity best practices: .asmdef files to isolate compilation, custom Inspectors to enhance UX
• Extensibility: importer preset can be swapped; runtime loader can be extended