unity 2017.2.1f1
Tooltip System
Assets/TooltipSystem/Scripts/GUIController.cs(55,26): error CS1061: Type `UnityEngine.Component' does not contain a definition for `ScreenPointToRay' and no extension method `ScreenPointToRay' of type `UnityEngine.Component' could be found. Are you missing
an assembly reference?
Assets/TooltipSystem/Scripts/GUIController.cs(97,78): error CS1061: Type `UnityEngine.Component' does not contain a definition for `WorldToScreenPoint' and no extension method `WorldToScreenPoint' of type `UnityEngine.Component' could be found. Are you missing
an assembly reference?
Assets/TooltipSystem/Scripts/GUIController.cs(97,214): error CS1061: Type `UnityEngine.Component' does not contain a definition for `WorldToScreenPoint' and no extension method `WorldToScreenPoint' of type `UnityEngine.Component' could be found. Are you
missing an assembly reference?
以上问题如下步骤解决
在导入的 这个插件 的文件夹中,打开示例 场景,在 Hierarchy视图 ,找到 Camera 物体,打开 GUI Controller,如下图所示
在GUI Controller 中有两种解决办法,
第1种,在Start函数上面 添加 一个 private Camera camera;并在Start函数里面为 这个 camera 进行初始化。(这个 GUIController.cs 就得在 Camera物体上有效)
如下图所示
第2种方式,添加public Camera camera;,设置为公共成员 如下图所示
设置了公共成员之后,把Camera物体 拖入 该变量即可。
记得选择 字体
效果如下图所示
Mobile Tooltip Systems - Try it
NewUI Tooltip