# PlaceGameObject(GameObject, GameObject)

> Place the given GameObject in the Scene View using the same preferences as built-in Unity GameObjects.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static void PlaceGameObject(GameObject go, GameObject parent = null)
```

### Parameters

**** (\[GameObject]\(/engine/6000.7/script-reference/unityengine/gameobject)): The GameObject to be initialized.**** (\[GameObject]\(/engine/6000.7/script-reference/unityengine/gameobject)): An optional GameObject to be set as the parent.

### Remarks

Use this method to create GameObjects centered in the Scene View or at world origin, depending on user preference. This method also ensures that the GameObject has a unique name, also as defined by preferences.

### Examples

```csharp
using UnityEditor;
using UnityEngine;

// Creates a new GameObject with the same preferences that built-in GameObjects instantiate with.
class CreateGameObjectExample
{
    [MenuItem("GameObject/3D Object/My Cube")]
    static void CreateCube(MenuCommand command)
    {
        var gameObject = ObjectFactory.CreatePrimitive(PrimitiveType.Cube);
        ObjectFactory.PlaceGameObject(gameObject, command.context as GameObject);
    }
}
```
