This commit is contained in:
CortexCore
2024-03-11 02:16:25 +08:00
parent 605ccbcf8d
commit 6ef7c5f005
16 changed files with 832 additions and 45 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections;
using System.Collections.Generic;
using BITKit;
using BITKit.Entities;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Rendering.Universal;
namespace BITFactory.Cutting
{
[CustomType(typeof(IDecalTool))]
public class UnityDecalTool : EntityBehavior,IDecalTool
{
[SerializeField] private DecalProjector decalProjector;
private void Start()
{
decalProjector.gameObject.SetActive(false);
}
public ITransform Create(string base64, float3 position = default, quaternion rotation = default, float3 scale = default)
{
var decal = Instantiate(decalProjector, position, rotation);
decal.gameObject.SetActive(true);
return decal.transform.ToUnityTransform();
}
}
}