unity-coding-entities

Guide Unity C# projects using UniT.Entities for entity lifecycle and controller logic.

Updated Aug 20, 2025
One-click install
npx skills add https://github.com/frostbun/dotfiles --skill unity-coding-entities
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-coding-entities
Source: https://github.com/frostbun/dotfiles/tree/main/configs/opencode/skills/unity/unity-coding-entities
Command: npx skills add https://github.com/frostbun/dotfiles --skill unity-coding-entities

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the implementation of the Entity-Component pattern in Unity projects using the UniT.Entities package, streamlining entity lifecycle management and logic separation.

Core Features & Use Cases

  • Entity Lifecycle Management: Efficiently handle entity instantiation, spawning, recycling, and cleanup using IEntityManager.
  • Component and Entity Design: Implement custom components and entities using provided base classes and interfaces like IComponent, IEntity, Component, and BaseEntity.
  • Controller Pattern: Separate game logic from entity components using the Controller pattern for better organization and testability.
  • Entity Querying: Easily query active entities and components of specific types.
  • Use Case: When building a complex game with many dynamic objects like projectiles or enemies, this skill helps manage their creation, destruction, and behavior efficiently.

Quick Start

Use the unity-coding-entities skill to spawn a new entity of type 'Player' with default parameters.

Frequently Asked Questions about unity-coding-entities

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage entity lifecycle and spawning in Unity C#?

Use the Controller pattern to separate game logic from entity components, implementing custom IComponent and IEntity interfaces to organize behavior and improve testability across your Unity project.

How do I query active entities and components in Unity?

Query active Unity entities and components by utilizing the entity querying capabilities provided in the UniT.Entities package to easily retrieve specific entity types currently active in your game.

Does UniT.Entities work for building complex game object hierarchies in Unity?

UniT.Entities works for building complex Unity game object hierarchies by providing base classes like BaseEntity and Component to structure entity pools and manage dynamic objects efficiently.

What is the best way to separate game logic from entity components in Unity?

The best way to separate game logic from Unity entity components is applying the Controller pattern, which isolates behavior logic from IComponent implementations for better code organization and testability.