level 1
红星南博丸
楼主
用unity mmd转换后 动画视频演示播放 是ok的, 导出unity3d文件后 进入游戏时就提示找不到资源
the referenced script on this behaviour is missing!
脚本如下:
using UnityEngine;
using UnityEditor;
using UnityEngine.Rendering;
public class MultiPlatformExportAssetBundles
{
[MenuItem("Assets/构建unity3D资源包")]
static void ExportResource()
{
// Bring up save panel
string path = EditorUtility.SaveFilePanel("Save Resource", "", "New Resource", "unity3d");
if (path.Length != 0)
{
// include the following Graphic APIs
PlayerSettings.SetGraphicsAPIs(BuildTarget.StandaloneWindows, new GraphicsDeviceType[] { GraphicsDeviceType.Direct3D11, GraphicsDeviceType.OpenGLCore, GraphicsDeviceType.Vulkan});
// Build the resource file from the active selection.
Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);
BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.StandaloneWindows);
Selection.objects = selection;
}
}
}
2022年09月14日 13点09分
1
the referenced script on this behaviour is missing!
脚本如下:
using UnityEngine;
using UnityEditor;
using UnityEngine.Rendering;
public class MultiPlatformExportAssetBundles
{
[MenuItem("Assets/构建unity3D资源包")]
static void ExportResource()
{
// Bring up save panel
string path = EditorUtility.SaveFilePanel("Save Resource", "", "New Resource", "unity3d");
if (path.Length != 0)
{
// include the following Graphic APIs
PlayerSettings.SetGraphicsAPIs(BuildTarget.StandaloneWindows, new GraphicsDeviceType[] { GraphicsDeviceType.Direct3D11, GraphicsDeviceType.OpenGLCore, GraphicsDeviceType.Vulkan});
// Build the resource file from the active selection.
Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);
BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.StandaloneWindows);
Selection.objects = selection;
}
}
}