随笔分类 -  unity3D

摘要:unity3d通过串口接收Arduino数据 using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO.Ports; using System; using Syste 阅读全文
posted @ 2024-09-01 00:16 西北逍遥 阅读(94) 评论(0) 推荐(0) 编辑
摘要:unity3d 动态改变物体的位置 using UnityEngine; public class MoveObject : MonoBehaviour { void Start() { // GameObject myObject = GameObject.Find("myObject"); if 阅读全文
posted @ 2024-08-11 16:26 西北逍遥 阅读(78) 评论(0) 推荐(0) 编辑
摘要:using System.IO; using UnityEngine; using UnityEngine.UI; public class SaveRawImageAsPNG : MonoBehaviour { public RawImage rawImage; public void SaveI 阅读全文
posted @ 2024-08-01 15:25 西北逍遥 阅读(31) 评论(0) 推荐(0) 编辑
摘要:unity3d碰撞 Unity3D提供了多个碰撞事件函数,用于处理不同类型的碰撞情况。常用的碰撞事件函数包括: OnCollisionEnter:当两个物体开始碰撞时触发。这是碰撞的起始点,可以用于执行碰撞开始时的逻辑,如播放碰撞音效、改变游戏状态等。 OnCollisionStay:在两个物体持续 阅读全文
posted @ 2024-07-23 19:38 西北逍遥 阅读(50) 评论(0) 推荐(0) 编辑
摘要:unity3d Dictionary 根据key获取value using System; using System.Collections.Generic; using UnityEngine; public class DictionaryExample : MonoBehaviour { pr 阅读全文
posted @ 2024-07-21 22:26 西北逍遥 阅读(97) 评论(0) 推荐(0) 编辑
摘要:unity3d缩放物体 using UnityEngine; public class ScaleObject : MonoBehaviour { // 缩放速度,可以根据需要调整 public float scaleSpeed = 0.1f; // 控制缩放的方向,这里以X轴为例 public b 阅读全文
posted @ 2024-07-20 23:05 西北逍遥 阅读(61) 评论(0) 推荐(0) 编辑
摘要:InvalidOperationException: Insecure connection not allowed 在Edit -> Project Settings -> Player中找到平台设置(比如“PC, Mac & Linux Standalone”或者你的目标平台),然后滚动到底部找 阅读全文
posted @ 2024-07-19 23:01 西北逍遥 阅读(138) 评论(0) 推荐(0) 编辑
摘要:unity3d get post请求 using UnityEngine; using UnityEngine.Networking; public class NetworkRequestExample : MonoBehaviour { IEnumerator Start() { string 阅读全文
posted @ 2024-07-18 18:12 西北逍遥 阅读(62) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using Mono.Data.Sqlite; // 注意:这取决于你使用的SQLite库 public class SQLiteExampl 阅读全文
posted @ 2024-07-17 21:15 西北逍遥 阅读(8) 评论(0) 推荐(0) 编辑
摘要:unity3d 读取串口 using System.IO.Ports; using UnityEngine; public class SerialCommunication : MonoBehaviour { SerialPort mySerialPort = new SerialPort("CO 阅读全文
posted @ 2024-07-12 00:27 西北逍遥 阅读(81) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class VCCameraWorkerController : MonoBehaviour { public Vector3 阅读全文
posted @ 2024-01-09 22:22 西北逍遥 阅读(45) 评论(0) 推荐(0) 编辑
摘要:unity3d 清空控制台 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using AssemblyCSharp; using System; 阅读全文
posted @ 2023-09-21 15:41 西北逍遥 阅读(103) 评论(0) 推荐(0) 编辑
摘要:unity3d BestHTTP #region /// <summary> /// 调用http接口 /// </summary> private void StartRequestData() {// BestHttp插件, 首先实例化一个HTTPRequest, 设置为Post形式, 并配置回 阅读全文
posted @ 2023-08-29 21:04 西北逍遥 阅读(443) 评论(0) 推荐(0) 编辑
摘要:Unity3D中的UnityWebRequest是用于发送HTTP请求和处理HTTP响应的类。它提供了一种方便的方式来从服务器获取数据,例如从Web服务器的数据库中检索数据,并通过HTTP请求将数据发送回Unity3D应用程序。 使用UnityWebRequest类,您可以执行以下操作: 创建请求: 阅读全文
posted @ 2023-07-18 09:59 西北逍遥 阅读(364) 评论(0) 推荐(0) 编辑
摘要:x y z -75.61 21.43 127.96 -75.61 21.43 108.66-10.5 21.43 127.96 长:66.3 宽:20.35 阅读全文
posted @ 2022-11-25 09:46 西北逍遥 阅读(23) 评论(0) 推荐(0) 编辑
摘要:unity3d修改对象属性 #region void loadWorkerModel(Vector3 init_position, string worker_name,string BDID) { GameObject obj = (GameObject)Instantiate(Resources 阅读全文
posted @ 2022-11-11 21:48 西北逍遥 阅读(71) 评论(0) 推荐(0) 编辑
摘要:unity3d添加刚体、质量 this.gameObject.AddComponent<Rigidbody>(); this.gameObject.GetComponent<Rigidbody>().mass = 10.01f; ################# 阅读全文
posted @ 2022-09-26 14:57 西北逍遥 阅读(38) 评论(0) 推荐(0) 编辑
摘要:unity3d旋转 Quaternion target = Quaternion.Euler(0.0f, tower_z_angle * (1.0f) , 0.0f); this.transform.Find("CraneSlider").transform.rotation = Quaternio 阅读全文
posted @ 2022-09-25 19:44 西北逍遥 阅读(22) 评论(0) 推荐(0) 编辑
摘要:桁架系统模拟 //键盘控制 void ControllerObjectByKeyBoard() { if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.W)) { // 获取Player变量指定的对象的三围坐标 Vector3 ar 阅读全文
posted @ 2021-09-23 17:46 西北逍遥 阅读(108) 评论(0) 推荐(0) 编辑
摘要:unity3d给某个对象添加材质 public void SetMaterial() { GameObject indexGameObject=list_topIfcSlabs[5]; Renderer[] renders = indexGameObject.GetComponentsInChild 阅读全文
posted @ 2021-06-18 16:06 西北逍遥 阅读(536) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示