CreateAssetFromInSceneAsset(Object, string)
Creates a project asset from the given in-scene asset and saves it at the provided file path.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static bool CreateAssetFromInSceneAsset(Object inSceneAsset, string filePath)
Parameters
Returns
Type | Description |
|---|---|
| bool | True if the project asset was created successfully. |
Remarks
Any in-scene assets referenced by the provided are saved as sub-objects of the new asset.
inSceneAssetNote that is relative to the project folder, for example: "Assets/MyStuff/hello.mat". For more details on requirements see AssetDatabase.CreateAsset.
filePathfilePathAdditional Resources: InSceneAssetUtility.CreateInSceneAssetFromAsset.