自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (5)
  • 收藏
  • 关注

原创 Unity之AssetBundle

AssetBundle

2023-02-26 21:04:14 224

原创 Unity坐标系转换

坐标系的转换世界坐标系和本地坐标系的相互转换函数如下。● Transform.TransformPoint(Vector3position):将一个坐标点从本地坐标系转换到世界坐标系。● Transform.InverseTransformPoint(Vector3position):将一个坐标点从世界坐标系转换到本地坐标系。● Transform.TransformDirection(Vector3direction):将一个方向从本地坐标系转换到世界坐标系。● Transform.I

2023-02-24 18:28:12 2907

原创 Unity预制体和预设

一直以为预设就是Prefab。查看官方文档,才知道预设的含义

2023-02-22 22:03:42 1526

原创 Unity特殊文件夹名称

Unity 使用的特殊文件夹名称的完整列表。

2023-02-21 21:20:53 253

原创 Unity资源导入预处理

案例,将Texutre的Type修改为NormalMap。资源导入时,预处理修改设置。

2023-02-21 21:04:21 201

转载 C# Windows获取系统路径汇总

原文链接:https://blog.csdn.net/qq_37192571/article/details/117926242。版权声明:本文为CSDN博主「樱花花」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

2023-02-08 14:15:03 381

原创 使用UnityWebRequest获取网络图片并保存

使用UnityWebRequest获取网络图片并保存。

2022-11-18 14:32:55 293

原创 Unity定位耗时代码段

