unity 打包 windows 运行 紫色 粉红色

unity下建立了个小demo,在editer里面运行正常。如下

但是一旦打包发布到android或者windows下就出现了类似这种情况

这种一般是由于材质贴图的缺失,一般来说选定的默认贴图的话会打包到文件中的。如果出现这种情况,可以尝试代码动态加载一个材质球。如下

Material materialWall = Resources.Load("Materials\\materialWall") as Material;
wallTemp.GetComponent<Renderer>().material = materialWall;

  

这样可以暂时解决问题,不过后面又发现他自己又好了。真是不可理喻。以后再研究吧

时间: 2024-07-30 17:44:08

unity 打包 windows 运行 紫色 粉红色的相关文章

pyqt5程序使用py2exe打包后运行时报找不到Qt platform plugin ‘windows’错误

pyqt5程序使用py2exe打包后运行时报找不到Qt platform plugin 'windows'错误 现象描述: 64位windows系统下直接将pyqt5的plugins下的platforms文件夹复制到exe相同目录即可,但在32位系统下一直报找不到Qt platform plugin 'windows'错误. 解决方案: 在exe同目录下新建plugins文件夹,然后将platfroms文件夹移到新建的文件夹下,同时修改main方法,添加以下代码: QApplication.ad

unity 打包AssetBundle

unity提供了assetbunlde机制,下面介绍一种方法将指定目录下的所有文件打包成AssetBundle 先说明步骤,再上代码. 步骤一.选择要打包成assetbundle的目录,本案例使用assetbundle_raw 步骤二.把要打包的资源或者目录都放到assetbundle_raw目录,资源可以是 prefab,png,fbx,font,audio,txt等. 步骤三.给assetbundle_raw目录下所有的资源文件设置assetbundle名称,如果是目录,会递归. 名称格式:

Unity3D游戏开发之Unity打包APK

Unity3D游戏开发之Unity打包APK 1.安装JDK 2.配置JDK 3.在Paht的变量值后面加分号,把D:\android\adt-bundle-windows-x86-20131030\sdk\tools放在Path后面.[狗刨学习网] 4.点击菜单栏中的Edit-->Preferences 看Android SDK Location这个选项 浏览你的模拟器路径. 5.点击 File-Build Settings 然后再 点击Add Current 添加你的场景.再 点击Switc

Unity打包ipa图文教程

首先保证项目在Unity上运行正常,有时候电脑上运行成功也不代表手机上能运行成功,总之会出现各种问题,还是需要丰富的经验. 简单来说,步骤如下:Unity打包IOS---生成XCode项目---配置开发者账号---安装开发者证书(如果发布的话需要发布证书)---XCode在真机上运行---生成ipa 在unity Build Settings里面选择平台为Platform为ios,再在Player Setting中配置一下,如果你打包过安卓,对此应该就很熟悉了,配置基本差不多,需要注意的一点就是

Unity for Windows: III–Publishing your unity game to Windows Phone Store

原地址:http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-iiipublishing-to-windows-phone-store/ In Part II we covered how you can publish your game to Windows Store, so it runs on Windows 8 driven devices. Today we are going to export our ga

Unity for Windows: II – Publishing Unity games to Windows Store

原地址:http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-ii-publishing-to-windows-8/ Windows 8 is a new OS with a Windows Store where you can distribute your apps to millions of users world wide, for both PC, laptops and tablets. You can se

Ant打包可运行的Jar包(加入第三方jar包)

本章介绍使用ant打包可运行的Jar包. 打包jar包最大的问题在于如何加入第三方jar包使得jar文件可以直接运行.以下用一个实例程序进行说明. 程序结构: 关键代码: package com.alfred.main; import com.alfred.bean.User; import com.alfred.util.ProjConfig; import com.thoughtworks.xstream.XStream; public class Main { public static

unity 打包资源及网络请求资源包

第一步 导包 在Assets新建一个Editor目录 新建一个Test类 using UnityEngine; using System.Collections; using UnityEditor; public class Test : Editor { //打包单个 [MenuItem("Custom Editor/Create AssetBunldes Main")] static void CreateAssetBunldesMain () { Object[] Select

【安卓9】在windows运行命令中操纵数据库

在windows运行命令中操纵数据库 Microsoft Windows [版本 10.0.10586] (c) 2015 Microsoft Corporation.保留所有权利. C:\Users\dell>cd D:\workspace\android\sdk\tools[eclipse中关联的sdk文件中的tools文件所在位置] C:\Users\dell>D: D:\workspace\android\sdk\tools>adb shell # cd data/data/co