1
0
forked from cgvr/DeltaVR
Files
DeltaVR3DModelGeneration/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/Printable.cs

35 lines
699 B
C#

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