gameobject-create

Create a GameObject in an opened Prefab or active Scene with optional transform.

Updated Feb 4, 2024
One-click install
npx skills add https://github.com/sprillion/gem_td --skill gameobject-create-sprillion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-create
Source: https://github.com/sprillion/gem_td/tree/main/SKILLS/gameobject-create
Command: npx skills add https://github.com/sprillion/gem_td --skill gameobject-create-sprillion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a new GameObject in opened Prefab or in a Scene. If needed - provide proper 'position', 'rotation' and 'scale' to reduce amount of operations.

Core Features & Use Cases

  • Create a new GameObject inside the opened Prefab or Scene.
  • Optionally set transform with position, rotation, and scale to streamline setup.

Quick Start

Create a new GameObject in the opened Prefab or Scene and optionally specify position, rotation, and scale to initialize it efficiently.

Frequently Asked Questions about gameobject-create

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

FAQPage Schema
How do I instantiate a new GameObject in a Unity Scene with specific position and rotation?

To instantiate a new GameObject in Unity, provide the desired position, rotation, and scale values during creation. This reduces extra operations by initializing the transform properties immediately when adding the object to your active Scene.

Can I create a GameObject inside an opened Unity Prefab instead of the active Scene?

Yes, you can create a new GameObject directly inside an opened Prefab. The tool detects the current context and adds the instantiated object to the Prefab, allowing optional local or world space transform configuration.

What's the best way to parent a newly instantiated GameObject in Unity?

The best way to parent a GameObject is to specify a parentGameObjectRef during creation. This establishes the parent-child relationship immediately, correctly calculating the provided position and scale relative to the parent's transform.

Does this Unity GameObject creation method support primitive types?

Yes, Unity GameObject creation supports specifying a primitiveType parameter. This allows you to quickly instantiate basic primitive shapes like cubes or spheres directly in your Scene or Prefab without manual mesh setup.

How do I set local vs world space coordinates when creating a GameObject in Unity?

You control local or world space coordinates by setting the isLocalSpace input. This determines whether the provided position, rotation, and scale values apply relative to the parent transform or in global Scene space.

Why does my instantiated Unity GameObject output a GameObjectRef?

Instantiated Unity GameObjects output a GameObjectRef to identify the created or located object. This reference allows subsequent automation tools to target the exact instance for further property modifications or component additions.