效果图
下载CSG并导入到项目中:
1、新建Plugins文件夹 将editor下的csg剪切进文件夹,删除原来的dll文件夹
代码
此代码挂到主相机上 target为被剪切的物体 brush是刷子 也就是这个是什么样子 被剪切的切口就是什么样子
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MeshMakerNamespace;
using UnityEngine.UI;public class Game : MonoBehaviour
{public GameObject Target;//要裁剪的板子public GameObject Brush;//裁剪的笔刷GameObject newPanel;//裁剪后的板子CSG csgPanel;GameObject newCube;//被裁剪出来的方块CSG csgCube;public static Game _game;private void Awake(){_game = this;}void Start(
本文发布于:2024-02-04 15:59:56,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170711127656912.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |