Astra Unity 2.6.6
Astra Unity Plugin
Astra.Asset.TextureRequest Class Reference

These are the options to feed into the texture jobs In most cases the defaults are fine and you should leave them as-is More...

Public Member Functions

bool IsSrcTexture2D ()
 
bool IsSrcRenderTexture ()
 
bool IsSrcPrimtiiveTexture ()
 
bool IsSrcGuid ()
 
bool IsDstTexture2D ()
 
bool IsDstRenderTexture ()
 
bool IsDstPrimitiveTexture ()
 
bool IsResizing ()
 
bool NeedsAlpha ()
 

Public Attributes

string srcGuid = null
 We know we want a texture, but it's a guid that lives in the Astra Cloud/DB
 
string dstGuid = null
 If we alter the original texture, we may generate a new GUID in some circumstances (such as a derived hash/guid)
 
Texture srcTexture = null
 
Texture dstTexture = null
 
PrimitiveTexture srcPrimitiveTexture = null
 
PrimitiveTexture dstPrimitiveTexture = null
 
bool replaceSrc = false
 If false, we'll instantiate a new texture (or write to an existing destination texture) If true, write to the srcTexture (or copy back over to it)
 
bool destroySrc = true
 If replaceSrc = false, should we destroy the original src texture when our job is done? If replaceSrc = true, does nothing
 
bool updateMipmaps = true
 When sending to the gpu, should we recalculate mipmaps if you don't need to, set to false
 
bool destroyCPUCopy = true
 In most cases you won't need a copy accessible to cpu If this is true it means GetPixels won't work The reason you want this on is it prevents a 2nd copy of memory used
 
bool isDstReadable = false
 Is the destination texture readable, this will get set to false if sent to the GPU and destroyCPUCopy is true
 
bool linear = false
 Should the resulting texture be linear?
 
bool mipmap = true
 Should the resulting texture use mipmaps?
 
bool sendToGPU = true
 When we're done processing the texture, should we send dstTexture2D to the GPU This is only fired if dstTexture2D is not null and sendToGPU = true (default) NOTE: this means we're going to call Texture2D.Apply
 
bool isSentToGPU = false
 
TextureRequestPriority priority = TextureRequestPriority.Normal
 Alters how much latency/async/blocking is performed, defaults to normal (balanced)
 
bool getNativeBytes = false
 If true will result in a NativeBuffer being filled This is more efficient and can be read on a side thread if desired
 
NativeArray< byte > dstNativeBuffer
 
bool selfAllocateNativeBuffer = true
 
bool getTexture = true
 If true (default), means that the resulting operation should result in a texture as an output This texture will be in dstTexture
 
bool compress = false
 Do you want the result texture to be compressed, only suitable if the final output is not a render texture
 
TextureFormat dstTexture2DFormat = 0
 If not 0 will create the resulting texture using this format vs auto
 
RenderTextureFormat dstRenderTextureFormat = 0
 If not 0 will create the resulting render texture using this format vs auto
 
TextureJob job = null
 A circular reference to the origin job that spwaned the request
 
int parentJobId = Astra.Job.kNoParentJobId
 

Properties

Texture2D srcTexture2D [getset]
 
Texture2D dstTexture2D [getset]
 
RenderTexture srcRenderTexture [getset]
 
RenderTexture dstRenderTexture [getset]
 
int SrcWidth [get]
 
int SrcHeight [get]
 
int Width [getset]
 
int Height [getset]
 
TextureFormat DstTexture2DFormat [get]
 
RenderTextureFormat DstRenderTextureFormat [get]
 

Detailed Description

These are the options to feed into the texture jobs In most cases the defaults are fine and you should leave them as-is


The documentation for this class was generated from the following file: