开始研究Google Cardboard SDK,下载了一份gvr-unity-sdk,用Unity打开里面的Samples: CastleDefense,导出XCode项目在iPhone上面运行,出现如下错误:

You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.

修改完上述错误再运行又出现如下错误:

The referenced script on this Behaviour (Game Object 'ExplosionMobile') is missing!

返回Untiy项目,看到Assets/Game/Prefabs/Cannon Ball这个Prefab里面的ExplosionMobile下面挂的脚本丢了

在检查了Edit->Project Settings->Editor里面的Version Control设置为Visual Meta Files,Asset Serialization设置为Force Text(如果你的项目设置不是这样,需要修改成这样).

在项目文件目录下选中 Cannon Ball.prefab 这个文件,用文本编辑器打开,并搜索ExplosionMobile:

从上图可以看到m_Name: ExplosionMobile这一行上面有m_Component的数据,-  4:为Transform,- 114:为Script,即为丢失的Script,复制其后面的fileID数值11463042,并在该文件中搜索11463042,除去当前这个位置,另外一个位置,就是该Script的数据信息:

看--- !u!114 &11463042这个模块下的数据,m_Script这一行里面有一个guid,数值039587c051912eb4ead9e58344c5f3ce即为丢失的Script的guid,该guid是Unity自动生成并保存在.meta文件里面的。

在本地文件系统中搜索039587c051912eb4ead9e58344c5f3ce,结果如下:

往下拉寻找*.cs.meta,发现如下:

点击其中一个ParticleSystemMultiplier.cs.meta,在上层文件夹中显示出来,发现是Unity的Standard Assets: ParticleSystems里面的脚本:

在项目中导入ParticleSystems Package后,丢失的代码即刻恢复了:

到此,丢失的Script找到了。

Missing Prefab也是类似的操作,用文本编辑器打开丢失Prefab的*.unity这个场景文件,然后搜索Missing Prefab,通过fileID在文件中查到Prefab的数据信息,分析该Prefab数据中包含哪些Component,并手动重建一个,丢失的资源文件,则根据guid在项目目录下查找。

本文为原创,如果转载请注明出处

Missing (Mono Script), Missing Prefab的更多相关文章

  1. 升级AutoMapper后遇到的“Missing map”与“Missing type map configuration”问题

    前几天发现 AutoMapper 3.3 的一个性能问题(详见:遭遇AutoMapper性能问题:映射200条数据比100条慢了近千倍),于是将 AutoMapper 升级至最新的 5.1.1 看是否 ...

  2. Missing Number, First Missing Positive

    268. Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find th ...

  3. Unity 编辑器(移除missing)

    移除 Missing(Mono Script) ` private static void FindMissingReferences() { GameObject[] pAllObjects = ( ...

  4. file:///Users/xmg/Desktop/xiangmu~Bsbdejie/BaisibudejieTheSecondtime/BaisibudejieTheSecond/BaisibudejieTheSecond/AppDelegate.m: warning: Missing file: /Users/xmg/Desktop/xiangmu~Bsbdejie/BaisibudejieT

    warning: Missing file: is missing from working copy fatal error: file '-.h' has been modified since ...

  5. Type.Missing和System.Reflection.Missing.Value

    Type.Missing https://msdn.microsoft.com/en-us/library/system.type.missing(v=vs.110).aspx Missing.Val ...

  6. fedora 28 missing PROG bison

    yum install bison Missing PROG dlltool Missing PROG flex Missing PROG mt

  7. (转)[Unity3D]BuildPipeline.PushAssetDependencies 打包依赖包,优化UI Prefab的资源引用加载(坑爹之处)

    转自:http://blog.csdn.net/chiuan/article/details/39040421#reply 1:长话短说,UI Prefab中一般会交叉引用Atlas,那么打包时候我们 ...

  8. 优化脚本性能 Optimizing Script Performance

    This page gives some general hints for improving script performance on iOS. 此页面提供了一些一般的技巧,提高了在iOS上的脚 ...

  9. Reactor by Example--转

    原文地址:https://www.infoq.com/articles/reactor-by-example Key takeaways Reactor is a reactive streams l ...

随机推荐

  1. 自定义指令-directive (转)

    1.指令作用域中的@ 作用是把当前属性作为字符串传递. 前台代码: <div ng-controller="MyCtrl">       <drink water ...

  2. MiniUI中DataGrid数据的载入

    本文将介绍一下,在ASP.NET MVC环境下,如何用Jquery MiniUI中的Datagrid控件载入数据. 1.效果展示: 2.具体步骤: 1>  既然是在MVC里,那我们的界面自然选择 ...

  3. 09B-独立按键消抖实验02——小梅哥FPGA设计思想与验证方法视频教程配套文档

    芯航线--普利斯队长精心奉献   实验目的: 1.复习按键的设计 2.用模块化设计的方式实现每次按下按键0,4个LED显示状态以二进制加法格式加1,每次按下按键1,4个LED显示状态以二进制加法格式减 ...

  4. Spring之ClassPathResource加载资源文件

    先看Demo: 1 @Test 2 public void testClassPathResource() throws IOException { 3 Resource res = new Clas ...

  5. Windows下的Objective-C集成开发环境(IDE)(转)

    Objective-C是苹果软件的编程语言,想要上机学习.调试,有一个集成开发环境(IDE)方便很多.有三类方法搭建Objective-C的集成开发环境: 1)   使用苹果的平台,集成开发环境使用X ...

  6. 一个被称为世界上最短的判断IE方法

    最近偶然看到一段判断是否为IE浏览器的代码: if(!+[1,]) { console.info("IE 浏览器"); } else { console.info("非 ...

  7. poj 1626

    传送门:http://poj.org/problem?id=1636 题意:有两个监狱,每个监狱有n个人,有m种关系,表示A监狱第i个人不能跟B监狱第j个人在一个监狱,问你最多能换几组人(从A,B监狱 ...

  8. .dtsi .dts dtc dtb 是什么

    基础 .dts: device tree source .dtsi:   device tree source include .dts比作源文件,.dtsi比作头文件. dtc是linux源码 /s ...

  9. Android sdk目录介绍

    android sdk目录介绍 build-tools 各版本SDK编译工具 docs 离线开发者文档Android SDK API参考文档 extras 扩展开发包,如兼容架包. platforms ...

  10. Javascript学习笔记:2种其他类型转换为数字Number类型的方式

    ①使用parseInt()/parseFloat()(在ECMAScript6中是Number.parseInt()/Number.parseFloat()) console.log(parseInt ...