-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathTextureSetComponent.LoadTextureObject.cs
More file actions
53 lines (47 loc) · 1.35 KB
/
TextureSetComponent.LoadTextureObject.cs
File metadata and controls
53 lines (47 loc) · 1.35 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
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using GameFramework;
#if ODIN_INSPECTOR
using Sirenix.OdinInspector;
#endif
using UnityEngine;
namespace UGFExtensions.Texture
{
public partial class TextureSetComponent
{
[Serializable]
public class LoadTextureObject : IReference
{
#if ODIN_INSPECTOR
[ShowInInspector]
#endif
public ISetTexture2dObject Texture2dObject { get; private set;}
#if ODIN_INSPECTOR
[ShowInInspector]
#endif
public Texture2D Texture2D { get; private set; }
#if UNITY_EDITOR
public bool IsSelect { get; set; }
#endif
private LoadTextureObject(ISetTexture2dObject obj,Texture2D texture2D)
{
Texture2dObject = obj;
Texture2D = texture2D;
}
public LoadTextureObject()
{
}
public static LoadTextureObject Create(ISetTexture2dObject obj, Texture2D texture2D)
{
var loadTextureObject = ReferencePool.Acquire<LoadTextureObject>();
loadTextureObject.Texture2dObject = obj;
loadTextureObject.Texture2D = texture2D;
return loadTextureObject;
}
public void Clear()
{
Texture2dObject = null;
Texture2D = null;
}
}
}
}