![](https://img-blog.csdnimg.cn/20190927151117521.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Unity 3D
文章平均质量分 78
u3d 日常
无用理想家
废物一个
展开
-
[Unity 3D] 一个打地鼠和协程的智熄说明(协程随机生成物体相关
是这样的,这两天在写一个智熄打地鼠的代码,在生成地鼠的部分,采用了协程的方式,保证间隔一段时间生成一个地鼠(也有用InvokeRepeating试过,基于我第一版的代码,InvokeRepeating可能更方便一些,但是我最后还是用了协程,毕竟协程这种挂起的方式还蛮节省开销的ok言归正传, 这是我第一版的代码 private void Start(){ StartCoroutine(RandomAppearRoutine()); } IEnumerator Random原创 2020-09-17 19:35:51 · 170 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (21) -- Command Pattern
Command Pattern 命令模式/UI:按钮/命令模式的三个组成部分/WaitForEndOfFrame()原创 2020-09-11 19:09:45 · 185 阅读 · 3 评论 -
[U3D Learning Note] Unity C# Survival Guide (20) -- Object Pools
Object Pool物体池对象池/生成物体池/从物体池获取/获取物体状态activeInHierarchy/重复利用物体池的物体/Invoke()原创 2020-09-09 18:24:26 · 174 阅读 · 3 评论 -
[U3D Learning Note] Unity C# Survival Guide (19) -- Singletons
Singleton单例模式/Lazy Instantiation延迟初始化/MonoSingleton原创 2020-09-08 22:48:20 · 118 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (18) -- LINQ
LINQ: language intergrated query. allow us filter through data, especially filter through arrays and lists.原创 2020-09-05 22:48:20 · 91 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (17) --Delegates and Events
Delegate委托/Multicast delegates/Events/Observer Pattern观察者模式/Actions/Return Type Delegates and Function/Lambda Expression原创 2020-09-01 23:46:59 · 144 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (16) -- Abstract Classes
Abstract Class抽象类/强制继承/接口/多态和通用类型/RayCasting Code原创 2020-08-29 23:40:53 · 128 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (15) --Dictionary
Dictionary字典/key-value原创 2020-08-28 23:53:32 · 117 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (14) -- Enums
Enums枚举/Finite State Machine/搭配Enums食用的场景加载切换方法原创 2020-08-27 00:02:53 · 116 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (13) -- Lists
Lists/Array vs. List/存储实例化的物体/SetActive(true)原创 2020-08-26 15:53:48 · 139 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (12) -- Namespaces
Namespace 允许我们获取库中的元素原创 2020-08-25 18:18:06 · 130 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (11) -- Properties
Properties属性/Auto Properties原创 2020-08-24 23:22:37 · 138 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (10) -- Static Types
static type静态类型/界面显示文本/OnEnable()/OnDisable()/物体生成/Instance Members vs. Static Members/Utility Class/Static Constructor原创 2020-08-24 19:57:30 · 127 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (9) -- Classes
类/构造函数/重载/类的序列化/继承/public/private/protected/虚拟函数和重写/class vs. structs/值传递vs.引用传递原创 2020-08-15 00:27:27 · 152 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (8) -- Functions and Methods
Start()和Update()/Array作为返回值/Array作为参数传递原创 2020-08-11 21:37:03 · 91 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (6)(7) -- Loops & Arrays
协程/for循环/协程和while搭配食用/Array/foreach loop原创 2020-08-07 22:32:12 · 133 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (4)(5) -- if Statement & switch Statement
if语句/改变物体颜色/switch语句原创 2020-08-05 22:45:06 · 164 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (3) --Variables
variables/随机数/取小数/一些命名习惯的建议原创 2020-08-04 22:37:17 · 97 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (2) -- Rotations
四元数和欧拉角/预制件的设置/角色自旋转/丝滑旋转原创 2020-08-04 16:07:32 · 171 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide
unity官方教程Unity C# Surival Guide 学习笔记原创 2020-07-27 23:33:17 · 137 阅读 · 0 评论 -
[U3D Learning Note] Unity C# Survival Guide (1) -- Quick Tips and Assets
物体坐标/键盘鼠标Input方式/物体移动/刚体和物体撞击/暂停系统/Post-Processing Effects/爆炸效果原创 2020-07-27 23:25:10 · 254 阅读 · 0 评论 -
[Unity3D] 解决win10 vscode语法自动补全
2020.09.14 解决办法更新 之前的没作用了就很郁闷关掉vsc, 切换到unity项目界面Asset --> Open C# Project它会进行sln的更新解决就 都用了一个月了 一直都没注意没有自动语法补全 只有个别插件的函数语法 今天看dalao写代码时才突然反应过来这件事…(但咋感觉之前一直有代码补全啊然后开始搜索引擎大法好 照理来说 我按照官网步骤来的应该要有啊 .NET的版本也正确 OmniSharp Log那边也没有warn嗯查看一下当初设置的地方 尝试了一波把Ge原创 2020-07-25 23:37:46 · 634 阅读 · 0 评论 -
[Unity 3d] 日常
刚刚想install High Definition RP 然后给我报了个奇奇怪怪的错(忘了截图 反正大致是resource busy or locked, open “HDLightingWindowEnvironmentSection.cs”然后 我就用vscode打开它想看看咋回事然后就开始import了…...原创 2020-07-08 16:32:11 · 130 阅读 · 0 评论 -
[Unity 3d] 修改从asset store上下载的package的地址
刚刚看着教程 想下载一波Measured Materials Library 结果asset store上没有了…然后照例搜一番…emmmmm…ok fine 那就按照他说的github见(为什么19年12月底的教程上还有!那么问题来了 下载后包放哪里???(目测默认C盘(日常在意c盘剩余容量的我瞥了一眼发现刚下载一波package后剩余容量降到50以下后果断打开c盘开始找(果然!在这里!C:\Users\mizuk\AppData\Roaming\Unity\Asset Store-5.x原创 2020-07-04 15:00:42 · 1384 阅读 · 0 评论 -
[Unity 3D] error CS0619: ‘GUIText‘ is obsolete: ‘GUIText has been removed. Use UI.Text instead.‘
在使用Standard Assets的FPSController时出现以下报错调用了已被弃用的GUIText根据提示修改SimpleActivatorMenu.cs, 改用UnityEngine.UI.Text原创 2020-07-03 20:34:14 · 13467 阅读 · 2 评论 -
[Unity3D] cf: Input.mousePosition & transform.position
Input.mousePositionThe current mouse position in pixel coordinates. (Read Only)The bottom-left of the screen or window is at (0, 0). The top-right of the screen or window is at (Screen.width, Screen.height).Note: Input.mousePosition reports the position原创 2020-06-27 17:39:09 · 391 阅读 · 0 评论 -
[Unity3D] Camera.ScreenPointToRay RaycastHit Physics.Raycast
看教材(Learning C# Programming with Unity 3D, Second Edition)时的一个代码片段 void Update() { /* * Section 4.3.1 Mouse Point */ Ray ray = myCamera.ScreenPointToRay(Input.mousePosition, Camera.MonoOrSt原创 2020-06-27 17:11:25 · 457 阅读 · 0 评论 -
[Unity 3D] 随时注意的点(日常更新)
1. create C# file注意文件名要与类名相同。如果没有相符的话,当脚本在游戏中运行时会出现类定义错误(class definition error)。可以在unity3D中创建C# scripts时直接更名, 也可以后面rename(右键)。...原创 2020-06-21 21:00:53 · 270 阅读 · 0 评论