-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage_IO.cs
More file actions
40 lines (35 loc) · 1.05 KB
/
image_IO.cs
File metadata and controls
40 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.VR;
public class Image_IO : MonoBehaviour
{
// Constants
// Members
RawImage LeftSideImage;
RawImage RightSideImage;
RawImage Nimage = null; // What IS this?
// Constrcutors
Image_IO(RawImage LeftRawImage, RawImage RightRawImage){
LeftSideImage = LeftRawImage;
RightSideImage = RightRawImage;
LeftSideImage.GetComponent<RectTransform>().sizeDelta
= new Vector2(300.0f, 350.0f);
RightSideImage.GetComponent<RectTransform>().sizeDelta
= new Vector2(300.0f, 350.0f);
}
// Public Methods
public void setLeftSideTexture(Texture newTexture)
{
LeftSideImage.texture = newTexture;
}
public void setRightSideTexture(Texture newTexture)
{
RightSideImage.texture = newTexture;
}
public setBothSidesTextures(Texture newTexture)
{
LeftSideImage.texture = newTexture;
RightSideImage.texture = newTexture;
}
}