public static void LoadVrmAsync(string path, Byte[] bytes, Action <GameObject> onLoaded, Action <Exception> onError = null, bool show = true) { var context = new ImporterContext(); context.Parse(path, bytes); context.LoadAsync(() => { if (show) { context.ShowMeshes(); } onLoaded(context.Root); }, onError); }
public static void ImportAsset(string src, string ext, UnityPath prefabPath) { if (!prefabPath.IsUnderAssetsFolder) { Debug.LogWarningFormat("out of asset path: {0}", prefabPath); return; } var context = new ImporterContext(); context.Parse(src); // Extract textures to assets folder context.ExtractImages(prefabPath); ImportDelayed(src, prefabPath, context); }