游戏天文日时钟

作者:追风剑情 发布于:2022-6-30 12:17 分类:Unity3d

模拟游戏中一天的时间 using System; using System.Collections.Generic; using UnityEngine; /// <summary> /// 模拟时钟(游戏中的天文日) /// </summary> public class AstronomicaldayClock : MonoBehaviour {...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1150)

WebGL: 360度全景图

作者:追风剑情 发布于:2022-6-16 15:49 分类:Unity3d

工程截图 1、创建材质并选择自定义的Shader 2、在场景中创建一个Sphere并设置上一步创建的材质,缩放值z改成负的,否则图像左右是反的。 3、将摄像机放到Sphere的中心位置,并挂上控制摄像机旋转的脚本 参考 鼠标或手指控制摄像机旋转 新建Shader Shader "Custom/...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1868)

鼠标或手指控制摄像机旋转

作者:追风剑情 发布于:2022-6-16 15:44 分类:Unity3d

using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 手指或鼠标控制摄像机旋转 /// 使用方法:将此脚本挂到Camera上 /// </summary> public class TouchRotationCamera ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1397)

WebGL: 与浏览器脚本交互

作者:追风剑情 发布于:2022-6-16 15:24 分类:Unity3d

[官网] WebGL:与浏览器脚本交互 创建*.jslib库文件 创建*.jslib文件并存放到Assets/Plugins目录下。 示例: WebJS.jslib mergeInto(LibraryManager.library, { // 获取浏览器运行平台信息 GetUserAgent : function() { var str =...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1349)

游戏多人同屏控制器

作者:追风剑情 发布于:2022-6-14 13:13 分类:C#

using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 同屏镜像玩家移动控制器 /// </summary> public class ActorMoveController : MonoBehaviour { //是否激活状态 ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1273)

Unity中的内置宏

作者:追风剑情 发布于:2022-6-6 11:34 分类:Unity3d

Unity官方文档 ConditionalAttribute C#内置宏定义 C#内置宏定义 内置宏 描述 UNITY_EDITOR 脚本...

阅读全文>>

标签: Unity3d

评论(0) 浏览(5577)

Project Settings——Physics

作者:追风剑情 发布于:2022-5-13 14:38 分类:Unity3d

https://docs.unity3d.com/cn/2019.4/Manual/class-PhysicsManager.html 使用 Physics 设置(主菜单:Edit > Project Settings,然后选择 Physics 类别)可应用 3D 物理全局设置。 注意:要管理 2D 物理的全局设置,请改用 Physics 2D 设置。 ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2624)

获取GPS位置

作者:追风剑情 发布于:2022-3-9 15:52 分类:Unity3d

[官方文档] http://docs.unity3d.com/Documentation/ScriptReference/LocationService.Start.html 为应用开启定位权限 示例代码 using System.Collections; using System.Collections.Generic; usin...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1528)

麦克风(Microphone)

作者:追风剑情 发布于:2022-2-8 12:04 分类:Unity3d

using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 麦克风辅助类 /// </summary> public sealed class MicrophoneHelper { //获取设备名称 publ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1706)

WebRTC For Unity

作者:追风剑情 发布于:2022-2-7 12:14 分类:Unity3d

WebRTC官网 WebRTC for Unity Unity WebRTC Package webrtc-uwp WebRTC-universal-samples interview-uwp uwp-webrtcortc HoloLens2-Unity-ResearchModeStreamer HoloLens2ForCV Unity Render Stream...

阅读全文>>

标签: Unity3d

评论(0) 浏览(6321)

Pro GIF Plugin for Unity

作者:追风剑情 发布于:2022-1-20 16:41 分类:Unity3d

https://www.swanob2.com/progif 一款强大的播放、录制GIF的插件 一、创建ProGifManager实例 ProGifManager gifMgr = ProGifManager.Instance; 二、设置录制参数 gifMgr.SetRecordSettings(true,...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2922)

游戏版本号检测

作者:追风剑情 发布于:2022-1-7 12:05 分类:Unity3d

一、在游戏代码中记录版本号,方便获取 using System; using System.IO; using UnityEngine; using UnityEditor; /// <summary> /// 自动在代码中记录 verion、bundleVersionCode /// 参考 https://blog.csdn.net/zxsean/article/d...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1965)

游戏定时器

作者:追风剑情 发布于:2022-1-6 16:10 分类:Unity3d

using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; /// <summary> /// 游戏定时器 /// </summary> public class GameTimer : MonoBehaviour { public static Gam...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1715)

Tree Editor (树编辑器)

作者:追风剑情 发布于:2022-1-4 15:25 分类:Unity3d

官方文档 Tree Editor (树编辑器) 构建第一棵树 一、创建树干 1、GameObject->3D Object->Tree 此时树包含两个节点: Tree Root Note、Branch Group 二、创建树枝 1、选中 Branch Group 点击 Add Branch Group 按钮,增加树枝 选中二级 Branch Group,并调整 ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2533)

事件系统(UnityEngine.EventSystems)

作者:追风剑情 发布于:2021-12-11 19:02 分类:Unity3d

https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.EventSystems.html 注意:非UGUI元素要响应事件,需要在 Camera 上添加 PhysicsRaycaster 组件。 using UnityEngine; using UnityEngine.Events; usi...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1363)

UGUI—布局组(LayoutGroup)

作者:追风剑情 发布于:2021-12-8 10:50 分类:Unity3d

一、水平居中布局 using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 水平居中布局 /// </summary> public class UIHorizontalLayoutGroup : MonoBehavi...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1765)

游戏AI状态机

作者:追风剑情 发布于:2021-11-29 15:46 分类:Unity3d

一、工程截图 AIState.cs using System; /// <summary> /// AI状态基类 /// </summary> public class AIState { //状态ID public virtual int StateId { get { return -1; } set ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1855)

UGUI—头顶飘字

作者:追风剑情 发布于:2021-11-29 15:26 分类:Unity3d

一、工程截图 二、代码 using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 头顶浮动文本 /// </summary> public class UIHeadFloatText :...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1866)

UGUI—文字弹跳效果

作者:追风剑情 发布于:2021-10-21 11:14 分类:Unity3d

示例:文字弹跳效果 工程截图 using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 文字弹跳效果 /// </summary> public class UITextWaveEffect ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1646)

UGUI—InputField

作者:追风剑情 发布于:2021-10-12 15:01 分类:Unity3d

示例 1: 密码输入框 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 密码输入框 /// </summary> public class PasswordInp...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1808)

UGUI—对话框(DialogBox)

作者:追风剑情 发布于:2021-9-27 15:57 分类:Unity3d

示例:对话框 工程截图 代码 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 对话框UI ///...

阅读全文>>

标签: Unity3d

评论(0) 浏览(1691)

Unity 2D Animation

作者:追风剑情 发布于:2021-9-18 14:27 分类:Unity3d

Introduction to 2D Animation Unity 2D 工具包 一、准备和导入PSB文件 1、将动画角色的不同部分放在不同的图层 (Photoshop) 预览 2、保存为大型文档格式(*.PSB) 3、将PSB文件导入Unity ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2085)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号