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(); } } }