Unity Builder Pattern

Step-by-step object construction using fluent interfaces. Simplifies complex GameObject setup.

muharremtozan Updated 18 repo stars

File contents

Unity Builder Pattern

Minimal builder pattern for GameObject construction.

Core Features

  1. Fluent API: Chainable methods for readable setup
  2. Generic Interface: IBuilder<T> for any object type
  3. Component Management: Easy component addition

Core Files (1 file)

  • Builder.cs.txt: Complete builder pattern (interface + fluent implementation)

Usage

var player = new GameObjectBuilder( "Player" )
    .WithPosition( Vector3.zero )
    .AddComponent<Rigidbody>()
    .Build();

muharremtozan/unity-agent-skills commit 4f43e601fb

Frequently asked questions

npx get-skill add muharremtozan/unity-builder-pattern