上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: https://gamedevelopertips.com/unity-pixel-perfect-sprite/ So I was making a little prototype for my new game when I just came across a little problem. 阅读全文
posted @ 2023-10-11 19:37 dewxin 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 问题展示 这个图片中,可以发现 巴 郡 两个字的移动和其他图片不一致。 表面原因 是因为这个两个图片资产的filter mode 为point导致的,其他图片资产为bilinear。 解决方案 未知。 阅读全文
posted @ 2023-10-11 19:26 dewxin 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 背景 之前尝试在Unity编辑器用代码读取打包好的数据,发现在布置场景的时候不能做到所见即所得,这里将运行时读取到的图片素材,保存为spritesheet,并设置对应的sprite。 效果展示 代码 using System; using System.Collections.Generic; us 阅读全文
posted @ 2023-09-28 15:19 dewxin 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 最近调试的时候,发现游戏的鼠标会自己重置回游戏的中心位置。 找了半天发现是 ngui 的UICamera 里面会设置Cursor.lockState 。。 static public KeyCode currentKey { get { return mCurrentKey; } set { if 阅读全文
posted @ 2023-09-20 00:45 dewxin 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 背景介绍 做2D横版游戏的时候,通常会放置一个背景图片,但如果背景图片一动不动,大脑会将其和中心位置的角色捆绑,从而给玩家一种变扭的感觉,以及久了会导致眩目的不良体验。 因此希望背景图片也能像日常中的远景一样,能够随着人物的移动而移动。 目标效果 我们期望在地图左下角的时候,显示的是背景左下角的部分 阅读全文
posted @ 2023-09-18 00:25 dewxin 阅读(214) 评论(0) 推荐(0) 编辑
摘要: ### 简介 想对单例进行统一的管理,在UnityEditor[进入playMode](https://docs.unity.cn/2019.4/Documentation/ScriptReference/EditorApplication-playModeStateChanged.html)的时候 阅读全文
posted @ 2023-09-05 15:03 dewxin 阅读(15) 评论(0) 推荐(0) 编辑
摘要: [toc] ### 简介 最近需要利用他人打包好的资源,接近8G,不是很大,但解压完小文件特别多,到了unity里面会频繁显示repaint提示窗,降低了开发效率。 于是采用了进游戏即时解包的策略,虽然资源可以在需要时再加载,但资源的索引需要在进入游戏时就构建好。构建资源id到文件偏移位置的映射,单 阅读全文
posted @ 2023-09-01 14:39 dewxin 阅读(180) 评论(0) 推荐(0) 编辑
摘要: ```C# using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(SpriteRenderer))] public class SpriteFul 阅读全文
posted @ 2023-08-27 15:08 dewxin 阅读(402) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/xinzhilinger/article/details/115408934 前言: 在游戏开发学习初期,游戏体量较小,如果游戏场景需要Asset中的资源,我们可能会通过拖动的方式,将其添加到游戏场景中。而到了实际工作中,会发现再这样做就会使得各种拖动的资 阅读全文
posted @ 2023-08-21 16:14 dewxin 阅读(2534) 评论(0) 推荐(0) 编辑
摘要: .netframework的Bitmap类返回的pixel中[alpha的值恒为255]( https://bytes.com/topic/net/answers/752980-how-do-i-get-bitmap-getpixel-not-return-alpha-value),因此需要自己读取 阅读全文
posted @ 2023-08-08 19:22 dewxin 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页