
【unity中的问题解决日志】
Sir_Pan9527
追求自由的道路孤独而漫长
展开
-
【InvalidCastException】:入坑记录:类型转换失败,以为接口可以解决问题
```csharppublic abstract class UserChangeInfo : MonoBehaviour{ public int id; public Sprite sprite; private Button btnSend; protected IChangeInfo changeInfo = null; private void Start() { btnSend = GetComponent<Button&.原创 2022-05-20 12:03:41 · 477 阅读 · 1 评论 -
attempt to perform arithmetic on a nil value (local ‘a‘) stack traceback
LuaException: Test:17: attempt to perform arithmetic on a nil value (local ‘a’) stack traceback:- 你调用时,传入的参数有问题。原创 2022-05-09 19:06:21 · 4892 阅读 · 0 评论 -
unity
原问题You are trying to create a MonoBehaviour using the ‘new’ keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at allUnityEngine.MonoBeha.原创 2022-02-19 00:21:48 · 3212 阅读 · 0 评论 -
【无标题】
UnassignedReferenceException: The variable tankHead of PlayerObj has not been assigned.You probably need to assign the tankHead variable of the PlayerObj script in the inspector.PlayerObj.Update () 将脚本重新挂载即可,在进行反射时可能出现了问题...原创 2022-02-07 16:00:21 · 355 阅读 · 0 评论 -
2021-07-24
视频范围检测操作```csharpusing System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.Video;public class AudioManager : MonoBehaviour{ public GameObject tarGet; public VideoPlayer[] vedios; public GameObject..原创 2021-07-24 19:32:00 · 753 阅读 · 0 评论 -
2021-06-22
Unity快速创建的小技巧using System.Collections;using System.Collections.Generic;using UnityEngine;public class AttributeSpan : MonoBehaviour{ private void Reset() { for (int i = 0; i < transform.childCount; i++) { Gam..原创 2021-06-22 20:18:36 · 206 阅读 · 2 评论 -
【unity如何打开脚本时默认用VisualStudio打开脚本】
点击unity的Edit下的——>Preferences改变这里的编辑器即可原创 2020-07-14 16:15:46 · 10363 阅读 · 2 评论 -
【HoloLens打包】--日常报错--
日常报错1.【项目的一个或多个目标不支持"允许不安全代码"】严重性 代码 说明 项目 文件 行 禁止显示状态错误 项目的一个或多个目标不支持“允许不安全代码”。 Assembly-CSharp-firstpass D:\Users\Sir_Pan\HoloVive\HoloViveObserver-master\HoloViveObserver\HOLO\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.原创 2020-07-15 10:29:04 · 502 阅读 · 0 评论 -
unity2017.1 导出安卓报错
UnityException: Bundle Identifier has not been set up correctly Please set the Bundle Identifier in the Player Settings. The value must follow the convention 'com.YourCompanyName.YourProductName' and ...原创 2019-07-27 18:33:45 · 344 阅读 · 0 评论 -
【unity中运行HTC VIVE的案例场景时一直不显示在头盔上,VR其他都正常】
在上面添加openVR即可原创 2020-08-18 20:12:05 · 2583 阅读 · 0 评论 -
【unity中的问题解决日志】
2020-08-29:【导出exe文件报错】System.MissingMethodException: Method 'UnityEditor.PackageManager.Client.List' not found. at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&原创 2020-08-29 17:38:01 · 1498 阅读 · 0 评论