private static void CreateStlPrefab(string stlFile) { GameObject gameObject = CreateStlParent(stlFile); if (!gameObject) { Debug.LogWarning($"Could not create a mesh prefab for {stlFile}"); return; } RuntimeUrdf.PrefabUtility_SaveAsPrefabAsset(gameObject, GetPrefabAssetPath(stlFile)); Object.DestroyImmediate(gameObject); }
public void PrefabUtility_SaveAsPrefabAsset_AssetAsRoot() { RuntimeUrdf.runtimeModeEnabled = false; Assert.IsNotNull(RuntimeUrdf.PrefabUtility_SaveAsPrefabAsset(new GameObject("TestAsset2"), $"{createAssetPath}/TestAsset2.prefab")); }