1
0
forked from cgvr/DeltaVR

can insert printable into 3d printer, 3d printer starts printing

This commit is contained in:
2026-02-14 16:08:13 +02:00
parent 884459842e
commit 17c9122a14
11 changed files with 192 additions and 45 deletions

View File

@@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Printable : MonoBehaviour
{
private Texture2D attachedTexture;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public Texture2D GetTexture()
{
return attachedTexture;
}
public void AttachTexture(Texture2D texture)
{
Sprite sprite = ModelGenerationUtils.CreateSprite(texture);
Image imageDisplay = GetComponentInChildren<Image>();
imageDisplay.sprite = sprite;
attachedTexture = texture;
}
}