-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestDDS.cs
More file actions
34 lines (25 loc) · 777 Bytes
/
Copy pathTestDDS.cs
File metadata and controls
34 lines (25 loc) · 777 Bytes
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
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
public class TestDDS : MonoBehaviour
{
[SerializeField] RawImage image;
// Start is called before the first frame update
async void Start()
{
await Task.Delay(1000);
var testPath = Path.Combine(Application.streamingAssetsPath, "main_background.DDS");
var texture = await NativeDDSLoader.LoadDDSAsync(testPath);
image.texture = texture;
//UnityEngine.Object.DestroyImmediate(texture);
//FreeTexture(texture);
}
// Update is called once per frame
void Update()
{
}
}