/game-dev:unityfrom game-dev
Provides guidance on Unity game engine development including MonoBehaviour lifecycle, ScriptableObjects, object pooling, and C# conventions.
Ships in game-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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:
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/engine-patternsCross-engine design pattern comparison for game development including ECS, state machines, networking, and common architectures/gamedev-conventionsCross-engine game development conventions and standards for the game-dev team/godotGodot Engine patterns, Node tree architecture, Signals, Resources, and GDScript/C# conventions/orleansMicrosoft Orleans patterns for distributed game servers, Grains, Silos, persistence, and multiplayer game architecture/threejsThree.js and React Three Fiber patterns, scene graph management, disposal, and TypeScript conventions/unrealUnreal Engine patterns, Actor/Component model, Blueprints vs C++, and best practicesnpx claudepluginhub monumentalsystems/atlas-agent-teams --plugin game-devOther plugins' skills for the same job