Unity game engine patterns, lifecycle, best practices, and C# conventions
Provides Unity development expertise including MonoBehaviour lifecycle, ScriptableObjects, and performance optimization patterns.
npx claudepluginhub davincidreams/atlas-agent-teamsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Look for: .csproj, .sln, .unity, .prefab, .asmdef, ProjectSettings/, Assets/, Packages/manifest.json
Assets/
Scripts/
Player/
Enemies/
UI/
Systems/
Utilities/
Prefabs/
Scenes/
Materials/
Textures/
Audio/
Animations/
ScriptableObjects/
Editor/ # Editor-only scripts
Plugins/ # Third-party plugins
Packages/
ProjectSettings/
Order of execution matters. Use the correct callback:
public class GameEntity : MonoBehaviour
{
// Called once when the script instance is loaded
void Awake()
{
// Initialize self-references (GetComponent, etc.)
// Do NOT reference other objects here - they may not be ready
}
// Called once before the first Update, after all Awake calls
void Start()
{
// Safe to reference other objects
// Initialize state that depends on other components
}
// Called every frame
void Update()
{
// Input handling, non-physics movement
// Use Time.deltaTime for frame-rate independence
}
// Called at fixed intervals (default 0.02s)
void FixedUpdate()
{
// Physics-related code (Rigidbody movement, forces)
}
// Called after all Update calls
void LateUpdate()
{
// Camera follow, UI updates that depend on game state
}
// Called when the object is destroyed
void OnDestroy()
{
// Unsubscribe events, clean up resources
}
void OnEnable() { /* Subscribe to events */ }
void OnDisable() { /* Unsubscribe from events */ }
}
Use ScriptableObjects for game data, configuration, and shared state:
[CreateAssetMenu(fileName = "NewWeapon", menuName = "Game/Weapon Data")]
public class WeaponData : ScriptableObject
{
public string weaponName;
public int damage;
public float attackSpeed;
public float range;
public GameObject projectilePrefab;
public AudioClip attackSound;
}
Usage in components:
public class WeaponController : MonoBehaviour
{
[SerializeField] private WeaponData weaponData;
public void Attack()
{
// Use weaponData.damage, weaponData.attackSpeed, etc.
}
}
public class ObjectPool<T> where T : MonoBehaviour
{
private readonly Queue<T> pool = new();
private readonly T prefab;
private readonly Transform parent;
public ObjectPool(T prefab, int initialSize, Transform parent = null)
{
this.prefab = prefab;
this.parent = parent;
for (int i = 0; i < initialSize; i++)
pool.Enqueue(CreateInstance());
}
public T Get()
{
var obj = pool.Count > 0 ? pool.Dequeue() : CreateInstance();
obj.gameObject.SetActive(true);
return obj;
}
public void Return(T obj)
{
obj.gameObject.SetActive(false);
pool.Enqueue(obj);
}
private T CreateInstance()
{
var obj = Object.Instantiate(prefab, parent);
obj.gameObject.SetActive(false);
return obj;
}
}
// ScriptableObject-based event channel
[CreateAssetMenu(menuName = "Events/Game Event")]
public class GameEvent : ScriptableObject
{
private readonly List<System.Action> listeners = new();
public void Raise() => listeners.ForEach(l => l.Invoke());
public void Register(System.Action listener) => listeners.Add(listener);
public void Unregister(System.Action listener) => listeners.Remove(listener);
}
GetComponent<T>() every frame - cache itnew List<T>() in Update - allocates every framestring + string in hot paths - use StringBuilderCamera.main repeated calls - cache the referenceFor systems needing maximum performance, consider Unity's Data-Oriented Technology Stack:
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.