# CreateAssetFromInSceneAsset(Object, string)

> Creates a project asset from the given in-scene asset and saves it at the provided file path.

## Definition

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

```csharp
public static bool CreateAssetFromInSceneAsset(Object inSceneAsset, string filePath)
```

### Parameters

**** (\[Object]\(/engine/6000.0/script-reference/unityengine/object)): The in-scene asset object to convert to a project asset.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The file path for the new asset. The path is relative to the project folder.

### Returns

| Type                                                          | Description                                         |
| ------------------------------------------------------------- | --------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the project asset was created successfully. |

### Remarks

Any in-scene assets referenced by the provided `inSceneAsset` are saved as sub-objects of the new asset.

Note that `filePath` is relative to the project folder, for example: "Assets/MyStuff/hello.mat". For more details on `filePath` requirements see [AssetDatabase.CreateAsset](/engine/6000.0/script-reference/unityeditor/assetdatabase/createasset.md).

Additional Resources: [InSceneAssetUtility.CreateInSceneAssetFromAsset](/engine/6000.0/script-reference/unityeditor/insceneassetutility/createinsceneassetfromasset.md).