void Start() { UnityEngine.Profiling.Profiler.BeginSample("For100"); // 耗时代码 for(int i=0;i<10000;i++) { Debug.Log(i); } UnityEngine.Profiling.Profiler.EndSample(); }

2022-03-22 10:00:05 3662

原创 Unity 人物上坡贴地移动

void Update(){ Vector3 newup = transform.position; RaycastHit hit; if (Physics.Raycast(transform.position,Vector3.down,out hit)) { newup.y = (hit.point + Vector3.up * 2.0f).y; destUp = hit.normal; } trans.

2021-10-18 15:40:52 4485 1

转载 Unity3d 检测物体是否在摄像机照射范围内

using System.Collections;using System.Collections.Generic;using UnityEngine;/// <summary>/// 将脚本挂在摄像机观察的物体上 物体必须带有Render/// </summary>public class PlayerView : MonoBehaviour { bool isRendering; float curtTime = 0f; float.

2021-10-18 15:06:15 648

原创 Unity使用Protobuf序列化和反序列化

using System.Collections;using System.Collections.Generic;using UnityEngine;using ProtoBuf;using System;using System.IO;//添加特性,表示可以被ProtoBuf工具序列化[ProtoContract]public class DragMsg{ //添加特性,表示该字段可以被序列化,1可以理解下标 [ProtoMember(1)] public in...

2020-09-29 13:49:26 874

转载 unity Event和Delegate

1. event是特殊的delegate,用event实现的功能用delegate同样可以实现。2. event较之delegate具有继承方面的安全性。3. 用event,别的类只能订阅/取消订阅,如果用一个 public delegate成员变量,别的类可以调用或者覆盖我们的delegate变量。4. 一般来说,如果你要创建一个包含多个类的动态体系,使用event而不是delegate。————————————————版权声明:本文为CSDN博主「lb71104208」的原创文章,遵循C

2020-05-22 14:37:57 683

原创 unity消息管理

GameEvent.cspublic delegate void CallBack();public delegate void CallBack<T>(T arg1);public delegate void CallBack<T, K>(T arg1, K arg2);public enum GameEvent{ GameBegin, GameEnd}Message.csusing UnityEngine;using System.C

2020-05-22 14:12:39 258

原创 使用SimpleJson创建Json文本

使用Simple创建如下格式的Json文件{ "cmd" : "message", "data" : { "id" : "333", "bikes" : [ { "userId" : "123", "age" : "234", "name" : "Zhang" }, { ...

2020-05-21 17:09:26 543

原创 unity使用SimpleJson读取配置文件

jsontest.json 一个数组 private void jsontest() { StreamReader streamreader = new StreamReader(Application.dataPath + "/StreamingAssets/jsontest.json"); string str = streamreader.ReadToEnd(); JSONNode json = JSON.Parse(str...

2020-05-21 15:57:42 478

原创 unity使用SharpConfig读取修改配置文件

gamesetting.cfg 放在streamingAssets下[GameStting]name = gamesetting[Test]name = newName[Array]name = {123,345,567,879}using SharpConfig;加载配置文件 public void Load() { string filepath = Application.streamingAssetsPath + "/games..

2020-05-20 15:43:59 526

原创 Unity使用JsonUtility读写Json文件

json文件如下{ "configitemList ": [ { "item1": "item1", "item2": "item2", "item3": "item3", }, { "item1": "item1", "item2": "item2", "item3": "item3"...

2020-05-07 15:24:37 496

原创 unity AssetBundle 资源打包加载

一、设置bundle名称1.1代码批量设置名称 首先将需要打包的资源放到同一个大的文件夹,meta文件不打包 var path = "Assets/Data/"; foreach (var filePath in Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)) { ...

2020-04-17 17:16:34 385

原创 C# 多线程 线程互斥

两个线程并行执行,字符串str时而被Add1操作,时而被Add2操作using System.Threading;using UnityEngine;public class ThreadTest : MonoBehaviour { private string str; void Start () { Thread t1 = new Thread(Ad...

2020-04-10 17:10:47 1271

原创 unity摄像机跟随

using UnityEngine;public class Test : MonoBehaviour{ public float distanceAway = 5; //距离 public float distanceHigh = 2; //相对高度 public float moveSpeed = 3; //相机移动速度 public T...

2020-04-08 14:21:55 235

protobuf-net

protobuf-net

2020-09-29

SimpleJSON.rar

unity加载json配置文件,unity读取配置文件,只需要导入一个脚本就可以使用,将脚本放在plugins文件夹下

2020-05-21

SharpConfig.dll

1.支持的配置文件类型有cfg,ini格式; 2.支持注释功能,使用 # 符号开头; 3.支持直接读取和写入指定节点的值; 4.支持枚举,数组,以及和实体的直接映射; 5.支持内存的创建和使用,相对一个配置类型,直接在代码中初始化和使用;

2020-05-20

Curvy Splines v6.0.1.zip

Curvy Splines v6.0.1版本,曲线插件,自动生成所需道路,赛道。unity3d曲线工具。道路自动生成工具。

2020-04-08

Photon Rally Tutorial 1.1.0.unitypackage

unity多人赛车游戏项目源码Photon Rally Tutorial v1.1.0 Requires Unity 5.2.2 PUN Rally is a complete base project for a multiplayer combat racing game using Photon, the most popular network platform for Unity. The project includes all sources and a 30+ pages illustrated tutorial book (PDF) explaining its use of realistic physics, dead-reckoning, checkpoint-based positions, power-ups, weapons and several other important features of multiplayer games, such as lobby control, car-selection and server-synced race-start. FEATURES Realistic physics based on standard colliders, wheel-colliders and rigidbody. Detailed suspension movement. Real-time race synchronization over the internet using PUN (Photon Unity Network). Dead-reckoning techniques to smoothly deal with latency. (new) Complete weapon system (with ammo, network sync and multiple weapons) (new) Extensible power-ups system with sample increase, decrease speed and weapon ammo reloads Server-synced start and grid spawns. Checkpoint-based race management (positions, laps, finish, etc). Custom car selection (prefabs based) for connected players. The project is a foundation for a multiplayer racing game, but also serves as a comprehensive introduction to several multiplayer concepts with Photon: Dealing with lobbies, rooms creation and joining. Managing player connection and disconnection (both in menus and races). Using custom player properties. Remote Procedure Calls (RPCs). Server-based time/clock (for race start). The PhotonView component. Custom network synchronization of GameObjects. PUNBehavior and Photon.MonoBehavior classes.

2020-04-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除